chore: version inicial del codigo fuente del LMS Estafeta

This commit is contained in:
2026-10-02 20:33:12 -06:00
commit c8bb6b97b9
1572 changed files with 457520 additions and 0 deletions
+180
View File
@@ -0,0 +1,180 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Accessibility module
(c) 2010-2019 Highsoft AS
Author: 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/accessibility",["highcharts"],function(r){a(r);a.Highcharts=r;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function r(a,h,q,n){a.hasOwnProperty(h)||(a[h]=n.apply(null,q))}a=a?a._modules:{};r(a,"Accessibility/Utils/HTMLUtilities.js",[a["Core/Utilities.js"],a["Core/Globals.js"]],function(a,h){function m(a){return a.replace(/&/g,
"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")}var n=a.merge,p=h.win,l=p.document;return{addClass:function(a,l){a.classList?a.classList.add(l):0>a.className.indexOf(l)&&(a.className+=l)},escapeStringForHTML:m,getElement:function(a){return l.getElementById(a)},getFakeMouseEvent:function(a){if("function"===typeof p.MouseEvent)return new p.MouseEvent(a);if(l.createEvent){var g=l.createEvent("MouseEvent");if(g.initMouseEvent)return g.initMouseEvent(a,
!0,!0,p,"click"===a?1:0,0,0,0,0,!1,!1,!1,!1,0,null),g}return{type:a}},removeElement:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},reverseChildNodes:function(a){for(var l=a.childNodes.length;l--;)a.appendChild(a.childNodes[l])},setElAttrs:function(a,l){Object.keys(l).forEach(function(k){var e=l[k];null===e?a.removeAttribute(k):(e=m(""+e),a.setAttribute(k,e))})},stripHTMLTagsFromString:function(a){return"string"===typeof a?a.replace(/<\/?[^>]+(>|$)/g,""):a},visuallyHideElement:function(a){n(!0,
a.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(1px, 1px, 1px, 1px)",marginTop:"-3px","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=1)",filter:"alpha(opacity=1)",opacity:"0.01"})}}});r(a,"Accessibility/Utils/ChartUtilities.js",[a["Accessibility/Utils/HTMLUtilities.js"],a["Core/Utilities.js"]],function(a,h){function m(e){if(e.points&&e.points.length&&e.points[0].graphic)return e.points[0].graphic.element}function n(e){var d=m(e);
return d&&d.parentNode||e.graph&&e.graph.element||e.group&&e.group.element}function p(e,d){d.setAttribute("aria-hidden",!1);d!==e.renderTo&&d.parentNode&&(Array.prototype.forEach.call(d.parentNode.childNodes,function(b){b.hasAttribute("aria-hidden")||b.setAttribute("aria-hidden",!0)}),p(e,d.parentNode))}var l=a.stripHTMLTagsFromString,g=h.defined,x=h.find,k=h.fireEvent;return{getChartTitle:function(e){return l(e.options.title.text||e.langFormat("accessibility.defaultChartTitle",{chart:e}))},getAxisDescription:function(e){return l(e&&
(e.userOptions&&e.userOptions.accessibility&&e.userOptions.accessibility.description||e.axisTitle&&e.axisTitle.textStr||e.options.id||e.categories&&"categories"||e.dateTime&&"Time"||"values"))},getPointFromXY:function(e,d,b){for(var f=e.length,c;f--;)if(c=x(e[f].points||[],function(c){return c.x===d&&c.y===b}))return c},getSeriesFirstPointElement:m,getSeriesFromName:function(e,d){return d?(e.series||[]).filter(function(b){return b.name===d}):e.series},getSeriesA11yElement:n,unhideChartElementFromAT:p,
hideSeriesFromAT:function(e){(e=n(e))&&e.setAttribute("aria-hidden",!0)},scrollToPoint:function(e){var d=e.series.xAxis,b=e.series.yAxis,f=(null===d||void 0===d?0:d.scrollbar)?d:b;if((d=null===f||void 0===f?void 0:f.scrollbar)&&g(d.to)&&g(d.from)){b=d.to-d.from;if(g(f.dataMin)&&g(f.dataMax)){var c=f.toPixels(f.dataMin),w=f.toPixels(f.dataMax);e=(f.toPixels(e["xAxis"===f.coll?"x":"y"]||0)-c)/(w-c)}else e=0;d.updatePosition(e-b/2,e+b/2);k(d,"changed",{from:d.from,to:d.to,trigger:"scrollbar",DOMEvent:null})}}}});
r(a,"Accessibility/KeyboardNavigationHandler.js",[a["Core/Utilities.js"]],function(a){function m(a,m){this.chart=a;this.keyCodeMap=m.keyCodeMap||[];this.validate=m.validate;this.init=m.init;this.terminate=m.terminate;this.response={success:1,prev:2,next:3,noHandler:4,fail:5}}var q=a.find;m.prototype={run:function(a){var m=a.which||a.keyCode,l=this.response.noHandler,g=q(this.keyCodeMap,function(a){return-1<a[0].indexOf(m)});g?l=g[1].call(this,m,a):9===m&&(l=this.response[a.shiftKey?"prev":"next"]);
return l}};return m});r(a,"Accessibility/Utils/EventProvider.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,h){var m=h.addEvent;h=h.extend;var n=function(){this.eventRemovers=[]};h(n.prototype,{addEvent:function(){var h=m.apply(a,arguments);this.eventRemovers.push(h);return h},removeAddedEvents:function(){this.eventRemovers.forEach(function(a){a()});this.eventRemovers=[]}});return n});r(a,"Accessibility/Utils/DOMElementProvider.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Accessibility/Utils/HTMLUtilities.js"]],
function(a,h,q){var m=a.win.document;a=h.extend;var p=q.removeElement;q=function(){this.elements=[]};a(q.prototype,{createElement:function(){var a=m.createElement.apply(m,arguments);this.elements.push(a);return a},destroyCreatedElements:function(){this.elements.forEach(function(a){p(a)});this.elements=[]}});return q});r(a,"Accessibility/AccessibilityComponent.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Accessibility/Utils/HTMLUtilities.js"],a["Accessibility/Utils/ChartUtilities.js"],a["Accessibility/Utils/EventProvider.js"],
a["Accessibility/Utils/DOMElementProvider.js"]],function(a,h,q,n,p,l){function g(){}var m=a.win,k=m.document;a=h.extend;var e=h.fireEvent,d=h.merge,b=q.removeElement,f=q.getFakeMouseEvent,c=n.unhideChartElementFromAT;g.prototype={initBase:function(b){this.chart=b;this.eventProvider=new p;this.domElementProvider=new l;this.keyCodes={left:37,right:39,up:38,down:40,enter:13,space:32,esc:27,tab:9}},addEvent:function(){return this.eventProvider.addEvent.apply(this.eventProvider,arguments)},createElement:function(){return this.domElementProvider.createElement.apply(this.domElementProvider,
arguments)},fireEventOnWrappedOrUnwrappedElement:function(b,c){var d=c.type;k.createEvent&&(b.dispatchEvent||b.fireEvent)?b.dispatchEvent?b.dispatchEvent(c):b.fireEvent(d,c):e(b,d,c)},fakeClickEvent:function(b){if(b){var c=f("click");this.fireEventOnWrappedOrUnwrappedElement(b,c)}},addProxyGroup:function(b){this.createOrUpdateProxyContainer();var c=this.createElement("div");Object.keys(b||{}).forEach(function(d){null!==b[d]&&c.setAttribute(d,b[d])});this.chart.a11yProxyContainer.appendChild(c);return c},
createOrUpdateProxyContainer:function(){var b=this.chart,c=b.renderer.box;b.a11yProxyContainer=b.a11yProxyContainer||this.createProxyContainerElement();c.nextSibling!==b.a11yProxyContainer&&b.container.insertBefore(b.a11yProxyContainer,c.nextSibling)},createProxyContainerElement:function(){var b=k.createElement("div");b.className="highcharts-a11y-proxy-container";return b},createProxyButton:function(b,f,a,e,k){var w=b.element,t=this.createElement("button"),l=d({"aria-label":w.getAttribute("aria-label")},
a);Object.keys(l).forEach(function(b){null!==l[b]&&t.setAttribute(b,l[b])});t.className="highcharts-a11y-proxy-button";k&&this.addEvent(t,"click",k);this.setProxyButtonStyle(t);this.updateProxyButtonPosition(t,e||b);this.proxyMouseEventsForButton(w,t);f.appendChild(t);l["aria-hidden"]||c(this.chart,t);return t},getElementPosition:function(b){var c=b.element;return(b=this.chart.renderTo)&&c&&c.getBoundingClientRect?(c=c.getBoundingClientRect(),b=b.getBoundingClientRect(),{x:c.left-b.left,y:c.top-b.top,
width:c.right-c.left,height:c.bottom-c.top}):{x:0,y:0,width:1,height:1}},setProxyButtonStyle:function(b){d(!0,b.style,{"border-width":0,"background-color":"transparent",cursor:"pointer",outline:"none",opacity:.001,filter:"alpha(opacity=1)","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=1)",zIndex:999,overflow:"hidden",padding:0,margin:0,display:"block",position:"absolute"})},updateProxyButtonPosition:function(b,c){c=this.getElementPosition(c);d(!0,b.style,{width:(c.width||1)+"px",height:(c.height||
1)+"px",left:(c.x||0)+"px",top:(c.y||0)+"px"})},proxyMouseEventsForButton:function(b,c){var d=this;"click touchstart touchend touchcancel touchmove mouseover mouseenter mouseleave mouseout".split(" ").forEach(function(f){var a=0===f.indexOf("touch");d.addEvent(c,f,function(c){var f=a?d.cloneTouchEvent(c):d.cloneMouseEvent(c);b&&d.fireEventOnWrappedOrUnwrappedElement(b,f);c.stopPropagation();c.preventDefault()})})},cloneMouseEvent:function(b){if("function"===typeof m.MouseEvent)return new m.MouseEvent(b.type,
b);if(k.createEvent){var c=k.createEvent("MouseEvent");if(c.initMouseEvent)return c.initMouseEvent(b.type,b.bubbles,b.cancelable,b.view||m,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget),c}return f(b.type)},cloneTouchEvent:function(b){var c=function(b){for(var c=[],d=0;d<b.length;++d){var f=b.item(d);f&&c.push(f)}return c};if("function"===typeof m.TouchEvent)return c=new m.TouchEvent(b.type,{touches:c(b.touches),targetTouches:c(b.targetTouches),
changedTouches:c(b.changedTouches),ctrlKey:b.ctrlKey,shiftKey:b.shiftKey,altKey:b.altKey,metaKey:b.metaKey,bubbles:b.bubbles,cancelable:b.cancelable,composed:b.composed,detail:b.detail,view:b.view}),b.defaultPrevented&&c.preventDefault(),c;c=this.cloneMouseEvent(b);c.touches=b.touches;c.changedTouches=b.changedTouches;c.targetTouches=b.targetTouches;return c},destroyBase:function(){b(this.chart.a11yProxyContainer);this.domElementProvider.destroyCreatedElements();this.eventProvider.removeAddedEvents()}};
a(g.prototype,{init:function(){},getKeyboardNavigation:function(){},onChartUpdate:function(){},onChartRender:function(){},destroy:function(){}});return g});r(a,"Accessibility/KeyboardNavigation.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Accessibility/Utils/HTMLUtilities.js"],a["Accessibility/Utils/EventProvider.js"]],function(a,h,q,n){function m(d,b){this.init(d,b)}var l=a.doc,g=a.win,x=h.addEvent,k=h.fireEvent,e=q.getElement;x(l,"keydown",function(d){27===(d.which||d.keyCode)&&a.charts&&
a.charts.forEach(function(b){b&&b.dismissPopupContent&&b.dismissPopupContent()})});a.Chart.prototype.dismissPopupContent=function(){var d=this;k(this,"dismissPopupContent",{},function(){d.tooltip&&d.tooltip.hide(0);d.hideExportMenu()})};m.prototype={init:function(d,b){var f=this,c=this.eventProvider=new n;this.chart=d;this.components=b;this.modules=[];this.currentModuleIx=0;this.update();c.addEvent(this.tabindexContainer,"keydown",function(b){return f.onKeydown(b)});c.addEvent(this.tabindexContainer,
"focus",function(b){return f.onFocus(b)});c.addEvent(l,"mouseup",function(){return f.onMouseUp()});c.addEvent(d.renderTo,"mousedown",function(){f.isClickingChart=!0});c.addEvent(d.renderTo,"mouseover",function(){f.pointerIsOverChart=!0});c.addEvent(d.renderTo,"mouseout",function(){f.pointerIsOverChart=!1});this.modules.length&&this.modules[0].init(1)},update:function(d){var b=this.chart.options.accessibility;b=b&&b.keyboardNavigation;var f=this.components;this.updateContainerTabindex();b&&b.enabled&&
d&&d.length?(this.modules=d.reduce(function(b,d){d=f[d].getKeyboardNavigation();return b.concat(d)},[]),this.updateExitAnchor()):(this.modules=[],this.currentModuleIx=0,this.removeExitAnchor())},onFocus:function(d){var b,f=this.chart;d=d.relatedTarget&&f.container.contains(d.relatedTarget);this.isClickingChart||d||(null===(b=this.modules[0])||void 0===b?void 0:b.init(1))},onMouseUp:function(){delete this.isClickingChart;if(!this.keyboardReset&&!this.pointerIsOverChart){var d=this.chart,b=this.modules&&
this.modules[this.currentModuleIx||0];b&&b.terminate&&b.terminate();d.focusElement&&d.focusElement.removeFocusBorder();this.currentModuleIx=0;this.keyboardReset=!0}},onKeydown:function(d){d=d||g.event;var b,f=this.modules&&this.modules.length&&this.modules[this.currentModuleIx];this.keyboardReset=!1;if(f){var c=f.run(d);c===f.response.success?b=!0:c===f.response.prev?b=this.prev():c===f.response.next&&(b=this.next());b&&(d.preventDefault(),d.stopPropagation())}},prev:function(){return this.move(-1)},
next:function(){return this.move(1)},move:function(d){var b=this.modules&&this.modules[this.currentModuleIx];b&&b.terminate&&b.terminate(d);this.chart.focusElement&&this.chart.focusElement.removeFocusBorder();this.currentModuleIx+=d;if(b=this.modules&&this.modules[this.currentModuleIx]){if(b.validate&&!b.validate())return this.move(d);if(b.init)return b.init(d),!0}this.currentModuleIx=0;0<d?(this.exiting=!0,this.exitAnchor.focus()):this.tabindexContainer.focus();return!1},updateExitAnchor:function(){var d=
e("highcharts-end-of-chart-marker-"+this.chart.index);this.removeExitAnchor();d?(this.makeElementAnExitAnchor(d),this.exitAnchor=d):this.createExitAnchor()},updateContainerTabindex:function(){var d=this.chart.options.accessibility;d=d&&d.keyboardNavigation;d=!(d&&!1===d.enabled);var b=this.chart,f=b.container;b.renderTo.hasAttribute("tabindex")&&(f.removeAttribute("tabindex"),f=b.renderTo);this.tabindexContainer=f;var c=f.getAttribute("tabindex");d&&!c?f.setAttribute("tabindex","0"):d||b.container.removeAttribute("tabindex")},
makeElementAnExitAnchor:function(d){var b=this.tabindexContainer.getAttribute("tabindex")||0;d.setAttribute("class","highcharts-exit-anchor");d.setAttribute("tabindex",b);d.setAttribute("aria-hidden",!1);this.addExitAnchorEventsToEl(d)},createExitAnchor:function(){var d=this.chart,b=this.exitAnchor=l.createElement("div");d.renderTo.appendChild(b);this.makeElementAnExitAnchor(b)},removeExitAnchor:function(){this.exitAnchor&&this.exitAnchor.parentNode&&(this.exitAnchor.parentNode.removeChild(this.exitAnchor),
delete this.exitAnchor)},addExitAnchorEventsToEl:function(d){var b=this.chart,f=this;this.eventProvider.addEvent(d,"focus",function(c){c=c||g.event;c.relatedTarget&&b.container.contains(c.relatedTarget)||f.exiting?f.exiting=!1:(f.tabindexContainer.focus(),c.preventDefault(),f.modules&&f.modules.length&&(f.currentModuleIx=f.modules.length-1,(c=f.modules[f.currentModuleIx])&&c.validate&&!c.validate()?f.prev():c&&c.init(-1)))})},destroy:function(){this.removeExitAnchor();this.eventProvider.removeAddedEvents();
this.chart.container.removeAttribute("tabindex")}};return m});r(a,"Accessibility/Components/LegendComponent.js",[a["Core/Globals.js"],a["Core/Legend.js"],a["Core/Utilities.js"],a["Accessibility/AccessibilityComponent.js"],a["Accessibility/KeyboardNavigationHandler.js"],a["Accessibility/Utils/HTMLUtilities.js"]],function(a,h,q,n,p,l){function g(b){var c=b.legend&&b.legend.allItems,d=b.options.legend.accessibility||{};return!(!c||!c.length||b.colorAxis&&b.colorAxis.length||!1===d.enabled)}var m=q.addEvent,
k=q.extend,e=q.find,d=q.fireEvent,b=l.stripHTMLTagsFromString,f=l.removeElement;a.Chart.prototype.highlightLegendItem=function(b){var c=this.legend.allItems,a=this.highlightedLegendItemIx;if(c[b]){c[a]&&d(c[a].legendGroup.element,"mouseout");a=this.legend;var f=a.allItems[b].pageIx,e=a.currentPage;"undefined"!==typeof f&&f+1!==e&&a.scroll(1+f-e);this.setFocusToElement(c[b].legendItem,c[b].a11yProxyElement);d(c[b].legendGroup.element,"mouseover");return!0}return!1};m(h,"afterColorizeItem",function(b){var c=
b.item;this.chart.options.accessibility.enabled&&c&&c.a11yProxyElement&&c.a11yProxyElement.setAttribute("aria-pressed",b.visible?"false":"true")});a=function(){};a.prototype=new n;k(a.prototype,{init:function(){var b=this;this.proxyElementsList=[];this.recreateProxies();this.addEvent(h,"afterScroll",function(){this.chart===b.chart&&(b.updateProxiesPositions(),b.updateLegendItemProxyVisibility(),this.chart.highlightLegendItem(b.highlightedLegendItemIx))});this.addEvent(h,"afterPositionItem",function(c){this.chart===
b.chart&&this.chart.renderer&&b.updateProxyPositionForItem(c.item)})},updateLegendItemProxyVisibility:function(){var b=this.chart.legend,d=b.currentPage||1,a=b.clipHeight||0;(b.allItems||[]).forEach(function(c){var f=c.pageIx||0,e=c._legendItemPos?c._legendItemPos[1]:0,k=c.legendItem?Math.round(c.legendItem.getBBox().height):0;f=e+k-b.pages[f]>a||f!==d-1;c.a11yProxyElement&&(c.a11yProxyElement.style.visibility=f?"hidden":"visible")})},onChartRender:function(){g(this.chart)?this.updateProxiesPositions():
this.removeProxies()},updateProxiesPositions:function(){for(var b=0,d=this.proxyElementsList;b<d.length;b++){var a=d[b];this.updateProxyButtonPosition(a.element,a.posElement)}},updateProxyPositionForItem:function(b){var c=e(this.proxyElementsList,function(c){return c.item===b});c&&this.updateProxyButtonPosition(c.element,c.posElement)},recreateProxies:function(){this.removeProxies();g(this.chart)&&(this.addLegendProxyGroup(),this.proxyLegendItems(),this.updateLegendItemProxyVisibility())},removeProxies:function(){f(this.legendProxyGroup);
this.proxyElementsList=[]},addLegendProxyGroup:function(){var b=this.chart.options.accessibility,d=this.chart.langFormat("accessibility.legend.legendLabel",{});this.legendProxyGroup=this.addProxyGroup({"aria-label":d,role:"all"===b.landmarkVerbosity?"region":null})},proxyLegendItems:function(){var b=this;(this.chart.legend&&this.chart.legend.allItems||[]).forEach(function(c){c.legendItem&&c.legendItem.element&&b.proxyLegendItem(c)})},proxyLegendItem:function(c){if(c.legendItem&&c.legendGroup){var d=
this.chart.langFormat("accessibility.legend.legendItem",{chart:this.chart,itemName:b(c.name)}),a=c.legendGroup.div?c.legendItem:c.legendGroup;c.a11yProxyElement=this.createProxyButton(c.legendItem,this.legendProxyGroup,{tabindex:-1,"aria-pressed":!c.visible,"aria-label":d},a);this.proxyElementsList.push({item:c,element:c.a11yProxyElement,posElement:a})}},getKeyboardNavigation:function(){var b=this.keyCodes,d=this;return new p(this.chart,{keyCodeMap:[[[b.left,b.right,b.up,b.down],function(b){return d.onKbdArrowKey(this,
b)}],[[b.enter,b.space],function(){return d.onKbdClick(this)}]],validate:function(){return d.shouldHaveLegendNavigation()},init:function(b){return d.onKbdNavigationInit(b)}})},onKbdArrowKey:function(b,d){var c=this.keyCodes,a=b.response,f=this.chart,e=f.options.accessibility,k=f.legend.allItems.length;d=d===c.left||d===c.up?-1:1;return f.highlightLegendItem(this.highlightedLegendItemIx+d)?(this.highlightedLegendItemIx+=d,a.success):1<k&&e.keyboardNavigation.wrapAround?(b.init(d),a.success):a[0<d?
"next":"prev"]},onKbdClick:function(b){var c=this.chart.legend.allItems[this.highlightedLegendItemIx];c&&c.a11yProxyElement&&d(c.a11yProxyElement,"click");return b.response.success},shouldHaveLegendNavigation:function(){var b=this.chart,d=b.colorAxis&&b.colorAxis.length,a=(b.options.legend||{}).accessibility||{};return!!(b.legend&&b.legend.allItems&&b.legend.display&&!d&&a.enabled&&a.keyboardNavigation&&a.keyboardNavigation.enabled)},onKbdNavigationInit:function(b){var c=this.chart,d=c.legend.allItems.length-
1;b=0<b?0:d;c.highlightLegendItem(b);this.highlightedLegendItemIx=b}});return a});r(a,"Accessibility/Components/MenuComponent.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Accessibility/AccessibilityComponent.js"],a["Accessibility/KeyboardNavigationHandler.js"],a["Accessibility/Utils/ChartUtilities.js"],a["Accessibility/Utils/HTMLUtilities.js"]],function(a,h,q,n,p,l){function g(d){return d.exportSVGElements&&d.exportSVGElements[0]}h=h.extend;var m=p.unhideChartElementFromAT,k=l.removeElement,
e=l.getFakeMouseEvent;a.Chart.prototype.showExportMenu=function(){var d=g(this);if(d&&(d=d.element,d.onclick))d.onclick(e("click"))};a.Chart.prototype.hideExportMenu=function(){var d=this.exportDivElements;d&&this.exportContextMenu&&(d.forEach(function(b){if("highcharts-menu-item"===b.className&&b.onmouseout)b.onmouseout(e("mouseout"))}),this.highlightedExportItemIx=0,this.exportContextMenu.hideMenu(),this.container.focus())};a.Chart.prototype.highlightExportItem=function(d){var b=this.exportDivElements&&
this.exportDivElements[d],a=this.exportDivElements&&this.exportDivElements[this.highlightedExportItemIx];if(b&&"LI"===b.tagName&&(!b.children||!b.children.length)){var c=!!(this.renderTo.getElementsByTagName("g")[0]||{}).focus;b.focus&&c&&b.focus();if(a&&a.onmouseout)a.onmouseout(e("mouseout"));if(b.onmouseover)b.onmouseover(e("mouseover"));this.highlightedExportItemIx=d;return!0}return!1};a.Chart.prototype.highlightLastExportItem=function(){var d;if(this.exportDivElements)for(d=this.exportDivElements.length;d--;)if(this.highlightExportItem(d))return!0;
return!1};a=function(){};a.prototype=new q;h(a.prototype,{init:function(){var d=this.chart,b=this;this.addEvent(d,"exportMenuShown",function(){b.onMenuShown()});this.addEvent(d,"exportMenuHidden",function(){b.onMenuHidden()})},onMenuHidden:function(){var d=this.chart.exportContextMenu;d&&d.setAttribute("aria-hidden","true");this.isExportMenuShown=!1;this.setExportButtonExpandedState("false")},onMenuShown:function(){var d=this.chart,b=d.exportContextMenu;b&&(this.addAccessibleContextMenuAttribs(),
m(d,b));this.isExportMenuShown=!0;this.setExportButtonExpandedState("true")},setExportButtonExpandedState:function(d){var b=this.exportButtonProxy;b&&b.setAttribute("aria-expanded",d)},onChartRender:function(){var d=this.chart,b=d.options.accessibility;k(this.exportProxyGroup);var a=d.options.exporting,c=g(d);a&&!1!==a.enabled&&a.accessibility&&a.accessibility.enabled&&c&&c.element&&(this.exportProxyGroup=this.addProxyGroup("all"===b.landmarkVerbosity?{"aria-label":d.langFormat("accessibility.exporting.exportRegionLabel",
{chart:d}),role:"region"}:{}),b=g(this.chart),this.exportButtonProxy=this.createProxyButton(b,this.exportProxyGroup,{"aria-label":d.langFormat("accessibility.exporting.menuButtonLabel",{chart:d}),"aria-expanded":"false"}))},addAccessibleContextMenuAttribs:function(){var d=this.chart,b=d.exportDivElements;b&&b.length&&(b.forEach(function(b){"LI"!==b.tagName||b.children&&b.children.length?b.setAttribute("aria-hidden","true"):b.setAttribute("tabindex",-1)}),b=b[0].parentNode,b.removeAttribute("aria-hidden"),
b.setAttribute("aria-label",d.langFormat("accessibility.exporting.chartMenuLabel",{chart:d})))},getKeyboardNavigation:function(){var d=this.keyCodes,b=this.chart,a=this;return new n(b,{keyCodeMap:[[[d.left,d.up],function(){return a.onKbdPrevious(this)}],[[d.right,d.down],function(){return a.onKbdNext(this)}],[[d.enter,d.space],function(){return a.onKbdClick(this)}]],validate:function(){return b.exportChart&&!1!==b.options.exporting.enabled&&!1!==b.options.exporting.accessibility.enabled},init:function(){var c=
a.exportButtonProxy,d=b.exportingGroup;d&&c&&b.setFocusToElement(d,c)},terminate:function(){b.hideExportMenu()}})},onKbdPrevious:function(d){var b=this.chart,a=b.options.accessibility;d=d.response;for(var c=b.highlightedExportItemIx||0;c--;)if(b.highlightExportItem(c))return d.success;return a.keyboardNavigation.wrapAround?(b.highlightLastExportItem(),d.success):d.prev},onKbdNext:function(d){var b=this.chart,a=b.options.accessibility;d=d.response;for(var c=(b.highlightedExportItemIx||0)+1;c<b.exportDivElements.length;++c)if(b.highlightExportItem(c))return d.success;
return a.keyboardNavigation.wrapAround?(b.highlightExportItem(0),d.success):d.next},onKbdClick:function(d){var b=this.chart,a=b.exportDivElements[b.highlightedExportItemIx],c=g(b).element;this.isExportMenuShown?this.fakeClickEvent(a):(this.fakeClickEvent(c),b.highlightExportItem(0));return d.response.success}});return a});r(a,"Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js",[a["Core/Chart/Chart.js"],a["Core/Globals.js"],a["Core/Series/Point.js"],a["Core/Utilities.js"],a["Accessibility/KeyboardNavigationHandler.js"],
a["Accessibility/Utils/EventProvider.js"],a["Accessibility/Utils/ChartUtilities.js"]],function(a,h,q,n,p,l,g){function m(b){var c=b.index,d=b.series.points,a=d.length;if(d[c]!==b)for(;a--;){if(d[a]===b)return a}else return c}function k(b){var c=b.chart.options.accessibility.keyboardNavigation.seriesNavigation,d=b.options.accessibility||{},a=d.keyboardNavigation;return a&&!1===a.enabled||!1===d.enabled||!1===b.options.enableMouseTracking||!b.visible||c.pointNavigationEnabledThreshold&&c.pointNavigationEnabledThreshold<=
b.points.length}function e(b){var c=b.series.chart.options.accessibility;return b.isNull&&c.keyboardNavigation.seriesNavigation.skipNullPoints||!1===b.visible||k(b.series)}function d(b,d,a,e){var f=Infinity,k=d.points.length,l=function(b){return!(c(b.plotX)&&c(b.plotY))};if(!l(b)){for(;k--;){var t=d.points[k];if(!l(t)&&(t=(b.plotX-t.plotX)*(b.plotX-t.plotX)*(a||1)+(b.plotY-t.plotY)*(b.plotY-t.plotY)*(e||1),t<f)){f=t;var g=k}}return c(g)?d.points[g]:void 0}}function b(b){var c=!1;delete b.highlightedPoint;
return c=b.series.reduce(function(b,c){return b||c.highlightFirstValidPoint()},!1)}function f(b,c){this.keyCodes=c;this.chart=b}var c=n.defined;n=n.extend;var w=g.getPointFromXY,A=g.getSeriesFromName,z=g.scrollToPoint;h.Series.prototype.keyboardMoveVertical=!0;["column","pie"].forEach(function(b){h.seriesTypes[b]&&(h.seriesTypes[b].prototype.keyboardMoveVertical=!1)});q.prototype.highlight=function(){var b=this.series.chart;if(this.isNull)b.tooltip&&b.tooltip.hide(0);else this.onMouseOver();z(this);
this.graphic&&b.setFocusToElement(this.graphic);b.highlightedPoint=this;return this};a.prototype.highlightAdjacentPoint=function(b){var c=this.series,d=this.highlightedPoint,a=d&&m(d)||0,f=d&&d.series.points,v=this.series&&this.series[this.series.length-1];v=v&&v.points&&v.points[v.points.length-1];if(!c[0]||!c[0].points)return!1;if(d){if(c=c[d.series.index+(b?1:-1)],a=f[a+(b?1:-1)],!a&&c&&(a=c.points[b?0:c.points.length-1]),!a)return!1}else a=b?c[0].points[0]:v;return e(a)?(c=a.series,k(c)?this.highlightedPoint=
b?c.points[c.points.length-1]:c.points[0]:this.highlightedPoint=a,this.highlightAdjacentPoint(b)):a.highlight()};h.Series.prototype.highlightFirstValidPoint=function(){var b=this.chart.highlightedPoint,c=(b&&b.series)===this?m(b):0;b=this.points;var d=b.length;if(b&&d){for(var a=c;a<d;++a)if(!e(b[a]))return b[a].highlight();for(;0<=c;--c)if(!e(b[c]))return b[c].highlight()}return!1};a.prototype.highlightAdjacentSeries=function(b){var c,a=this.highlightedPoint;var f=(c=this.series&&this.series[this.series.length-
1])&&c.points&&c.points[c.points.length-1];if(!this.highlightedPoint)return c=b?this.series&&this.series[0]:c,(f=b?c&&c.points&&c.points[0]:f)?f.highlight():!1;c=this.series[a.series.index+(b?-1:1)];if(!c)return!1;f=d(a,c,4);if(!f)return!1;if(k(c))return f.highlight(),b=this.highlightAdjacentSeries(b),b?b:(a.highlight(),!1);f.highlight();return f.series.highlightFirstValidPoint()};a.prototype.highlightAdjacentPointVertical=function(b){var a=this.highlightedPoint,d=Infinity,f;if(!c(a.plotX)||!c(a.plotY))return!1;
this.series.forEach(function(l){k(l)||l.points.forEach(function(k){if(c(k.plotY)&&c(k.plotX)&&k!==a){var v=k.plotY-a.plotY,g=Math.abs(k.plotX-a.plotX);g=Math.abs(v)*Math.abs(v)+g*g*4;l.yAxis&&l.yAxis.reversed&&(v*=-1);!(0>=v&&b||0<=v&&!b||5>g||e(k))&&g<d&&(d=g,f=k)}})});return f?f.highlight():!1};n(f.prototype,{init:function(){var c=this,a=this.chart,d=this.eventProvider=new l;d.addEvent(h.Series,"destroy",function(){return c.onSeriesDestroy(this)});d.addEvent(a,"afterDrilldown",function(){b(this);
this.focusElement&&this.focusElement.removeFocusBorder()});d.addEvent(a,"drilldown",function(b){b=b.point;var a=b.series;c.lastDrilledDownPoint={x:b.x,y:b.y,seriesName:a?a.name:""}});d.addEvent(a,"drillupall",function(){setTimeout(function(){c.onDrillupAll()},10)})},onDrillupAll:function(){var b=this.lastDrilledDownPoint,a=this.chart,d=b&&A(a,b.seriesName),f;b&&d&&c(b.x)&&c(b.y)&&(f=w(d,b.x,b.y));a.container&&a.container.focus();f&&f.highlight&&f.highlight();a.focusElement&&a.focusElement.removeFocusBorder()},
getKeyboardNavigationHandler:function(){var b=this,c=this.keyCodes,a=this.chart,d=a.inverted;return new p(a,{keyCodeMap:[[d?[c.up,c.down]:[c.left,c.right],function(c){return b.onKbdSideways(this,c)}],[d?[c.left,c.right]:[c.up,c.down],function(c){return b.onKbdVertical(this,c)}],[[c.enter,c.space],function(){a.highlightedPoint&&a.highlightedPoint.firePointEvent("click");return this.response.success}]],init:function(c){return b.onHandlerInit(this,c)},terminate:function(){return b.onHandlerTerminate()}})},
onKbdSideways:function(b,c){var a=this.keyCodes;return this.attemptHighlightAdjacentPoint(b,c===a.right||c===a.down)},onKbdVertical:function(b,c){var a=this.chart,d=this.keyCodes;c=c===d.down||c===d.right;d=a.options.accessibility.keyboardNavigation.seriesNavigation;if(d.mode&&"serialize"===d.mode)return this.attemptHighlightAdjacentPoint(b,c);a[a.highlightedPoint&&a.highlightedPoint.series.keyboardMoveVertical?"highlightAdjacentPointVertical":"highlightAdjacentSeries"](c);return b.response.success},
onHandlerInit:function(c,a){var d=this.chart;if(0<a)b(d);else{a=d.series.length;for(var f;a--&&!(d.highlightedPoint=d.series[a].points[d.series[a].points.length-1],f=d.series[a].highlightFirstValidPoint()););}return c.response.success},onHandlerTerminate:function(){var b,c,a=this.chart,d=a.highlightedPoint;null===(b=a.tooltip)||void 0===b?void 0:b.hide(0);null===(c=null===d||void 0===d?void 0:d.onMouseOut)||void 0===c?void 0:c.call(d);delete a.highlightedPoint},attemptHighlightAdjacentPoint:function(b,
c){var a=this.chart,d=a.options.accessibility.keyboardNavigation.wrapAround;return a.highlightAdjacentPoint(c)?b.response.success:d?b.init(c?1:-1):b.response[c?"next":"prev"]},onSeriesDestroy:function(b){var c=this.chart;c.highlightedPoint&&c.highlightedPoint.series===b&&(delete c.highlightedPoint,c.focusElement&&c.focusElement.removeFocusBorder())},destroy:function(){this.eventProvider.removeAddedEvents()}});return f});r(a,"Accessibility/Components/AnnotationsA11y.js",[a["Accessibility/Utils/HTMLUtilities.js"]],
function(a){function m(a){return(a.annotations||[]).reduce(function(a,e){var d;!1!==(null===(d=e.options)||void 0===d?void 0:d.visible)&&(a=a.concat(e.labels));return a},[])}function q(a){var k,e,d,b,f=null===(e=null===(k=a.options)||void 0===k?void 0:k.accessibility)||void 0===e?void 0:e.description;return f?f:(null===(b=null===(d=a.graphic)||void 0===d?void 0:d.text)||void 0===b?void 0:b.textStr)||""}function n(a){var k,e,d=null===(e=null===(k=a.options)||void 0===k?void 0:k.accessibility)||void 0===
e?void 0:e.description;if(d)return d;k=a.chart;e=q(a);d=a.points.filter(function(b){return!!b.graphic}).map(function(b){var c,a;if(!(a=null===(c=null===b||void 0===b?void 0:b.accessibility)||void 0===c?void 0:c.valueDescription)){var d,f;a=(null===(f=null===(d=null===b||void 0===b?void 0:b.graphic)||void 0===d?void 0:d.element)||void 0===f?void 0:f.getAttribute("aria-label"))||""}b=(null===b||void 0===b?void 0:b.series.name)||"";return(b?b+", ":"")+"data point "+a}).filter(function(b){return!!b});
var b=d.length;a="accessibility.screenReaderSection.annotations.description"+(1<b?"MultiplePoints":b?"SinglePoint":"NoPoints");e={annotationText:e,numPoints:b,annotationPoint:d[0],additionalAnnotationPoints:d.slice(1)};return k.langFormat(a,e)}function p(a){return m(a).map(function(a){return(a=l(g(n(a))))?"<li>"+a+"</li>":""})}var l=a.escapeStringForHTML,g=a.stripHTMLTagsFromString;return{getAnnotationsInfoHTML:function(a){var k=a.annotations;return k&&k.length?"<ul>"+p(a).join(" ")+"</ul>":""},getAnnotationLabelDescription:n,
getAnnotationListItems:p,getPointAnnotationTexts:function(a){var k=m(a.series.chart).filter(function(e){return-1<e.points.indexOf(a)});return k.length?k.map(function(a){return""+q(a)}):[]}}});r(a,"Accessibility/Components/SeriesComponent/SeriesDescriber.js",[a["Core/Utilities.js"],a["Accessibility/Components/AnnotationsA11y.js"],a["Accessibility/Utils/HTMLUtilities.js"],a["Accessibility/Utils/ChartUtilities.js"],a["Core/Tooltip.js"]],function(a,h,q,n,p){function l(b){var c=b.index;return b.series&&
b.series.data&&D(c)?C(b.series.data,function(b){return!!(b&&"undefined"!==typeof b.index&&b.index>c&&b.graphic&&b.graphic.element)})||null:null}function g(b){var c=b.chart.options.accessibility.series.pointDescriptionEnabledThreshold;return!!(!1!==c&&b.points&&b.points.length>=c)}function m(b){var c=b.options.accessibility||{};return!g(b)&&!c.exposeAsGroupOnly}function k(b){var c=b.chart.options.accessibility.keyboardNavigation.seriesNavigation;return!(!b.points||!(b.points.length<c.pointNavigationEnabledThreshold||
!1===c.pointNavigationEnabledThreshold))}function e(b,c){var a=b.series.chart,d=a.options.accessibility.point||{};b=b.series.tooltipOptions||{};a=a.options.lang;return v(c)?I(c,d.valueDecimals||b.valueDecimals||-1,a.decimalPoint,a.accessibility.thousandsSep||a.thousandsSep):c}function d(b){var c=(b.options.accessibility||{}).description;return c&&b.chart.langFormat("accessibility.series.description",{description:c,series:b})||""}function b(b,c){return b.chart.langFormat("accessibility.series."+c+
"Description",{name:J(b[c]),series:b})}function f(b){var c=b.series,a=c.chart,d=a.options.accessibility.point||{};if(c.xAxis&&c.xAxis.dateTime)return c=p.prototype.getXDateFormat.call({getDateFormat:p.prototype.getDateFormat,chart:a},b,a.options.tooltip,c.xAxis),d=d.dateFormatter&&d.dateFormatter(b)||d.dateFormat||c,a.time.dateFormat(d,b.x,void 0)}function c(b){var c=f(b),a=(b.series.xAxis||{}).categories&&D(b.category)&&(""+b.category).replace("<br/>"," "),d=b.id&&0>b.id.indexOf("highcharts-"),e=
"x, "+b.x;return b.name||c||a||(d?b.id:e)}function w(b,c,a){var d=c||"",f=a||"";return b.series.pointArrayMap.reduce(function(c,a){c+=c.length?", ":"";var k=e(b,y(b[a],b.options[a]));return c+(a+": "+d+k+f)},"")}function A(b){var c=b.series,a=c.chart.options.accessibility.point||{},d=c.tooltipOptions||{},f=a.valuePrefix||d.valuePrefix||"";a=a.valueSuffix||d.valueSuffix||"";d=e(b,b["undefined"!==typeof b.value?"value":"y"]);return b.isNull?c.chart.langFormat("accessibility.series.nullPointValue",{point:b}):
c.pointArrayMap?w(b,f,a):f+d+a}function z(b){var a=b.series,d=a.chart,f=d.options.accessibility.point.valueDescriptionFormat,e=(a=y(a.xAxis&&a.xAxis.options.accessibility&&a.xAxis.options.accessibility.enabled,!d.angular))?c(b):"";b={point:b,index:D(b.index)?b.index+1:"",xDescription:e,value:A(b),separator:a?", ":""};return u(f,b,d)}function t(b){var c=b.series,a=c.chart,d=z(b),f=b.options&&b.options.accessibility&&b.options.accessibility.description;f=f?" "+f:"";c=1<a.series.length&&c.name?" "+c.name+
".":"";a=b.series.chart;var e=H(b),k={point:b,annotations:e};a=e.length?a.langFormat("accessibility.series.pointAnnotationsDescription",k):"";b.accessibility=b.accessibility||{};b.accessibility.valueDescription=d;return d+f+c+(a?" "+a:"")}function r(b){var c=m(b),a=k(b);(c||a)&&b.points.forEach(function(b){var a;if(!(a=b.graphic&&b.graphic.element)&&(a=b.series&&b.series.is("sunburst"),a=b.isNull&&!a)){var d=b.series,f=l(b);d=(a=f&&f.graphic)?a.parentGroup:d.graph||d.group;f=f?{x:y(b.plotX,f.plotX,
0),y:y(b.plotY,f.plotY,0)}:{x:y(b.plotX,0),y:y(b.plotY,0)};f=b.series.chart.renderer.rect(f.x,f.y,1,1);f.attr({"class":"highcharts-a11y-dummy-point",fill:"none",opacity:0,"fill-opacity":0,"stroke-opacity":0});d&&d.element?(b.graphic=f,b.hasDummyGraphic=!0,f.add(d),d.element.insertBefore(f.element,a?a.element:null),a=f.element):a=void 0}a&&(a.setAttribute("tabindex","-1"),a.style.outline="0",c?(f=b.series,d=f.chart.options.accessibility.point||{},f=f.options.accessibility||{},b=F(G(f.pointDescriptionFormatter&&
f.pointDescriptionFormatter(b)||d.descriptionFormatter&&d.descriptionFormatter(b)||t(b))),a.setAttribute("role","img"),a.setAttribute("aria-label",b)):a.setAttribute("aria-hidden",!0))})}function B(a){var c=a.chart,f=c.types||[],e=d(a),k=function(b){return c[b]&&1<c[b].length&&a[b]},l=b(a,"xAxis"),v=b(a,"yAxis"),g={name:a.name||"",ix:a.index+1,numSeries:c.series&&c.series.length,numPoints:a.points&&a.points.length,series:a};f=1<f.length?"Combination":"";return(c.langFormat("accessibility.series.summary."+
a.type+f,g)||c.langFormat("accessibility.series.summary.default"+f,g))+(e?" "+e:"")+(k("yAxis")?" "+v:"")+(k("xAxis")?" "+l:"")}var C=a.find,u=a.format,v=a.isNumber,I=a.numberFormat,y=a.pick,D=a.defined,H=h.getPointAnnotationTexts,F=q.escapeStringForHTML,K=q.reverseChildNodes,G=q.stripHTMLTagsFromString,J=n.getAxisDescription,L=n.getSeriesFirstPointElement,M=n.getSeriesA11yElement,N=n.unhideChartElementFromAT;return{describeSeries:function(b){var a=b.chart,c=L(b),d=M(b),f=a.is3d&&a.is3d();if(d){d.lastChild!==
c||f||K(d);r(b);N(a,d);f=b.chart;a=f.options.chart||{};c=1<f.series.length;f=f.options.accessibility.series.describeSingleSeries;var e=(b.options.accessibility||{}).exposeAsGroupOnly;a.options3d&&a.options3d.enabled&&c||!(c||f||e||g(b))?d.setAttribute("aria-label",""):(a=b.chart.options.accessibility,c=a.landmarkVerbosity,(b.options.accessibility||{}).exposeAsGroupOnly?d.setAttribute("role","img"):"all"===c&&d.setAttribute("role","region"),d.setAttribute("tabindex","-1"),d.style.outline="0",d.setAttribute("aria-label",
F(G(a.series.descriptionFormatter&&a.series.descriptionFormatter(b)||B(b)))))}},defaultPointDescriptionFormatter:t,defaultSeriesDescriptionFormatter:B,getPointA11yTimeDescription:f,getPointXDescription:c,getPointValue:A,getPointValueDescription:z}});r(a,"Accessibility/Utils/Announcer.js",[a["Core/Globals.js"],a["Accessibility/Utils/DOMElementProvider.js"],a["Accessibility/Utils/HTMLUtilities.js"]],function(a,h,q){var m=q.visuallyHideElement;q=function(){function a(a,g){this.chart=a;this.domElementProvider=
new h;this.announceRegion=this.addAnnounceRegion(g)}a.prototype.destroy=function(){this.domElementProvider.destroyCreatedElements()};a.prototype.announce=function(a){var l=this;this.announceRegion.innerHTML=a;this.clearAnnouncementRegionTimer&&clearTimeout(this.clearAnnouncementRegionTimer);this.clearAnnouncementRegionTimer=setTimeout(function(){l.announceRegion.innerHTML="";delete l.clearAnnouncementRegionTimer},1E3)};a.prototype.addAnnounceRegion=function(a){var l=this.chart.renderTo,h=this.domElementProvider.createElement("div");
h.setAttribute("aria-hidden",!1);h.setAttribute("aria-live",a);m(h);l.insertBefore(h,l.firstChild);return h};return a}();return a.Announcer=q});r(a,"Accessibility/Components/SeriesComponent/NewDataAnnouncer.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Accessibility/Utils/ChartUtilities.js"],a["Accessibility/Components/SeriesComponent/SeriesDescriber.js"],a["Accessibility/Utils/Announcer.js"],a["Accessibility/Utils/EventProvider.js"]],function(a,h,q,n,p,l){function g(b){var a=b.series.data.filter(function(a){return b.x===
a.x&&b.y===a.y});return 1===a.length?a[0]:b}function m(b,a){var c=(b||[]).concat(a||[]).reduce(function(b,a){b[a.name+a.index]=a;return b},{});return Object.keys(c).map(function(b){return c[b]})}var k=h.extend,e=h.defined,d=q.getChartTitle,b=n.defaultPointDescriptionFormatter,f=n.defaultSeriesDescriptionFormatter;h=function(b){this.chart=b};k(h.prototype,{init:function(){var b=this.chart,a=b.options.accessibility.announceNewData.interruptUser?"assertive":"polite";this.lastAnnouncementTime=0;this.dirty=
{allSeries:{}};this.eventProvider=new l;this.announcer=new p(b,a);this.addEventListeners()},destroy:function(){this.eventProvider.removeAddedEvents();this.announcer.destroy()},addEventListeners:function(){var b=this,d=this.chart,f=this.eventProvider;f.addEvent(d,"afterDrilldown",function(){b.lastAnnouncementTime=0});f.addEvent(a.Series,"updatedData",function(){b.onSeriesUpdatedData(this)});f.addEvent(d,"afterAddSeries",function(a){b.onSeriesAdded(a.series)});f.addEvent(a.Series,"addPoint",function(a){b.onPointAdded(a.point)});
f.addEvent(d,"redraw",function(){b.announceDirtyData()})},onSeriesUpdatedData:function(b){var a=this.chart;b.chart===a&&a.options.accessibility.announceNewData.enabled&&(this.dirty.hasDirty=!0,this.dirty.allSeries[b.name+b.index]=b)},onSeriesAdded:function(b){this.chart.options.accessibility.announceNewData.enabled&&(this.dirty.hasDirty=!0,this.dirty.allSeries[b.name+b.index]=b,this.dirty.newSeries=e(this.dirty.newSeries)?void 0:b)},onPointAdded:function(b){var a=b.series.chart;this.chart===a&&a.options.accessibility.announceNewData.enabled&&
(this.dirty.newPoint=e(this.dirty.newPoint)?void 0:b)},announceDirtyData:function(){var b=this;if(this.chart.options.accessibility.announceNewData&&this.dirty.hasDirty){var a=this.dirty.newPoint;a&&(a=g(a));this.queueAnnouncement(Object.keys(this.dirty.allSeries).map(function(a){return b.dirty.allSeries[a]}),this.dirty.newSeries,a);this.dirty={allSeries:{}}}},queueAnnouncement:function(b,a,d){var c=this,f=this.chart.options.accessibility.announceNewData;if(f.enabled){var e=+new Date;f=Math.max(0,
f.minAnnounceInterval-(e-this.lastAnnouncementTime));b=m(this.queuedAnnouncement&&this.queuedAnnouncement.series,b);if(a=this.buildAnnouncementMessage(b,a,d))this.queuedAnnouncement&&clearTimeout(this.queuedAnnouncementTimer),this.queuedAnnouncement={time:e,message:a,series:b},this.queuedAnnouncementTimer=setTimeout(function(){c&&c.announcer&&(c.lastAnnouncementTime=+new Date,c.announcer.announce(c.queuedAnnouncement.message),delete c.queuedAnnouncement,delete c.queuedAnnouncementTimer)},f)}},buildAnnouncementMessage:function(c,
e,k){var l=this.chart,g=l.options.accessibility.announceNewData;if(g.announcementFormatter&&(c=g.announcementFormatter(c,e,k),!1!==c))return c.length?c:null;c=a.charts&&1<a.charts.length?"Multiple":"Single";c=e?"newSeriesAnnounce"+c:k?"newPointAnnounce"+c:"newDataAnnounce";g=d(l);return l.langFormat("accessibility.announceNewData."+c,{chartTitle:g,seriesDesc:e?f(e):null,pointDesc:k?b(k):null,point:k,series:e})}});return h});r(a,"Accessibility/Components/SeriesComponent/ForcedMarkers.js",[a["Core/Globals.js"],
a["Core/Utilities.js"]],function(a,h){function m(a){p(!0,a,{marker:{enabled:!0,states:{normal:{opacity:0}}}})}var n=h.addEvent,p=h.merge;return function(){n(a.Series,"render",function(){var a=this.options,g=!1!==(this.options.accessibility&&this.options.accessibility.enabled);if(g=this.chart.options.accessibility.enabled&&g)g=this.chart.options.accessibility,g=this.points.length<g.series.pointDescriptionEnabledThreshold||!1===g.series.pointDescriptionEnabledThreshold;if(g){if(a.marker&&!1===a.marker.enabled&&
(this.a11yMarkersForced=!0,m(this.options)),this._hasPointMarkers&&this.points&&this.points.length)for(a=this.points.length;a--;){g=this.points[a];var h=g.options;delete g.hasForcedA11yMarker;h.marker&&(h.marker.enabled?(p(!0,h.marker,{states:{normal:{opacity:h.marker.states&&h.marker.states.normal&&h.marker.states.normal.opacity||1}}}),g.hasForcedA11yMarker=!1):(m(h),g.hasForcedA11yMarker=!0))}}else this.a11yMarkersForced&&(delete this.a11yMarkersForced,(a=this.resetA11yMarkerOptions)&&p(!0,this.options,
{marker:{enabled:a.enabled,states:{normal:{opacity:a.states&&a.states.normal&&a.states.normal.opacity}}}}))});n(a.Series,"afterSetOptions",function(a){this.resetA11yMarkerOptions=p(a.options.marker||{},this.userOptions.marker||{})});n(a.Series,"afterRender",function(){if(this.chart.styledMode){if(this.markerGroup)this.markerGroup[this.a11yMarkersForced?"addClass":"removeClass"]("highcharts-a11y-markers-hidden");this._hasPointMarkers&&this.points&&this.points.length&&this.points.forEach(function(a){a.graphic&&
(a.graphic[a.hasForcedA11yMarker?"addClass":"removeClass"]("highcharts-a11y-marker-hidden"),a.graphic[!1===a.hasForcedA11yMarker?"addClass":"removeClass"]("highcharts-a11y-marker-visible"))})}})}});r(a,"Accessibility/Components/SeriesComponent/SeriesComponent.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Accessibility/AccessibilityComponent.js"],a["Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js"],a["Accessibility/Components/SeriesComponent/NewDataAnnouncer.js"],a["Accessibility/Components/SeriesComponent/ForcedMarkers.js"],
a["Accessibility/Utils/ChartUtilities.js"],a["Accessibility/Components/SeriesComponent/SeriesDescriber.js"],a["Core/Tooltip.js"]],function(a,h,q,n,p,l,g,x,k){h=h.extend;var e=g.hideSeriesFromAT,d=x.describeSeries;a.SeriesAccessibilityDescriber=x;l();a=function(){};a.prototype=new q;h(a.prototype,{init:function(){this.newDataAnnouncer=new p(this.chart);this.newDataAnnouncer.init();this.keyboardNavigation=new n(this.chart,this.keyCodes);this.keyboardNavigation.init();this.hideTooltipFromATWhenShown();
this.hideSeriesLabelsFromATWhenShown()},hideTooltipFromATWhenShown:function(){var b=this;this.addEvent(k,"refresh",function(){this.chart===b.chart&&this.label&&this.label.element&&this.label.element.setAttribute("aria-hidden",!0)})},hideSeriesLabelsFromATWhenShown:function(){this.addEvent(this.chart,"afterDrawSeriesLabels",function(){this.series.forEach(function(b){b.labelBySeries&&b.labelBySeries.attr("aria-hidden",!0)})})},onChartRender:function(){this.chart.series.forEach(function(b){!1!==(b.options.accessibility&&
b.options.accessibility.enabled)&&b.visible?d(b):e(b)})},getKeyboardNavigation:function(){return this.keyboardNavigation.getKeyboardNavigationHandler()},destroy:function(){this.newDataAnnouncer.destroy();this.keyboardNavigation.destroy()}});return a});r(a,"Accessibility/Components/ZoomComponent.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Accessibility/AccessibilityComponent.js"],a["Accessibility/KeyboardNavigationHandler.js"],a["Accessibility/Utils/ChartUtilities.js"],a["Accessibility/Utils/HTMLUtilities.js"]],
function(a,h,q,n,p,l){var g=h.extend,m=h.pick,k=p.unhideChartElementFromAT,e=l.setElAttrs,d=l.removeElement;a.Axis.prototype.panStep=function(b,a){var c=a||3;a=this.getExtremes();var d=(a.max-a.min)/c*b;c=a.max+d;d=a.min+d;var f=c-d;0>b&&d<a.dataMin?(d=a.dataMin,c=d+f):0<b&&c>a.dataMax&&(c=a.dataMax,d=c-f);this.setExtremes(d,c)};a=function(){};a.prototype=new q;g(a.prototype,{init:function(){var b=this,a=this.chart;["afterShowResetZoom","afterDrilldown","drillupall"].forEach(function(c){b.addEvent(a,
c,function(){b.updateProxyOverlays()})})},onChartUpdate:function(){var b=this.chart,a=this;b.mapNavButtons&&b.mapNavButtons.forEach(function(c,d){k(b,c.element);a.setMapNavButtonAttrs(c.element,"accessibility.zoom.mapZoom"+(d?"Out":"In"))})},setMapNavButtonAttrs:function(b,a){var c=this.chart;a=c.langFormat(a,{chart:c});e(b,{tabindex:-1,role:"button","aria-label":a})},onChartRender:function(){this.updateProxyOverlays()},updateProxyOverlays:function(){var b=this.chart;d(this.drillUpProxyGroup);d(this.resetZoomProxyGroup);
b.resetZoomButton&&this.recreateProxyButtonAndGroup(b.resetZoomButton,"resetZoomProxyButton","resetZoomProxyGroup",b.langFormat("accessibility.zoom.resetZoomButton",{chart:b}));b.drillUpButton&&this.recreateProxyButtonAndGroup(b.drillUpButton,"drillUpProxyButton","drillUpProxyGroup",b.langFormat("accessibility.drillUpButton",{chart:b,buttonText:b.getDrilldownBackText()}))},recreateProxyButtonAndGroup:function(b,a,c,e){d(this[c]);this[c]=this.addProxyGroup();this[a]=this.createProxyButton(b,this[c],
{"aria-label":e,tabindex:-1})},getMapZoomNavigation:function(){var b=this.keyCodes,a=this.chart,c=this;return new n(a,{keyCodeMap:[[[b.up,b.down,b.left,b.right],function(b){return c.onMapKbdArrow(this,b)}],[[b.tab],function(b,a){return c.onMapKbdTab(this,a)}],[[b.space,b.enter],function(){return c.onMapKbdClick(this)}]],validate:function(){return!!(a.mapZoom&&a.mapNavButtons&&a.mapNavButtons.length)},init:function(b){return c.onMapNavInit(b)}})},onMapKbdArrow:function(b,a){var c=this.keyCodes;this.chart[a===
c.up||a===c.down?"yAxis":"xAxis"][0].panStep(a===c.left||a===c.up?-1:1);return b.response.success},onMapKbdTab:function(b,a){var c=this.chart;b=b.response;var d=(a=a.shiftKey)&&!this.focusedMapNavButtonIx||!a&&this.focusedMapNavButtonIx;c.mapNavButtons[this.focusedMapNavButtonIx].setState(0);if(d)return c.mapZoom(),b[a?"prev":"next"];this.focusedMapNavButtonIx+=a?-1:1;a=c.mapNavButtons[this.focusedMapNavButtonIx];c.setFocusToElement(a.box,a.element);a.setState(2);return b.success},onMapKbdClick:function(b){this.fakeClickEvent(this.chart.mapNavButtons[this.focusedMapNavButtonIx].element);
return b.response.success},onMapNavInit:function(b){var a=this.chart,c=a.mapNavButtons[0],d=a.mapNavButtons[1];c=0<b?c:d;a.setFocusToElement(c.box,c.element);c.setState(2);this.focusedMapNavButtonIx=0<b?0:1},simpleButtonNavigation:function(b,a,c){var d=this.keyCodes,e=this,f=this.chart;return new n(f,{keyCodeMap:[[[d.tab,d.up,d.down,d.left,d.right],function(b,a){return this.response[b===d.tab&&a.shiftKey||b===d.left||b===d.up?"prev":"next"]}],[[d.space,d.enter],function(){var b=c(this,f);return m(b,
this.response.success)}]],validate:function(){return f[b]&&f[b].box&&e[a]},init:function(){f.setFocusToElement(f[b].box,e[a])}})},getKeyboardNavigation:function(){return[this.simpleButtonNavigation("resetZoomButton","resetZoomProxyButton",function(b,a){a.zoomOut()}),this.simpleButtonNavigation("drillUpButton","drillUpProxyButton",function(b,a){a.drillUp();return b.response.prev}),this.getMapZoomNavigation()]}});return a});r(a,"Accessibility/Components/RangeSelectorComponent.js",[a["Core/Globals.js"],
a["Core/Utilities.js"],a["Accessibility/AccessibilityComponent.js"],a["Accessibility/KeyboardNavigationHandler.js"],a["Accessibility/Utils/ChartUtilities.js"],a["Accessibility/Utils/HTMLUtilities.js"]],function(a,h,q,n,p,l){h=h.extend;var g=p.unhideChartElementFromAT,m=l.setElAttrs;a.Chart.prototype.highlightRangeSelectorButton=function(a){var e=this.rangeSelector.buttons,d=this.highlightedRangeSelectorItemIx;"undefined"!==typeof d&&e[d]&&e[d].setState(this.oldRangeSelectorItemState||0);this.highlightedRangeSelectorItemIx=
a;return e[a]?(this.setFocusToElement(e[a].box,e[a].element),this.oldRangeSelectorItemState=e[a].state,e[a].setState(2),!0):!1};a=function(){};a.prototype=new q;h(a.prototype,{onChartUpdate:function(){var a=this.chart,e=this,d=a.rangeSelector;d&&(d.buttons&&d.buttons.length&&d.buttons.forEach(function(b){g(a,b.element);e.setRangeButtonAttrs(b)}),d.maxInput&&d.minInput&&["minInput","maxInput"].forEach(function(b,f){if(b=d[b])g(a,b),e.setRangeInputAttrs(b,"accessibility.rangeSelector."+(f?"max":"min")+
"InputLabel")}))},setRangeButtonAttrs:function(a){var e=this.chart;e=e.langFormat("accessibility.rangeSelector.buttonText",{chart:e,buttonText:a.text&&a.text.textStr});m(a.element,{tabindex:-1,role:"button","aria-label":e})},setRangeInputAttrs:function(a,e){var d=this.chart;m(a,{tabindex:-1,role:"textbox","aria-label":d.langFormat(e,{chart:d})})},getRangeSelectorButtonNavigation:function(){var a=this.chart,e=this.keyCodes,d=this;return new n(a,{keyCodeMap:[[[e.left,e.right,e.up,e.down],function(b){return d.onButtonNavKbdArrowKey(this,
b)}],[[e.enter,e.space],function(){return d.onButtonNavKbdClick(this)}]],validate:function(){return a.rangeSelector&&a.rangeSelector.buttons&&a.rangeSelector.buttons.length},init:function(b){var d=a.rangeSelector.buttons.length-1;a.highlightRangeSelectorButton(0<b?0:d)}})},onButtonNavKbdArrowKey:function(a,e){var d=a.response,b=this.keyCodes,f=this.chart,c=f.options.accessibility.keyboardNavigation.wrapAround;e=e===b.left||e===b.up?-1:1;return f.highlightRangeSelectorButton(f.highlightedRangeSelectorItemIx+
e)?d.success:c?(a.init(e),d.success):d[0<e?"next":"prev"]},onButtonNavKbdClick:function(a){a=a.response;var e=this.chart;3!==e.oldRangeSelectorItemState&&this.fakeClickEvent(e.rangeSelector.buttons[e.highlightedRangeSelectorItemIx].element);return a.success},getRangeSelectorInputNavigation:function(){var a=this.chart,e=this.keyCodes,d=this;return new n(a,{keyCodeMap:[[[e.tab,e.up,e.down],function(b,a){return d.onInputKbdMove(this,b===e.tab&&a.shiftKey||b===e.up?-1:1)}]],validate:function(){return a.rangeSelector&&
a.rangeSelector.inputGroup&&"hidden"!==a.rangeSelector.inputGroup.element.getAttribute("visibility")&&!1!==a.options.rangeSelector.inputEnabled&&a.rangeSelector.minInput&&a.rangeSelector.maxInput},init:function(b){d.onInputNavInit(b)},terminate:function(){d.onInputNavTerminate()}})},onInputKbdMove:function(a,e){var d=this.chart;a=a.response;var b=d.highlightedInputRangeIx+=e;if(1<b||0>b)return a[0<e?"next":"prev"];d.rangeSelector[b?"maxInput":"minInput"].focus();return a.success},onInputNavInit:function(a){var e=
this.chart;a=0<a?0:1;e.highlightedInputRangeIx=a;e.rangeSelector[a?"maxInput":"minInput"].focus()},onInputNavTerminate:function(){var a=this.chart.rangeSelector||{};a.maxInput&&a.hideInput("max");a.minInput&&a.hideInput("min")},getKeyboardNavigation:function(){return[this.getRangeSelectorButtonNavigation(),this.getRangeSelectorInputNavigation()]}});return a});r(a,"Accessibility/Components/InfoRegionsComponent.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Accessibility/AccessibilityComponent.js"],
a["Accessibility/Utils/Announcer.js"],a["Accessibility/Components/AnnotationsA11y.js"],a["Accessibility/Utils/ChartUtilities.js"],a["Accessibility/Utils/HTMLUtilities.js"]],function(a,h,q,n,p,l,g){function m(b){return b.replace(/&lt;(h[1-7]|p|div|ul|ol|li)&gt;/g,"<$1>").replace(/&lt;&#x2F;(h[1-7]|p|div|ul|ol|li|a|button)&gt;/g,"</$1>").replace(/&lt;(div|a|button) id=&quot;([a-zA-Z\-0-9#]*?)&quot;&gt;/g,'<$1 id="$2">')}var k=a.doc,e=h.extend,d=h.format,b=h.pick,f=p.getAnnotationsInfoHTML,c=l.unhideChartElementFromAT,
w=l.getChartTitle,r=l.getAxisDescription,z=g.addClass,t=g.setElAttrs,E=g.escapeStringForHTML,B=g.stripHTMLTagsFromString,C=g.getElement,u=g.visuallyHideElement;a.Chart.prototype.getTypeDescription=function(b){var a=b[0],c=this.series&&this.series[0]||{};c={numSeries:this.series.length,numPoints:c.points&&c.points.length,chart:this,mapTitle:c.mapTitle};if(!a)return this.langFormat("accessibility.chartTypes.emptyChart",c);if("map"===a)return c.mapTitle?this.langFormat("accessibility.chartTypes.mapTypeDescription",
c):this.langFormat("accessibility.chartTypes.unknownMap",c);if(1<this.types.length)return this.langFormat("accessibility.chartTypes.combinationChart",c);b=b[0];a=this.langFormat("accessibility.seriesTypeDescriptions."+b,c);var d=this.series&&2>this.series.length?"Single":"Multiple";return(this.langFormat("accessibility.chartTypes."+b+d,c)||this.langFormat("accessibility.chartTypes.default"+d,c))+(a?" "+a:"")};h=function(){};h.prototype=new q;e(h.prototype,{init:function(){var b=this.chart,a=this;
this.initRegionsDefinitions();this.addEvent(b,"afterGetTable",function(b){a.onDataTableCreated(b)});this.addEvent(b,"afterViewData",function(b){a.dataTableDiv=b;setTimeout(function(){a.focusDataTable()},300)});this.announcer=new n(b,"assertive")},initRegionsDefinitions:function(){var b=this;this.screenReaderSections={before:{element:null,buildContent:function(a){var c=a.options.accessibility.screenReaderSection.beforeChartFormatter;return c?c(a):b.defaultBeforeChartFormatter(a)},insertIntoDOM:function(b,
a){a.renderTo.insertBefore(b,a.renderTo.firstChild)},afterInserted:function(){"undefined"!==typeof b.sonifyButtonId&&b.initSonifyButton(b.sonifyButtonId);"undefined"!==typeof b.dataTableButtonId&&b.initDataTableButton(b.dataTableButtonId)}},after:{element:null,buildContent:function(a){var c=a.options.accessibility.screenReaderSection.afterChartFormatter;return c?c(a):b.defaultAfterChartFormatter()},insertIntoDOM:function(b,a){a.renderTo.insertBefore(b,a.container.nextSibling)}}}},onChartRender:function(){var b=
this;this.linkedDescriptionElement=this.getLinkedDescriptionElement();this.setLinkedDescriptionAttrs();Object.keys(this.screenReaderSections).forEach(function(a){b.updateScreenReaderSection(a)})},getLinkedDescriptionElement:function(){var b=this.chart.options.accessibility.linkedDescription;if(b){if("string"!==typeof b)return b;b=d(b,this.chart);b=k.querySelectorAll(b);if(1===b.length)return b[0]}},setLinkedDescriptionAttrs:function(){var b=this.linkedDescriptionElement;b&&(b.setAttribute("aria-hidden",
"true"),z(b,"highcharts-linked-description"))},updateScreenReaderSection:function(b){var a=this.chart,d=this.screenReaderSections[b],e=d.buildContent(a),f=d.element=d.element||this.createElement("div"),l=f.firstChild||this.createElement("div");this.setScreenReaderSectionAttribs(f,b);l.innerHTML=e;f.appendChild(l);d.insertIntoDOM(f,a);u(l);c(a,l);d.afterInserted&&d.afterInserted()},setScreenReaderSectionAttribs:function(b,a){var c=this.chart,d=c.langFormat("accessibility.screenReaderSection."+a+"RegionLabel",
{chart:c});t(b,{id:"highcharts-screen-reader-region-"+a+"-"+c.index,"aria-label":d});b.style.position="relative";"all"===c.options.accessibility.landmarkVerbosity&&d&&b.setAttribute("role","region")},defaultBeforeChartFormatter:function(){var b,c=this.chart,d=c.options.accessibility.screenReaderSection.beforeChartFormat,e=this.getAxesDescription(),l=c.sonify&&(null===(b=c.options.sonification)||void 0===b?void 0:b.enabled);b="highcharts-a11y-sonify-data-btn-"+c.index;var k="hc-linkto-highcharts-data-table-"+
c.index,g=f(c),h=c.langFormat("accessibility.screenReaderSection.annotations.heading",{chart:c});e={chartTitle:w(c),typeDescription:this.getTypeDescriptionText(),chartSubtitle:this.getSubtitleText(),chartLongdesc:this.getLongdescText(),xAxisDescription:e.xAxis,yAxisDescription:e.yAxis,playAsSoundButton:l?this.getSonifyButtonText(b):"",viewTableButton:c.getCSV?this.getDataTableButtonText(k):"",annotationsTitle:g?h:"",annotationsList:g};c=a.i18nFormat(d,e,c);this.dataTableButtonId=k;this.sonifyButtonId=
b;return m(E(c)).replace(/<(\w+)[^>]*?>\s*<\/\1>/g,"")},defaultAfterChartFormatter:function(){var b=this.chart,c=b.options.accessibility.screenReaderSection.afterChartFormat,d={endOfChartMarker:this.getEndOfChartMarkerText()};b=a.i18nFormat(c,d,b);return m(E(b)).replace(/<(\w+)[^>]*?>\s*<\/\1>/g,"")},getLinkedDescription:function(){var b=this.linkedDescriptionElement;return B(b&&b.innerHTML||"")},getLongdescText:function(){var b=this.chart.options,a=b.caption;a=a&&a.text;var c=this.getLinkedDescription();
return b.accessibility.description||c||a||""},getTypeDescriptionText:function(){var b=this.chart;return b.types?b.options.accessibility.typeDescription||b.getTypeDescription(b.types):""},getDataTableButtonText:function(b){var a=this.chart;a=a.langFormat("accessibility.table.viewAsDataTableButtonText",{chart:a,chartTitle:w(a)});return'<button id="'+b+'">'+a+"</button>"},getSonifyButtonText:function(b){var a,c=this.chart;if(!1===(null===(a=c.options.sonification)||void 0===a?void 0:a.enabled))return"";
a=c.langFormat("accessibility.sonification.playAsSoundButtonText",{chart:c,chartTitle:w(c)});return'<button id="'+b+'">'+a+"</button>"},getSubtitleText:function(){var b=this.chart.options.subtitle;return B(b&&b.text||"")},getEndOfChartMarkerText:function(){var b=this.chart,a=b.langFormat("accessibility.screenReaderSection.endOfChartMarker",{chart:b});return'<div id="highcharts-end-of-chart-marker-'+b.index+'">'+a+"</div>"},onDataTableCreated:function(b){var a=this.chart;a.options.accessibility.enabled&&
(this.viewDataTableButton&&this.viewDataTableButton.setAttribute("aria-expanded","true"),b.html=b.html.replace("<table ",'<table tabindex="-1" summary="'+a.langFormat("accessibility.table.tableSummary",{chart:a})+'"'))},focusDataTable:function(){var b=this.dataTableDiv;(b=b&&b.getElementsByTagName("table")[0])&&b.focus&&b.focus()},initSonifyButton:function(b){var a=this,c=this.sonifyButton=C(b),d=this.chart,e=function(b){null===c||void 0===c?void 0:c.setAttribute("aria-hidden","true");null===c||void 0===
c?void 0:c.setAttribute("aria-label","");b.preventDefault();b.stopPropagation();b=d.langFormat("accessibility.sonification.playAsSoundClickAnnouncement",{chart:d});a.announcer.announce(b);setTimeout(function(){null===c||void 0===c?void 0:c.removeAttribute("aria-hidden");null===c||void 0===c?void 0:c.removeAttribute("aria-label");d.sonify&&d.sonify()},1E3)};c&&d&&(t(c,{tabindex:"-1"}),c.onclick=function(b){var a;((null===(a=d.options.accessibility)||void 0===a?void 0:a.screenReaderSection.onPlayAsSoundClick)||
e).call(this,b,d)})},initDataTableButton:function(b){var a=this.viewDataTableButton=C(b),c=this.chart;b=b.replace("hc-linkto-","");a&&(t(a,{tabindex:"-1","aria-expanded":!!C(b)}),a.onclick=c.options.accessibility.screenReaderSection.onViewDataTableClick||function(){c.viewData()})},getAxesDescription:function(){var a=this.chart,c=function(c,d){c=a[c];return 1<c.length||c[0]&&b(c[0].options.accessibility&&c[0].options.accessibility.enabled,d)},d=!!a.types&&0>a.types.indexOf("map"),e=!!a.hasCartesianSeries,
f=c("xAxis",!a.angular&&e&&d);c=c("yAxis",e&&d);d={};f&&(d.xAxis=this.getAxisDescriptionText("xAxis"));c&&(d.yAxis=this.getAxisDescriptionText("yAxis"));return d},getAxisDescriptionText:function(b){var a=this,c=this.chart,d=c[b];return c.langFormat("accessibility.axis."+b+"Description"+(1<d.length?"Plural":"Singular"),{chart:c,names:d.map(function(b){return r(b)}),ranges:d.map(function(b){return a.getAxisRangeDescription(b)}),numAxes:d.length})},getAxisRangeDescription:function(b){var a=b.options||
{};return a.accessibility&&"undefined"!==typeof a.accessibility.rangeDescription?a.accessibility.rangeDescription:b.categories?this.getCategoryAxisRangeDesc(b):!b.dateTime||0!==b.min&&0!==b.dataMin?this.getAxisFromToDescription(b):this.getAxisTimeLengthDesc(b)},getCategoryAxisRangeDesc:function(b){var a=this.chart;return b.dataMax&&b.dataMin?a.langFormat("accessibility.axis.rangeCategories",{chart:a,axis:b,numCategories:b.dataMax-b.dataMin+1}):""},getAxisTimeLengthDesc:function(b){var a=this.chart,
c={},d="Seconds";c.Seconds=((b.max||0)-(b.min||0))/1E3;c.Minutes=c.Seconds/60;c.Hours=c.Minutes/60;c.Days=c.Hours/24;["Minutes","Hours","Days"].forEach(function(b){2<c[b]&&(d=b)});var e=c[d].toFixed("Seconds"!==d&&"Minutes"!==d?1:0);return a.langFormat("accessibility.axis.timeRange"+d,{chart:a,axis:b,range:e.replace(".0","")})},getAxisFromToDescription:function(b){var a=this.chart,c=a.options.accessibility.screenReaderSection.axisRangeDateFormat,d=function(d){return b.dateTime?a.time.dateFormat(c,
b[d]):b[d]};return a.langFormat("accessibility.axis.rangeFromTo",{chart:a,axis:b,rangeFrom:d("min"),rangeTo:d("max")})},destroy:function(){var b;null===(b=this.announcer)||void 0===b?void 0:b.destroy()}});return h});r(a,"Accessibility/Components/ContainerComponent.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Accessibility/Utils/HTMLUtilities.js"],a["Accessibility/Utils/ChartUtilities.js"],a["Accessibility/AccessibilityComponent.js"]],function(a,h,q,n,p){var l=a.win.document;a=h.extend;var g=
q.stripHTMLTagsFromString,m=n.unhideChartElementFromAT,k=n.getChartTitle;q=function(){};q.prototype=new p;a(q.prototype,{onChartUpdate:function(){this.handleSVGTitleElement();this.setSVGContainerLabel();this.setGraphicContainerAttrs();this.setRenderToAttrs();this.makeCreditsAccessible()},handleSVGTitleElement:function(){var a=this.chart,d="highcharts-title-"+a.index,b=g(a.langFormat("accessibility.svgContainerTitle",{chartTitle:k(a)}));if(b.length){var f=this.svgTitleElement=this.svgTitleElement||
l.createElementNS("http://www.w3.org/2000/svg","title");f.textContent=b;f.id=d;a.renderTo.insertBefore(f,a.renderTo.firstChild)}},setSVGContainerLabel:function(){var a=this.chart,d=g(a.langFormat("accessibility.svgContainerLabel",{chartTitle:k(a)}));a.renderer.box&&d.length&&a.renderer.box.setAttribute("aria-label",d)},setGraphicContainerAttrs:function(){var a=this.chart,d=a.langFormat("accessibility.graphicContainerLabel",{chartTitle:k(a)});d.length&&a.container.setAttribute("aria-label",d)},setRenderToAttrs:function(){var a=
this.chart;"disabled"!==a.options.accessibility.landmarkVerbosity?a.renderTo.setAttribute("role","region"):a.renderTo.removeAttribute("role");a.renderTo.setAttribute("aria-label",a.langFormat("accessibility.chartContainerLabel",{title:k(a),chart:a}))},makeCreditsAccessible:function(){var a=this.chart,d=a.credits;d&&(d.textStr&&d.element.setAttribute("aria-label",g(a.langFormat("accessibility.credits",{creditsStr:d.textStr}))),m(a,d.element))},destroy:function(){this.chart.renderTo.setAttribute("aria-hidden",
!0)}});return q});r(a,"Accessibility/HighContrastMode.js",[a["Core/Globals.js"]],function(a){var h=a.isMS,m=a.win,n=m.document;return{isHighContrastModeActive:function(){var a=/(Edg)/.test(m.navigator.userAgent);if(m.matchMedia&&a)return m.matchMedia("(-ms-high-contrast: active)").matches;if(h&&m.getComputedStyle){a=n.createElement("div");a.style.backgroundImage="url(data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)";n.body.appendChild(a);var l=(a.currentStyle||m.getComputedStyle(a)).backgroundImage;
n.body.removeChild(a);return"none"===l}return!1},setHighContrastTheme:function(a){a.highContrastModeActive=!0;var l=a.options.accessibility.highContrastTheme;a.update(l,!1);a.series.forEach(function(a){var g=l.plotOptions[a.type]||{};a.update({color:g.color||"windowText",colors:[g.color||"windowText"],borderColor:g.borderColor||"window"});a.points.forEach(function(a){a.options&&a.options.color&&a.update({color:g.color||"windowText",borderColor:g.borderColor||"window"},!1)})});a.redraw()}}});r(a,"Accessibility/HighContrastTheme.js",
[],function(){return{chart:{backgroundColor:"window"},title:{style:{color:"windowText"}},subtitle:{style:{color:"windowText"}},colorAxis:{minColor:"windowText",maxColor:"windowText",stops:[]},colors:["windowText"],xAxis:{gridLineColor:"windowText",labels:{style:{color:"windowText"}},lineColor:"windowText",minorGridLineColor:"windowText",tickColor:"windowText",title:{style:{color:"windowText"}}},yAxis:{gridLineColor:"windowText",labels:{style:{color:"windowText"}},lineColor:"windowText",minorGridLineColor:"windowText",
tickColor:"windowText",title:{style:{color:"windowText"}}},tooltip:{backgroundColor:"window",borderColor:"windowText",style:{color:"windowText"}},plotOptions:{series:{lineColor:"windowText",fillColor:"window",borderColor:"windowText",edgeColor:"windowText",borderWidth:1,dataLabels:{connectorColor:"windowText",color:"windowText",style:{color:"windowText",textOutline:"none"}},marker:{lineColor:"windowText",fillColor:"windowText"}},pie:{color:"window",colors:["window"],borderColor:"windowText",borderWidth:1},
boxplot:{fillColor:"window"},candlestick:{lineColor:"windowText",fillColor:"window"},errorbar:{fillColor:"window"}},legend:{backgroundColor:"window",itemStyle:{color:"windowText"},itemHoverStyle:{color:"windowText"},itemHiddenStyle:{color:"#555"},title:{style:{color:"windowText"}}},credits:{style:{color:"windowText"}},labels:{style:{color:"windowText"}},drilldown:{activeAxisLabelStyle:{color:"windowText"},activeDataLabelStyle:{color:"windowText"}},navigation:{buttonOptions:{symbolStroke:"windowText",
theme:{fill:"window"}}},rangeSelector:{buttonTheme:{fill:"window",stroke:"windowText",style:{color:"windowText"},states:{hover:{fill:"window",stroke:"windowText",style:{color:"windowText"}},select:{fill:"#444",stroke:"windowText",style:{color:"windowText"}}}},inputBoxBorderColor:"windowText",inputStyle:{backgroundColor:"window",color:"windowText"},labelStyle:{color:"windowText"}},navigator:{handles:{backgroundColor:"window",borderColor:"windowText"},outlineColor:"windowText",maskFill:"transparent",
series:{color:"windowText",lineColor:"windowText"},xAxis:{gridLineColor:"windowText"}},scrollbar:{barBackgroundColor:"#444",barBorderColor:"windowText",buttonArrowColor:"windowText",buttonBackgroundColor:"window",buttonBorderColor:"windowText",rifleColor:"windowText",trackBackgroundColor:"window",trackBorderColor:"windowText"}}});r(a,"Accessibility/Options/Options.js",[],function(){return{accessibility:{enabled:!0,screenReaderSection:{beforeChartFormat:"<h5>{chartTitle}</h5><div>{typeDescription}</div><div>{chartSubtitle}</div><div>{chartLongdesc}</div><div>{playAsSoundButton}</div><div>{viewTableButton}</div><div>{xAxisDescription}</div><div>{yAxisDescription}</div><div>{annotationsTitle}{annotationsList}</div>",
afterChartFormat:"{endOfChartMarker}",axisRangeDateFormat:"%Y-%m-%d %H:%M:%S"},series:{describeSingleSeries:!1,pointDescriptionEnabledThreshold:200},point:{valueDescriptionFormat:"{index}. {xDescription}{separator}{value}."},landmarkVerbosity:"all",linkedDescription:'*[data-highcharts-chart="{index}"] + .highcharts-description',keyboardNavigation:{enabled:!0,focusBorder:{enabled:!0,hideBrowserFocusOutline:!0,style:{color:"#335cad",lineWidth:2,borderRadius:3},margin:2},order:["series","zoom","rangeSelector",
"legend","chartMenu"],wrapAround:!0,seriesNavigation:{skipNullPoints:!0,pointNavigationEnabledThreshold:!1}},announceNewData:{enabled:!1,minAnnounceInterval:5E3,interruptUser:!1}},legend:{accessibility:{enabled:!0,keyboardNavigation:{enabled:!0}}},exporting:{accessibility:{enabled:!0}}}});r(a,"Accessibility/Options/LangOptions.js",[],function(){return{accessibility:{defaultChartTitle:"Chart",chartContainerLabel:"{title}. Highcharts interactive chart.",svgContainerLabel:"Interactive chart",drillUpButton:"{buttonText}",
credits:"Chart credits: {creditsStr}",thousandsSep:",",svgContainerTitle:"",graphicContainerLabel:"",screenReaderSection:{beforeRegionLabel:"Chart screen reader information.",afterRegionLabel:"",annotations:{heading:"Chart annotations summary",descriptionSinglePoint:"{annotationText}. Related to {annotationPoint}",descriptionMultiplePoints:"{annotationText}. Related to {annotationPoint}{ Also related to, #each(additionalAnnotationPoints)}",descriptionNoPoints:"{annotationText}"},endOfChartMarker:"End of interactive chart."},
sonification:{playAsSoundButtonText:"Play as sound, {chartTitle}",playAsSoundClickAnnouncement:"Play"},legend:{legendLabel:"Toggle series visibility",legendItem:"Hide {itemName}"},zoom:{mapZoomIn:"Zoom chart",mapZoomOut:"Zoom out chart",resetZoomButton:"Reset zoom"},rangeSelector:{minInputLabel:"Select start date.",maxInputLabel:"Select end date.",buttonText:"Select range {buttonText}"},table:{viewAsDataTableButtonText:"View as data table, {chartTitle}",tableSummary:"Table representation of chart."},
announceNewData:{newDataAnnounce:"Updated data for chart {chartTitle}",newSeriesAnnounceSingle:"New data series: {seriesDesc}",newPointAnnounceSingle:"New data point: {pointDesc}",newSeriesAnnounceMultiple:"New data series in chart {chartTitle}: {seriesDesc}",newPointAnnounceMultiple:"New data point in chart {chartTitle}: {pointDesc}"},seriesTypeDescriptions:{boxplot:"Box plot charts are typically used to display groups of statistical data. Each data point in the chart can have up to 5 values: minimum, lower quartile, median, upper quartile, and maximum.",
arearange:"Arearange charts are line charts displaying a range between a lower and higher value for each point.",areasplinerange:"These charts are line charts displaying a range between a lower and higher value for each point.",bubble:"Bubble charts are scatter charts where each data point also has a size value.",columnrange:"Columnrange charts are column charts displaying a range between a lower and higher value for each point.",errorbar:"Errorbar series are used to display the variability of the data.",
funnel:"Funnel charts are used to display reduction of data in stages.",pyramid:"Pyramid charts consist of a single pyramid with item heights corresponding to each point value.",waterfall:"A waterfall chart is a column chart where each column contributes towards a total end value."},chartTypes:{emptyChart:"Empty chart",mapTypeDescription:"Map of {mapTitle} with {numSeries} data series.",unknownMap:"Map of unspecified region with {numSeries} data series.",combinationChart:"Combination chart with {numSeries} data series.",
defaultSingle:"Chart with {numPoints} data {#plural(numPoints, points, point)}.",defaultMultiple:"Chart with {numSeries} data series.",splineSingle:"Line chart with {numPoints} data {#plural(numPoints, points, point)}.",splineMultiple:"Line chart with {numSeries} lines.",lineSingle:"Line chart with {numPoints} data {#plural(numPoints, points, point)}.",lineMultiple:"Line chart with {numSeries} lines.",columnSingle:"Bar chart with {numPoints} {#plural(numPoints, bars, bar)}.",columnMultiple:"Bar chart with {numSeries} data series.",
barSingle:"Bar chart with {numPoints} {#plural(numPoints, bars, bar)}.",barMultiple:"Bar chart with {numSeries} data series.",pieSingle:"Pie chart with {numPoints} {#plural(numPoints, slices, slice)}.",pieMultiple:"Pie chart with {numSeries} pies.",scatterSingle:"Scatter chart with {numPoints} {#plural(numPoints, points, point)}.",scatterMultiple:"Scatter chart with {numSeries} data series.",boxplotSingle:"Boxplot with {numPoints} {#plural(numPoints, boxes, box)}.",boxplotMultiple:"Boxplot with {numSeries} data series.",
bubbleSingle:"Bubble chart with {numPoints} {#plural(numPoints, bubbles, bubble)}.",bubbleMultiple:"Bubble chart with {numSeries} data series."},axis:{xAxisDescriptionSingular:"The chart has 1 X axis displaying {names[0]}. {ranges[0]}",xAxisDescriptionPlural:"The chart has {numAxes} X axes displaying {#each(names, -1) }and {names[-1]}.",yAxisDescriptionSingular:"The chart has 1 Y axis displaying {names[0]}. {ranges[0]}",yAxisDescriptionPlural:"The chart has {numAxes} Y axes displaying {#each(names, -1) }and {names[-1]}.",
timeRangeDays:"Range: {range} days.",timeRangeHours:"Range: {range} hours.",timeRangeMinutes:"Range: {range} minutes.",timeRangeSeconds:"Range: {range} seconds.",rangeFromTo:"Range: {rangeFrom} to {rangeTo}.",rangeCategories:"Range: {numCategories} categories."},exporting:{chartMenuLabel:"Chart menu",menuButtonLabel:"View chart menu",exportRegionLabel:"Chart menu"},series:{summary:{"default":"{name}, series {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",defaultCombination:"{name}, series {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",
line:"{name}, line {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",lineCombination:"{name}, series {ix} of {numSeries}. Line with {numPoints} data {#plural(numPoints, points, point)}.",spline:"{name}, line {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",splineCombination:"{name}, series {ix} of {numSeries}. Line with {numPoints} data {#plural(numPoints, points, point)}.",column:"{name}, bar series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bars, bar)}.",
columnCombination:"{name}, series {ix} of {numSeries}. Bar series with {numPoints} {#plural(numPoints, bars, bar)}.",bar:"{name}, bar series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bars, bar)}.",barCombination:"{name}, series {ix} of {numSeries}. Bar series with {numPoints} {#plural(numPoints, bars, bar)}.",pie:"{name}, pie {ix} of {numSeries} with {numPoints} {#plural(numPoints, slices, slice)}.",pieCombination:"{name}, series {ix} of {numSeries}. Pie with {numPoints} {#plural(numPoints, slices, slice)}.",
scatter:"{name}, scatter plot {ix} of {numSeries} with {numPoints} {#plural(numPoints, points, point)}.",scatterCombination:"{name}, series {ix} of {numSeries}, scatter plot with {numPoints} {#plural(numPoints, points, point)}.",boxplot:"{name}, boxplot {ix} of {numSeries} with {numPoints} {#plural(numPoints, boxes, box)}.",boxplotCombination:"{name}, series {ix} of {numSeries}. Boxplot with {numPoints} {#plural(numPoints, boxes, box)}.",bubble:"{name}, bubble series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bubbles, bubble)}.",
bubbleCombination:"{name}, series {ix} of {numSeries}. Bubble series with {numPoints} {#plural(numPoints, bubbles, bubble)}.",map:"{name}, map {ix} of {numSeries} with {numPoints} {#plural(numPoints, areas, area)}.",mapCombination:"{name}, series {ix} of {numSeries}. Map with {numPoints} {#plural(numPoints, areas, area)}.",mapline:"{name}, line {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",maplineCombination:"{name}, series {ix} of {numSeries}. Line with {numPoints} data {#plural(numPoints, points, point)}.",
mapbubble:"{name}, bubble series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bubbles, bubble)}.",mapbubbleCombination:"{name}, series {ix} of {numSeries}. Bubble series with {numPoints} {#plural(numPoints, bubbles, bubble)}."},description:"{description}",xAxisDescription:"X axis, {name}",yAxisDescription:"Y axis, {name}",nullPointValue:"No value",pointAnnotationsDescription:"{Annotation: #each(annotations). }"}}}});r(a,"Accessibility/Options/DeprecatedOptions.js",[a["Core/Utilities.js"]],
function(a){function h(a,e,d){for(var b,f=0;f<e.length-1;++f)b=e[f],a=a[b]=r(a[b],{});a[e[e.length-1]]=d}function m(a,e,d,b){function f(b,a){return a.reduce(function(b,a){return b[a]},b)}var c=f(a.options,e),l=f(a.options,d);Object.keys(b).forEach(function(f){var k,m=c[f];"undefined"!==typeof m&&(h(l,b[f],m),g(32,!1,a,(k={},k[e.join(".")+"."+f]=d.join(".")+"."+b[f].join("."),k)))})}function n(a){var e=a.options.chart||{},d=a.options.accessibility||{};["description","typeDescription"].forEach(function(b){var f;
e[b]&&(d[b]=e[b],g(32,!1,a,(f={},f["chart."+b]="use accessibility."+b,f)))})}function p(a){a.axes.forEach(function(e){(e=e.options)&&e.description&&(e.accessibility=e.accessibility||{},e.accessibility.description=e.description,g(32,!1,a,{"axis.description":"use axis.accessibility.description"}))})}function l(a){var e={description:["accessibility","description"],exposeElementToA11y:["accessibility","exposeAsGroupOnly"],pointDescriptionFormatter:["accessibility","pointDescriptionFormatter"],skipKeyboardNavigation:["accessibility",
"keyboardNavigation","enabled"]};a.series.forEach(function(d){Object.keys(e).forEach(function(b){var f,c=d.options[b];"undefined"!==typeof c&&(h(d.options,e[b],"skipKeyboardNavigation"===b?!c:c),g(32,!1,a,(f={},f["series."+b]="series."+e[b].join("."),f)))})})}var g=a.error,r=a.pick;return function(a){n(a);p(a);a.series&&l(a);m(a,["accessibility"],["accessibility"],{pointDateFormat:["point","dateFormat"],pointDateFormatter:["point","dateFormatter"],pointDescriptionFormatter:["point","descriptionFormatter"],
pointDescriptionThreshold:["series","pointDescriptionEnabledThreshold"],pointNavigationThreshold:["keyboardNavigation","seriesNavigation","pointNavigationEnabledThreshold"],pointValueDecimals:["point","valueDecimals"],pointValuePrefix:["point","valuePrefix"],pointValueSuffix:["point","valueSuffix"],screenReaderSectionFormatter:["screenReaderSection","beforeChartFormatter"],describeSingleSeries:["series","describeSingleSeries"],seriesDescriptionFormatter:["series","descriptionFormatter"],onTableAnchorClick:["screenReaderSection",
"onViewDataTableClick"],axisRangeDateFormat:["screenReaderSection","axisRangeDateFormat"]});m(a,["accessibility","keyboardNavigation"],["accessibility","keyboardNavigation","seriesNavigation"],{skipNullPoints:["skipNullPoints"],mode:["mode"]});m(a,["lang","accessibility"],["lang","accessibility"],{legendItem:["legend","legendItem"],legendLabel:["legend","legendLabel"],mapZoomIn:["zoom","mapZoomIn"],mapZoomOut:["zoom","mapZoomOut"],resetZoomButton:["zoom","resetZoomButton"],screenReaderRegionLabel:["screenReaderSection",
"beforeRegionLabel"],rangeSelectorButton:["rangeSelector","buttonText"],rangeSelectorMaxInput:["rangeSelector","maxInputLabel"],rangeSelectorMinInput:["rangeSelector","minInputLabel"],svgContainerEnd:["screenReaderSection","endOfChartMarker"],viewAsDataTable:["table","viewAsDataTableButtonText"],tableSummary:["table","tableSummary"]})}});r(a,"Accessibility/A11yI18n.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,h){function m(a,g){var h=a.indexOf("#each("),k=a.indexOf("#plural("),e=a.indexOf("["),
d=a.indexOf("]");if(-1<h){e=a.slice(h).indexOf(")")+h;var b=a.substring(0,h);k=a.substring(e+1);e=a.substring(h+6,e).split(",");h=Number(e[1]);a="";if(g=g[e[0]])for(h=isNaN(h)?g.length:h,h=0>h?g.length+h:Math.min(h,g.length),e=0;e<h;++e)a+=b+g[e]+k;return a.length?a:""}if(-1<k){b=a.slice(k).indexOf(")")+k;a=a.substring(k+8,b).split(",");switch(Number(g[a[0]])){case 0:a=p(a[4],a[1]);break;case 1:a=p(a[2],a[1]);break;case 2:a=p(a[3],a[1]);break;default:a=a[1]}a?(g=a,g=g.trim&&g.trim()||g.replace(/^\s+|\s+$/g,
"")):g="";return g}return-1<e?(k=a.substring(0,e),a=Number(a.substring(e+1,d)),g=g[k],!isNaN(a)&&g&&(0>a?(b=g[g.length+a],"undefined"===typeof b&&(b=g[0])):(b=g[a],"undefined"===typeof b&&(b=g[g.length-1]))),"undefined"!==typeof b?b:""):"{"+a+"}"}var n=h.format,p=h.pick;a.i18nFormat=function(a,g,h){var k=function(a,b){a=a.slice(b||0);var c=a.indexOf("{"),d=a.indexOf("}");if(-1<c&&d>c)return{statement:a.substring(c+1,d),begin:b+c+1,end:b+d}},e=[],d=0;do{var b=k(a,d);var f=a.substring(d,b&&b.begin-
1);f.length&&e.push({value:f,type:"constant"});b&&e.push({value:b.statement,type:"statement"});d=b?b.end+1:d+1}while(b);e.forEach(function(a){"statement"===a.type&&(a.value=m(a.value,g))});return n(e.reduce(function(a,b){return a+b.value},""),g,h)};a.Chart.prototype.langFormat=function(h,g){h=h.split(".");for(var l=this.options.lang,k=0;k<h.length;++k)l=l&&l[h[k]];return"string"===typeof l?a.i18nFormat(l,g,this):""}});r(a,"Accessibility/FocusBorder.js",[a["Core/Globals.js"],a["Core/Renderer/SVG/SVGElement.js"],
a["Core/Renderer/SVG/SVGLabel.js"],a["Core/Utilities.js"]],function(a,h,q,n){function m(a){if(!a.focusBorderDestroyHook){var b=a.destroy;a.destroy=function(){var c,d;null===(d=null===(c=a.focusBorder)||void 0===c?void 0:c.destroy)||void 0===d?void 0:d.call(c);return b.apply(a,arguments)};a.focusBorderDestroyHook=b}}function l(a){for(var b=[],c=1;c<arguments.length;c++)b[c-1]=arguments[c];a.focusBorderUpdateHooks||(a.focusBorderUpdateHooks={},d.forEach(function(c){c+="Setter";var d=a[c]||a._defaultSetter;
a.focusBorderUpdateHooks[c]=d;a[c]=function(){var c=d.apply(a,arguments);a.addFocusBorder.apply(a,b);return c}}))}function g(a){a.focusBorderUpdateHooks&&(Object.keys(a.focusBorderUpdateHooks).forEach(function(b){var c=a.focusBorderUpdateHooks[b];c===a._defaultSetter?delete a[b]:a[b]=c}),delete a.focusBorderUpdateHooks)}var r=n.addEvent,k=n.extend,e=n.pick,d="x y transform width height r d stroke-width".split(" ");k(h.prototype,{addFocusBorder:function(b,d){this.focusBorder&&this.removeFocusBorder();
var c=this.getBBox(),f=e(b,3);c.x+=this.translateX?this.translateX:0;c.y+=this.translateY?this.translateY:0;var g=c.x-f,h=c.y-f,k=c.width+2*f,n=c.height+2*f,p=this instanceof q;if("text"===this.element.nodeName||p){var r=!!this.rotation;if(p)var u={x:r?1:0,y:0};else g=u=0,"middle"===this.attr("text-anchor")?(u=a.isFirefox&&this.rotation?.25:.5,g=a.isFirefox&&!this.rotation?.75:.5):this.rotation?u=.25:g=.75,u={x:u,y:g};g=+this.attr("x")-c.width*u.x-f;h=+this.attr("y")-c.height*u.y-f;p&&r&&(p=k,k=n,
n=p,g=+this.attr("x")-c.height*u.x-f,h=+this.attr("y")-c.width*u.y-f)}this.focusBorder=this.renderer.rect(g,h,k,n,parseInt((d&&d.borderRadius||0).toString(),10)).addClass("highcharts-focus-border").attr({zIndex:99}).add(this.parentGroup);this.renderer.styledMode||this.focusBorder.attr({stroke:d&&d.stroke,"stroke-width":d&&d.strokeWidth});l(this,b,d);m(this)},removeFocusBorder:function(){g(this);this.focusBorderDestroyHook&&(this.destroy=this.focusBorderDestroyHook,delete this.focusBorderDestroyHook);
this.focusBorder&&(this.focusBorder.destroy(),delete this.focusBorder)}});a.Chart.prototype.renderFocusBorder=function(){var a=this.focusElement,d=this.options.accessibility.keyboardNavigation.focusBorder;a&&(a.removeFocusBorder(),d.enabled&&a.addFocusBorder(d.margin,{stroke:d.style.color,strokeWidth:d.style.lineWidth,borderRadius:d.style.borderRadius}))};a.Chart.prototype.setFocusToElement=function(a,d){var b=this.options.accessibility.keyboardNavigation.focusBorder;(d=d||a.element)&&d.focus&&(d.hcEvents&&
d.hcEvents.focusin||r(d,"focusin",function(){}),d.focus(),b.hideBrowserFocusOutline&&(d.style.outline="none"));this.focusElement&&this.focusElement.removeFocusBorder();this.focusElement=a;this.renderFocusBorder()}});r(a,"Accessibility/Accessibility.js",[a["Accessibility/Utils/ChartUtilities.js"],a["Core/Globals.js"],a["Accessibility/KeyboardNavigationHandler.js"],a["Core/Options.js"],a["Core/Series/Point.js"],a["Core/Utilities.js"],a["Accessibility/AccessibilityComponent.js"],a["Accessibility/KeyboardNavigation.js"],
a["Accessibility/Components/LegendComponent.js"],a["Accessibility/Components/MenuComponent.js"],a["Accessibility/Components/SeriesComponent/SeriesComponent.js"],a["Accessibility/Components/ZoomComponent.js"],a["Accessibility/Components/RangeSelectorComponent.js"],a["Accessibility/Components/InfoRegionsComponent.js"],a["Accessibility/Components/ContainerComponent.js"],a["Accessibility/HighContrastMode.js"],a["Accessibility/HighContrastTheme.js"],a["Accessibility/Options/Options.js"],a["Accessibility/Options/LangOptions.js"],
a["Accessibility/Options/DeprecatedOptions.js"]],function(a,h,q,n,p,l,g,r,k,e,d,b,f,c,w,A,z,t,E,B){function m(a){this.init(a)}var u=l.addEvent,v=l.extend,x=l.fireEvent,y=l.merge,D=h.win.document;y(!0,n.defaultOptions,t,{accessibility:{highContrastTheme:z},lang:E});h.A11yChartUtilities=a;h.KeyboardNavigationHandler=q;h.AccessibilityComponent=g;m.prototype={init:function(a){this.chart=a;D.addEventListener&&a.renderer.isSVG?(B(a),this.initComponents(),this.keyboardNavigation=new r(a,this.components),
this.update()):a.renderTo.setAttribute("aria-hidden",!0)},initComponents:function(){var a=this.chart,g=a.options.accessibility;this.components={container:new w,infoRegions:new c,legend:new k,chartMenu:new e,rangeSelector:new f,series:new d,zoom:new b};g.customComponents&&v(this.components,g.customComponents);var h=this.components;this.getComponentOrder().forEach(function(b){h[b].initBase(a);h[b].init()})},getComponentOrder:function(){if(!this.components)return[];if(!this.components.series)return Object.keys(this.components);
var a=Object.keys(this.components).filter(function(a){return"series"!==a});return["series"].concat(a)},update:function(){var a=this.components,b=this.chart,c=b.options.accessibility;x(b,"beforeA11yUpdate");b.types=this.getChartTypes();this.getComponentOrder().forEach(function(c){a[c].onChartUpdate();x(b,"afterA11yComponentUpdate",{name:c,component:a[c]})});this.keyboardNavigation.update(c.keyboardNavigation.order);!b.highContrastModeActive&&A.isHighContrastModeActive()&&A.setHighContrastTheme(b);
x(b,"afterA11yUpdate",{accessibility:this})},destroy:function(){var a=this.chart||{},b=this.components;Object.keys(b).forEach(function(a){b[a].destroy();b[a].destroyBase()});this.keyboardNavigation&&this.keyboardNavigation.destroy();a.renderTo&&a.renderTo.setAttribute("aria-hidden",!0);a.focusElement&&a.focusElement.removeFocusBorder()},getChartTypes:function(){var a={};this.chart.series.forEach(function(b){a[b.type]=1});return Object.keys(a)}};h.Chart.prototype.updateA11yEnabled=function(){var a=
this.accessibility,b=this.options.accessibility;b&&b.enabled?a?a.update():this.accessibility=new m(this):a?(a.destroy&&a.destroy(),delete this.accessibility):this.renderTo.setAttribute("aria-hidden",!0)};u(h.Chart,"render",function(a){this.a11yDirty&&this.renderTo&&(delete this.a11yDirty,this.updateA11yEnabled());var b=this.accessibility;b&&b.getComponentOrder().forEach(function(a){b.components[a].onChartRender()})});u(h.Chart,"update",function(a){if(a=a.options.accessibility)a.customComponents&&
(this.options.accessibility.customComponents=a.customComponents,delete a.customComponents),y(!0,this.options.accessibility,a),this.accessibility&&this.accessibility.destroy&&(this.accessibility.destroy(),delete this.accessibility);this.a11yDirty=!0});u(p,"update",function(){this.series.chart.accessibility&&(this.series.chart.a11yDirty=!0)});["addSeries","init"].forEach(function(a){u(h.Chart,a,function(){this.a11yDirty=!0})});["update","updatedData","remove"].forEach(function(a){u(h.Series,a,function(){this.chart.accessibility&&
(this.chart.a11yDirty=!0)})});["afterDrilldown","drillupall"].forEach(function(a){u(h.Chart,a,function(){this.accessibility&&this.accessibility.update()})});u(h.Chart,"destroy",function(){this.accessibility&&this.accessibility.destroy()})});r(a,"masters/modules/accessibility.src.js",[],function(){})});
//# sourceMappingURL=accessibility.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+167
View File
@@ -0,0 +1,167 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Annotations module
(c) 2009-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(d){"object"===typeof module&&module.exports?(d["default"]=d,module.exports=d):"function"===typeof define&&define.amd?define("highcharts/modules/annotations-advanced",["highcharts"],function(u){d(u);d.Highcharts=u;return d}):d("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(d){function u(l,d,p,h){l.hasOwnProperty(d)||(l[d]=h.apply(null,p))}d=d?d._modules:{};u(d,"Extensions/Annotations/Mixins/EventEmitterMixin.js",[d["Core/Globals.js"],d["Core/Utilities.js"]],function(l,d){var k=
d.addEvent,h=d.fireEvent,w=d.objectEach,e=d.pick,g=d.removeEvent;return{addEvents:function(){var c=this,b=function(b){k(b,l.isTouchDevice?"touchstart":"mousedown",function(b){c.onMouseDown(b)})};b(this.graphic.element);(c.labels||[]).forEach(function(a){a.options.useHTML&&a.graphic.text&&b(a.graphic.text.element)});w(c.options.events,function(b,a){var f=function(f){"click"===a&&c.cancelClick||b.call(c,c.chart.pointer.normalize(f),c.target)};if(-1===(c.nonDOMEvents||[]).indexOf(a))c.graphic.on(a,f);
else k(c,a,f)});if(c.options.draggable&&(k(c,"drag",c.onDrag),!c.graphic.renderer.styledMode)){var a={cursor:{x:"ew-resize",y:"ns-resize",xy:"move"}[c.options.draggable]};c.graphic.css(a);(c.labels||[]).forEach(function(b){b.options.useHTML&&b.graphic.text&&b.graphic.text.css(a)})}c.isUpdating||h(c,"add")},removeDocEvents:function(){this.removeDrag&&(this.removeDrag=this.removeDrag());this.removeMouseUp&&(this.removeMouseUp=this.removeMouseUp())},onMouseDown:function(c){var b=this,a=b.chart.pointer;
c.preventDefault&&c.preventDefault();if(2!==c.button){c=a.normalize(c);var f=c.chartX;var n=c.chartY;b.cancelClick=!1;b.chart.hasDraggedAnnotation=!0;b.removeDrag=k(l.doc,l.isTouchDevice?"touchmove":"mousemove",function(c){b.hasDragged=!0;c=a.normalize(c);c.prevChartX=f;c.prevChartY=n;h(b,"drag",c);f=c.chartX;n=c.chartY});b.removeMouseUp=k(l.doc,l.isTouchDevice?"touchend":"mouseup",function(a){b.cancelClick=b.hasDragged;b.hasDragged=!1;b.chart.hasDraggedAnnotation=!1;h(e(b.target,b),"afterUpdate");
b.onMouseUp(a)})}},onMouseUp:function(c){var b=this.chart;c=this.target||this;var a=b.options.annotations;b=b.annotations.indexOf(c);this.removeDocEvents();a[b]=c.options},onDrag:function(c){if(this.chart.isInsidePlot(c.chartX-this.chart.plotLeft,c.chartY-this.chart.plotTop)){var b=this.mouseMoveToTranslation(c);"x"===this.options.draggable&&(b.y=0);"y"===this.options.draggable&&(b.x=0);this.points.length?this.translate(b.x,b.y):(this.shapes.forEach(function(a){a.translate(b.x,b.y)}),this.labels.forEach(function(a){a.translate(b.x,
b.y)}));this.redraw(!1)}},mouseMoveToRadians:function(c,b,a){var f=c.prevChartY-a,n=c.prevChartX-b;a=c.chartY-a;c=c.chartX-b;this.chart.inverted&&(b=n,n=f,f=b,b=c,c=a,a=b);return Math.atan2(a,c)-Math.atan2(f,n)},mouseMoveToTranslation:function(c){var b=c.chartX-c.prevChartX;c=c.chartY-c.prevChartY;if(this.chart.inverted){var a=c;c=b;b=a}return{x:b,y:c}},mouseMoveToScale:function(c,b,a){b=(c.chartX-b||1)/(c.prevChartX-b||1);c=(c.chartY-a||1)/(c.prevChartY-a||1);this.chart.inverted&&(a=c,c=b,b=a);return{x:b,
y:c}},destroy:function(){this.removeDocEvents();g(this);this.hcEvents=null}}});u(d,"Extensions/Annotations/ControlPoint.js",[d["Core/Utilities.js"],d["Extensions/Annotations/Mixins/EventEmitterMixin.js"]],function(l,d){var k=l.merge,h=l.pick;return function(){function l(e,g,c,b){this.addEvents=d.addEvents;this.graphic=void 0;this.mouseMoveToRadians=d.mouseMoveToRadians;this.mouseMoveToScale=d.mouseMoveToScale;this.mouseMoveToTranslation=d.mouseMoveToTranslation;this.onDrag=d.onDrag;this.onMouseDown=
d.onMouseDown;this.onMouseUp=d.onMouseUp;this.removeDocEvents=d.removeDocEvents;this.nonDOMEvents=["drag"];this.chart=e;this.target=g;this.options=c;this.index=h(c.index,b)}l.prototype.setVisibility=function(e){this.graphic.attr("visibility",e?"visible":"hidden");this.options.visible=e};l.prototype.render=function(){var e=this.chart,g=this.options;this.graphic=e.renderer.symbol(g.symbol,0,0,g.width,g.height).add(e.controlPointsGroup).css(g.style);this.setVisibility(g.visible);this.addEvents()};l.prototype.redraw=
function(e){this.graphic[e?"animate":"attr"](this.options.positioner.call(this,this.target))};l.prototype.destroy=function(){d.destroy.call(this);this.graphic&&(this.graphic=this.graphic.destroy());this.options=this.target=this.chart=null};l.prototype.update=function(e){var g=this.chart,c=this.target,b=this.index;e=k(!0,this.options,e);this.destroy();this.constructor(g,c,e,b);this.render(g.controlPointsGroup);this.redraw()};return l}()});u(d,"Extensions/Annotations/MockPoint.js",[d["Core/Globals.js"],
d["Core/Utilities.js"]],function(l,d){var k=d.defined,h=d.fireEvent;return function(){function d(e,g,c){this.y=this.x=this.plotY=this.plotX=this.isInside=void 0;this.mock=!0;this.series={visible:!0,chart:e,getPlotBox:l.Series.prototype.getPlotBox};this.target=g||null;this.options=c;this.applyOptions(this.getOptions())}d.fromPoint=function(e){return new d(e.series.chart,null,{x:e.x,y:e.y,xAxis:e.series.xAxis,yAxis:e.series.yAxis})};d.pointToPixels=function(e,g){var c=e.series,b=c.chart,a=e.plotX,f=
e.plotY;b.inverted&&(e.mock?(a=e.plotY,f=e.plotX):(a=b.plotWidth-e.plotY,f=b.plotHeight-e.plotX));c&&!g&&(e=c.getPlotBox(),a+=e.translateX,f+=e.translateY);return{x:a,y:f}};d.pointToOptions=function(e){return{x:e.x,y:e.y,xAxis:e.series.xAxis,yAxis:e.series.yAxis}};d.prototype.hasDynamicOptions=function(){return"function"===typeof this.options};d.prototype.getOptions=function(){return this.hasDynamicOptions()?this.options(this.target):this.options};d.prototype.applyOptions=function(e){this.command=
e.command;this.setAxis(e,"x");this.setAxis(e,"y");this.refresh()};d.prototype.setAxis=function(e,g){g+="Axis";e=e[g];var c=this.series.chart;this.series[g]=e instanceof l.Axis?e:k(e)?c[g][e]||c.get(e):null};d.prototype.toAnchor=function(){var e=[this.plotX,this.plotY,0,0];this.series.chart.inverted&&(e[0]=this.plotY,e[1]=this.plotX);return e};d.prototype.getLabelConfig=function(){return{x:this.x,y:this.y,point:this}};d.prototype.isInsidePlot=function(){var e=this.plotX,g=this.plotY,c=this.series.xAxis,
b=this.series.yAxis,a={x:e,y:g,isInsidePlot:!0};c&&(a.isInsidePlot=k(e)&&0<=e&&e<=c.len);b&&(a.isInsidePlot=a.isInsidePlot&&k(g)&&0<=g&&g<=b.len);h(this.series.chart,"afterIsInsidePlot",a);return a.isInsidePlot};d.prototype.refresh=function(){var e=this.series,g=e.xAxis;e=e.yAxis;var c=this.getOptions();g?(this.x=c.x,this.plotX=g.toPixels(c.x,!0)):(this.x=null,this.plotX=c.x);e?(this.y=c.y,this.plotY=e.toPixels(c.y,!0)):(this.y=null,this.plotY=c.y);this.isInside=this.isInsidePlot()};d.prototype.translate=
function(e,g,c,b){this.hasDynamicOptions()||(this.plotX+=c,this.plotY+=b,this.refreshOptions())};d.prototype.scale=function(e,g,c,b){if(!this.hasDynamicOptions()){var a=this.plotY*b;this.plotX=(1-c)*e+this.plotX*c;this.plotY=(1-b)*g+a;this.refreshOptions()}};d.prototype.rotate=function(e,g,c){if(!this.hasDynamicOptions()){var b=Math.cos(c);c=Math.sin(c);var a=this.plotX,f=this.plotY;a-=e;f-=g;this.plotX=a*b-f*c+e;this.plotY=a*c+f*b+g;this.refreshOptions()}};d.prototype.refreshOptions=function(){var e=
this.series,g=e.xAxis;e=e.yAxis;this.x=this.options.x=g?this.options.x=g.toValue(this.plotX,!0):this.plotX;this.y=this.options.y=e?e.toValue(this.plotY,!0):this.plotY};return d}()});u(d,"Extensions/Annotations/Mixins/ControllableMixin.js",[d["Extensions/Annotations/ControlPoint.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Tooltip.js"],d["Core/Utilities.js"]],function(l,d,p,h){var k=h.isObject,e=h.isString,g=h.merge,c=h.splat;return{init:function(b,a,c){this.annotation=b;this.chart=b.chart;
this.options=a;this.points=[];this.controlPoints=[];this.index=c;this.linkPoints();this.addControlPoints()},attr:function(){this.graphic.attr.apply(this.graphic,arguments)},getPointsOptions:function(){var b=this.options;return b.points||b.point&&c(b.point)},attrsFromOptions:function(b){var a=this.constructor.attrsMap,c={},n,q=this.chart.styledMode;for(n in b){var e=a[n];!e||q&&-1!==["fill","stroke","stroke-width"].indexOf(e)||(c[e]=b[n])}return c},anchor:function(b){var a=b.series.getPlotBox();b=
b.mock?b.toAnchor():p.prototype.getAnchor.call({chart:b.series.chart},b);b={x:b[0]+(this.options.x||0),y:b[1]+(this.options.y||0),height:b[2]||0,width:b[3]||0};return{relativePosition:b,absolutePosition:g(b,{x:b.x+a.translateX,y:b.y+a.translateY})}},point:function(b,a){if(b&&b.series)return b;a&&null!==a.series||(k(b)?a=new d(this.chart,this,b):e(b)?a=this.chart.get(b)||null:"function"===typeof b&&(a=b.call(a,this),a=a.series?a:new d(this.chart,this,b)));return a},linkPoints:function(){var b=this.getPointsOptions(),
a=this.points,c=b&&b.length||0,n;for(n=0;n<c;n++){var q=this.point(b[n],a[n]);if(!q){a.length=0;return}q.mock&&q.refresh();a[n]=q}return a},addControlPoints:function(){var b=this.options.controlPoints;(b||[]).forEach(function(a,c){a=g(this.options.controlPointOptions,a);a.index||(a.index=c);b[c]=a;this.controlPoints.push(new l(this.chart,this,a))},this)},shouldBeDrawn:function(){return!!this.points.length},render:function(b){this.controlPoints.forEach(function(b){b.render()})},redraw:function(b){this.controlPoints.forEach(function(a){a.redraw(b)})},
transform:function(b,a,c,n,q){if(this.chart.inverted){var f=a;a=c;c=f}this.points.forEach(function(f,e){this.transformPoint(b,a,c,n,q,e)},this)},transformPoint:function(b,a,c,n,q,e){var f=this.points[e];f.mock||(f=this.points[e]=d.fromPoint(f));f[b](a,c,n,q)},translate:function(b,a){this.transform("translate",null,null,b,a)},translatePoint:function(b,a,c){this.transformPoint("translate",null,null,b,a,c)},translateShape:function(b,a){var c=this.annotation.chart,n=this.annotation.userOptions,q=c.annotations.indexOf(this.annotation);
c=c.options.annotations[q];this.translatePoint(b,a,0);c[this.collection][this.index].point=this.options.point;n[this.collection][this.index].point=this.options.point},rotate:function(b,a,c){this.transform("rotate",b,a,c)},scale:function(b,a,c,n){this.transform("scale",b,a,c,n)},setControlPointsVisibility:function(b){this.controlPoints.forEach(function(a){a.setVisibility(b)})},destroy:function(){this.graphic&&(this.graphic=this.graphic.destroy());this.tracker&&(this.tracker=this.tracker.destroy());
this.controlPoints.forEach(function(b){b.destroy()});this.options=this.controlPoints=this.points=this.chart=null;this.annotation&&(this.annotation=null)},update:function(b){var a=this.annotation;b=g(!0,this.options,b);var c=this.graphic.parentGroup;this.destroy();this.constructor(a,b);this.render(c);this.redraw()}}});u(d,"Extensions/Annotations/Mixins/MarkerMixin.js",[d["Core/Chart/Chart.js"],d["Core/Renderer/SVG/SVGRenderer.js"],d["Core/Utilities.js"]],function(l,d,p){function h(b){return function(a){this.attr(b,
"url(#"+a+")")}}var k=p.addEvent,e=p.defined,g=p.merge,c=p.objectEach,b=p.uniqueKey,a={arrow:{tagName:"marker",render:!1,id:"arrow",refY:5,refX:9,markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 0 L 10 5 L 0 10 Z",strokeWidth:0}]},"reverse-arrow":{tagName:"marker",render:!1,id:"reverse-arrow",refY:5,refX:1,markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 5 L 10 0 L 10 10 Z",strokeWidth:0}]}};d.prototype.addMarker=function(b,a){var c={id:b},f={stroke:a.color||"none",fill:a.color||
"rgba(0, 0, 0, 0.75)"};c.children=a.children.map(function(b){return g(f,b)});a=this.definition(g(!0,{markerWidth:20,markerHeight:20,refX:0,refY:0,orient:"auto"},a,c));a.id=b;return a};d={markerEndSetter:h("marker-end"),markerStartSetter:h("marker-start"),setItemMarkers:function(a){var c=a.options,f=a.chart,d=f.options.defs,m=c.fill,r=e(m)&&"none"!==m?m:c.stroke;["markerStart","markerEnd"].forEach(function(n){var m=c[n],q;if(m){for(q in d){var e=d[q];if(m===e.id&&"marker"===e.tagName){var l=e;break}}l&&
(m=a[n]=f.renderer.addMarker((c.id||b())+"-"+l.id,g(l,{color:r})),a.attr(n,m.attr("id")))}})}};k(l,"afterGetContainer",function(){this.options.defs=g(a,this.options.defs||{});c(this.options.defs,function(b){"marker"===b.tagName&&!1!==b.render&&this.renderer.addMarker(b.id,b)},this)});return d});u(d,"Extensions/Annotations/Controllables/ControllablePath.js",[d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Core/Globals.js"],d["Extensions/Annotations/Mixins/MarkerMixin.js"],d["Core/Utilities.js"]],
function(d,k,p,h){var l=h.extend,e="rgba(192,192,192,"+(k.svg?.0001:.002)+")";return function(){function g(c,b,a){this.addControlPoints=d.addControlPoints;this.anchor=d.anchor;this.attr=d.attr;this.attrsFromOptions=d.attrsFromOptions;this.destroy=d.destroy;this.getPointsOptions=d.getPointsOptions;this.init=d.init;this.linkPoints=d.linkPoints;this.point=d.point;this.rotate=d.rotate;this.scale=d.scale;this.setControlPointsVisibility=d.setControlPointsVisibility;this.setMarkers=p.setItemMarkers;this.transform=
d.transform;this.transformPoint=d.transformPoint;this.translate=d.translate;this.translatePoint=d.translatePoint;this.translateShape=d.translateShape;this.update=d.update;this.type="path";this.init(c,b,a);this.collection="shapes"}g.prototype.toD=function(){var c=this.options.d;if(c)return"function"===typeof c?c.call(this):c;c=this.points;var b=c.length,a=b,f=c[0],n=a&&this.anchor(f).absolutePosition,q=0,e=[];if(n)for(e.push(["M",n.x,n.y]);++q<b&&a;)f=c[q],a=f.command||"L",n=this.anchor(f).absolutePosition,
"M"===a?e.push([a,n.x,n.y]):"L"===a?e.push([a,n.x,n.y]):"Z"===a&&e.push([a]),a=f.series.visible;return a?this.chart.renderer.crispLine(e,this.graphic.strokeWidth()):null};g.prototype.shouldBeDrawn=function(){return d.shouldBeDrawn.call(this)||!!this.options.d};g.prototype.render=function(c){var b=this.options,a=this.attrsFromOptions(b);this.graphic=this.annotation.chart.renderer.path([["M",0,0]]).attr(a).add(c);b.className&&this.graphic.addClass(b.className);this.tracker=this.annotation.chart.renderer.path([["M",
0,0]]).addClass("highcharts-tracker-line").attr({zIndex:2}).add(c);this.annotation.chart.styledMode||this.tracker.attr({"stroke-linejoin":"round",stroke:e,fill:e,"stroke-width":this.graphic.strokeWidth()+2*b.snap});d.render.call(this);l(this.graphic,{markerStartSetter:p.markerStartSetter,markerEndSetter:p.markerEndSetter});this.setMarkers(this)};g.prototype.redraw=function(c){var b=this.toD(),a=c?"animate":"attr";b?(this.graphic[a]({d:b}),this.tracker[a]({d:b})):(this.graphic.attr({d:"M 0 -9000000000"}),
this.tracker.attr({d:"M 0 -9000000000"}));this.graphic.placed=this.tracker.placed=!!b;d.redraw.call(this,c)};g.attrsMap={dashStyle:"dashstyle",strokeWidth:"stroke-width",stroke:"stroke",fill:"fill",zIndex:"zIndex"};return g}()});u(d,"Extensions/Annotations/Controllables/ControllableRect.js",[d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Extensions/Annotations/Controllables/ControllablePath.js"],d["Core/Utilities.js"]],function(d,k,p){var l=p.merge;return function(){function h(e,g,c){this.addControlPoints=
d.addControlPoints;this.anchor=d.anchor;this.attr=d.attr;this.attrsFromOptions=d.attrsFromOptions;this.destroy=d.destroy;this.getPointsOptions=d.getPointsOptions;this.init=d.init;this.linkPoints=d.linkPoints;this.point=d.point;this.rotate=d.rotate;this.scale=d.scale;this.setControlPointsVisibility=d.setControlPointsVisibility;this.shouldBeDrawn=d.shouldBeDrawn;this.transform=d.transform;this.transformPoint=d.transformPoint;this.translatePoint=d.translatePoint;this.translateShape=d.translateShape;
this.update=d.update;this.type="rect";this.translate=d.translateShape;this.init(e,g,c);this.collection="shapes"}h.prototype.render=function(e){var g=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.rect(0,-9E9,0,0).attr(g).add(e);d.render.call(this)};h.prototype.redraw=function(e){var g=this.anchor(this.points[0]).absolutePosition;if(g)this.graphic[e?"animate":"attr"]({x:g.x,y:g.y,width:this.options.width,height:this.options.height});else this.attr({x:0,y:-9E9});this.graphic.placed=
!!g;d.redraw.call(this,e)};h.attrsMap=l(k.attrsMap,{width:"width",height:"height"});return h}()});u(d,"Extensions/Annotations/Controllables/ControllableCircle.js",[d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Extensions/Annotations/Controllables/ControllablePath.js"],d["Core/Utilities.js"]],function(d,k,p){var l=p.merge;return function(){function h(e,g,c){this.addControlPoints=d.addControlPoints;this.anchor=d.anchor;this.attr=d.attr;this.attrsFromOptions=d.attrsFromOptions;this.destroy=
d.destroy;this.getPointsOptions=d.getPointsOptions;this.init=d.init;this.linkPoints=d.linkPoints;this.point=d.point;this.rotate=d.rotate;this.scale=d.scale;this.setControlPointsVisibility=d.setControlPointsVisibility;this.shouldBeDrawn=d.shouldBeDrawn;this.transform=d.transform;this.transformPoint=d.transformPoint;this.translatePoint=d.translatePoint;this.translateShape=d.translateShape;this.update=d.update;this.type="circle";this.translate=d.translateShape;this.init(e,g,c);this.collection="shapes"}
h.prototype.render=function(e){var g=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.circle(0,-9E9,0).attr(g).add(e);d.render.call(this)};h.prototype.redraw=function(e){var g=this.anchor(this.points[0]).absolutePosition;if(g)this.graphic[e?"animate":"attr"]({x:g.x,y:g.y,r:this.options.r});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!g;d.redraw.call(this,e)};h.prototype.setRadius=function(d){this.options.r=d};h.attrsMap=l(k.attrsMap,{r:"r"});return h}()});
u(d,"Extensions/Annotations/Controllables/ControllableLabel.js",[d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Renderer/SVG/SVGRenderer.js"],d["Core/Tooltip.js"],d["Core/Utilities.js"]],function(d,k,p,h,w){var e=w.extend,g=w.format,c=w.isNumber,b=w.pick;w=function(){function a(b,a,c){this.addControlPoints=d.addControlPoints;this.attr=d.attr;this.attrsFromOptions=d.attrsFromOptions;this.destroy=d.destroy;this.getPointsOptions=d.getPointsOptions;
this.init=d.init;this.linkPoints=d.linkPoints;this.point=d.point;this.rotate=d.rotate;this.scale=d.scale;this.setControlPointsVisibility=d.setControlPointsVisibility;this.shouldBeDrawn=d.shouldBeDrawn;this.transform=d.transform;this.transformPoint=d.transformPoint;this.translateShape=d.translateShape;this.update=d.update;this.init(b,a,c);this.collection="labels"}a.alignedPosition=function(b,a){var c=b.align,f=b.verticalAlign,n=(a.x||0)+(b.x||0),d=(a.y||0)+(b.y||0),e,g;"right"===c?e=1:"center"===c&&
(e=2);e&&(n+=(a.width-(b.width||0))/e);"bottom"===f?g=1:"middle"===f&&(g=2);g&&(d+=(a.height-(b.height||0))/g);return{x:Math.round(n),y:Math.round(d)}};a.justifiedOptions=function(b,a,c,d){var f=c.align,n=c.verticalAlign,e=a.box?0:a.padding||0,q=a.getBBox();a={align:f,verticalAlign:n,x:c.x,y:c.y,width:a.width,height:a.height};c=d.x-b.plotLeft;var g=d.y-b.plotTop;d=c+e;0>d&&("right"===f?a.align="left":a.x=-d);d=c+q.width-e;d>b.plotWidth&&("left"===f?a.align="right":a.x=b.plotWidth-d);d=g+e;0>d&&("bottom"===
n?a.verticalAlign="top":a.y=-d);d=g+q.height-e;d>b.plotHeight&&("top"===n?a.verticalAlign="bottom":a.y=b.plotHeight-d);return a};a.prototype.translatePoint=function(b,a){d.translatePoint.call(this,b,a,0)};a.prototype.translate=function(b,a){var c=this.annotation.chart,f=this.annotation.userOptions,n=c.annotations.indexOf(this.annotation);n=c.options.annotations[n];c.inverted&&(c=b,b=a,a=c);this.options.x+=b;this.options.y+=a;n[this.collection][this.index].x=this.options.x;n[this.collection][this.index].y=
this.options.y;f[this.collection][this.index].x=this.options.x;f[this.collection][this.index].y=this.options.y};a.prototype.render=function(b){var c=this.options,f=this.attrsFromOptions(c),e=c.style;this.graphic=this.annotation.chart.renderer.label("",0,-9999,c.shape,null,null,c.useHTML,null,"annotation-label").attr(f).add(b);this.annotation.chart.styledMode||("contrast"===e.color&&(e.color=this.annotation.chart.renderer.getContrast(-1<a.shapesWithoutBackground.indexOf(c.shape)?"#FFFFFF":c.backgroundColor)),
this.graphic.css(c.style).shadow(c.shadow));c.className&&this.graphic.addClass(c.className);this.graphic.labelrank=c.labelrank;d.render.call(this)};a.prototype.redraw=function(b){var a=this.options,c=this.text||a.format||a.text,f=this.graphic,e=this.points[0];f.attr({text:c?g(c,e.getLabelConfig(),this.annotation.chart):a.formatter.call(e,this)});a=this.anchor(e);(c=this.position(a))?(f.alignAttr=c,c.anchorX=a.absolutePosition.x,c.anchorY=a.absolutePosition.y,f[b?"animate":"attr"](c)):f.attr({x:0,
y:-9999});f.placed=!!c;d.redraw.call(this,b)};a.prototype.anchor=function(b){var a=d.anchor.apply(this,arguments),c=this.options.x||0,f=this.options.y||0;a.absolutePosition.x-=c;a.absolutePosition.y-=f;a.relativePosition.x-=c;a.relativePosition.y-=f;return a};a.prototype.position=function(c){var f=this.graphic,d=this.annotation.chart,g=this.points[0],m=this.options,r=c.absolutePosition,t=c.relativePosition;if(c=g.series.visible&&k.prototype.isInsidePlot.call(g)){if(m.distance)var y=h.prototype.getPosition.call({chart:d,
distance:b(m.distance,16)},f.width,f.height,{plotX:t.x,plotY:t.y,negative:g.negative,ttBelow:g.ttBelow,h:t.height||t.width});else m.positioner?y=m.positioner.call(this):(g={x:r.x,y:r.y,width:0,height:0},y=a.alignedPosition(e(m,{width:f.width,height:f.height}),g),"justify"===this.options.overflow&&(y=a.alignedPosition(a.justifiedOptions(d,f,m,y),g)));m.crop&&(m=y.x-d.plotLeft,g=y.y-d.plotTop,c=d.isInsidePlot(m,g)&&d.isInsidePlot(m+f.width,g+f.height))}return c?y:null};a.attrsMap={backgroundColor:"fill",
borderColor:"stroke",borderWidth:"stroke-width",zIndex:"zIndex",borderRadius:"r",padding:"padding"};a.shapesWithoutBackground=["connector"];return a}();p.prototype.symbols.connector=function(a,b,d,e,g){var f=g&&g.anchorX;g=g&&g.anchorY;var n=d/2;if(c(f)&&c(g)){var q=[["M",f,g]];var h=b-g;0>h&&(h=-e-h);h<d&&(n=f<a+d/2?h:d-h);g>b+e?q.push(["L",a+n,b+e]):g<b?q.push(["L",a+n,b]):f<a?q.push(["L",a,b+e/2]):f>a+d&&q.push(["L",a+d,b+e/2])}return q||[]};return w});u(d,"Extensions/Annotations/Controllables/ControllableImage.js",
[d["Extensions/Annotations/Controllables/ControllableLabel.js"],d["Extensions/Annotations/Mixins/ControllableMixin.js"]],function(d,k){return function(){function l(d,l,e){this.addControlPoints=k.addControlPoints;this.anchor=k.anchor;this.attr=k.attr;this.attrsFromOptions=k.attrsFromOptions;this.destroy=k.destroy;this.getPointsOptions=k.getPointsOptions;this.init=k.init;this.linkPoints=k.linkPoints;this.point=k.point;this.rotate=k.rotate;this.scale=k.scale;this.setControlPointsVisibility=k.setControlPointsVisibility;
this.shouldBeDrawn=k.shouldBeDrawn;this.transform=k.transform;this.transformPoint=k.transformPoint;this.translatePoint=k.translatePoint;this.translateShape=k.translateShape;this.update=k.update;this.type="image";this.translate=k.translateShape;this.init(d,l,e);this.collection="shapes"}l.prototype.render=function(d){var h=this.attrsFromOptions(this.options),e=this.options;this.graphic=this.annotation.chart.renderer.image(e.src,0,-9E9,e.width,e.height).attr(h).add(d);this.graphic.width=e.width;this.graphic.height=
e.height;k.render.call(this)};l.prototype.redraw=function(h){var l=this.anchor(this.points[0]);if(l=d.prototype.position.call(this,l))this.graphic[h?"animate":"attr"]({x:l.x,y:l.y});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!l;k.redraw.call(this,h)};l.attrsMap={width:"width",height:"height",zIndex:"zIndex"};return l}()});u(d,"Extensions/Annotations/Annotations.js",[d["Core/Chart/Chart.js"],d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Extensions/Annotations/Controllables/ControllableRect.js"],
d["Extensions/Annotations/Controllables/ControllableCircle.js"],d["Extensions/Annotations/Controllables/ControllablePath.js"],d["Extensions/Annotations/Controllables/ControllableImage.js"],d["Extensions/Annotations/Controllables/ControllableLabel.js"],d["Extensions/Annotations/ControlPoint.js"],d["Extensions/Annotations/Mixins/EventEmitterMixin.js"],d["Core/Globals.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Pointer.js"],d["Core/Utilities.js"]],function(d,k,p,h,w,e,g,c,b,a,f,n,q){d=d.prototype;
var l=q.addEvent,m=q.defined,r=q.destroyObjectProperties,t=q.erase,y=q.extend,B=q.find,x=q.fireEvent,A=q.getDeferredAnimation,v=q.merge,z=q.pick,D=q.splat;q=q.wrap;var C=function(){function a(a,b){this.annotation=void 0;this.coll="annotations";this.shapesGroup=this.labelsGroup=this.labelCollector=this.group=this.graphic=this.animationConfig=this.collection=void 0;this.chart=a;this.points=[];this.controlPoints=[];this.coll="annotations";this.labels=[];this.shapes=[];this.options=v(this.defaultOptions,
b);this.userOptions=b;b=this.getLabelsAndShapesOptions(this.options,b);this.options.labels=b.labels;this.options.shapes=b.shapes;this.init(a,this.options)}a.prototype.init=function(){var a=this.chart,b=this.options.animation;this.linkPoints();this.addControlPoints();this.addShapes();this.addLabels();this.setLabelCollector();this.animationConfig=A(a,b)};a.prototype.getLabelsAndShapesOptions=function(a,b){var c={};["labels","shapes"].forEach(function(f){a[f]&&(c[f]=D(b[f]).map(function(b,c){return v(a[f][c],
b)}))});return c};a.prototype.addShapes=function(){(this.options.shapes||[]).forEach(function(a,b){a=this.initShape(a,b);v(!0,this.options.shapes[b],a.options)},this)};a.prototype.addLabels=function(){(this.options.labels||[]).forEach(function(a,b){a=this.initLabel(a,b);v(!0,this.options.labels[b],a.options)},this)};a.prototype.addClipPaths=function(){this.setClipAxes();this.clipXAxis&&this.clipYAxis&&(this.clipRect=this.chart.renderer.clipRect(this.getClipBox()))};a.prototype.setClipAxes=function(){var a=
this.chart.xAxis,b=this.chart.yAxis,c=(this.options.labels||[]).concat(this.options.shapes||[]).reduce(function(c,f){return[a[f&&f.point&&f.point.xAxis]||c[0],b[f&&f.point&&f.point.yAxis]||c[1]]},[]);this.clipXAxis=c[0];this.clipYAxis=c[1]};a.prototype.getClipBox=function(){if(this.clipXAxis&&this.clipYAxis)return{x:this.clipXAxis.left,y:this.clipYAxis.top,width:this.clipXAxis.width,height:this.clipYAxis.height}};a.prototype.setLabelCollector=function(){var a=this;a.labelCollector=function(){return a.labels.reduce(function(a,
b){b.options.allowOverlap||a.push(b.graphic);return a},[])};a.chart.labelCollectors.push(a.labelCollector)};a.prototype.setOptions=function(a){this.options=v(this.defaultOptions,a)};a.prototype.redraw=function(a){this.linkPoints();this.graphic||this.render();this.clipRect&&this.clipRect.animate(this.getClipBox());this.redrawItems(this.shapes,a);this.redrawItems(this.labels,a);k.redraw.call(this,a)};a.prototype.redrawItems=function(a,b){for(var c=a.length;c--;)this.redrawItem(a[c],b)};a.prototype.renderItems=
function(a){for(var b=a.length;b--;)this.renderItem(a[b])};a.prototype.render=function(){var a=this.chart.renderer;this.graphic=a.g("annotation").attr({opacity:0,zIndex:this.options.zIndex,visibility:this.options.visible?"visible":"hidden"}).add();this.shapesGroup=a.g("annotation-shapes").add(this.graphic).clip(this.chart.plotBoxClip);this.labelsGroup=a.g("annotation-labels").attr({translateX:0,translateY:0}).add(this.graphic);this.addClipPaths();this.clipRect&&this.graphic.clip(this.clipRect);this.renderItems(this.shapes);
this.renderItems(this.labels);this.addEvents();k.render.call(this)};a.prototype.setVisibility=function(a){var b=this.options;a=z(a,!b.visible);this.graphic.attr("visibility",a?"visible":"hidden");a||this.setControlPointsVisibility(!1);b.visible=a};a.prototype.setControlPointsVisibility=function(a){var b=function(b){b.setControlPointsVisibility(a)};k.setControlPointsVisibility.call(this,a);this.shapes.forEach(b);this.labels.forEach(b)};a.prototype.destroy=function(){var a=this.chart,c=function(a){a.destroy()};
this.labels.forEach(c);this.shapes.forEach(c);this.clipYAxis=this.clipXAxis=null;t(a.labelCollectors,this.labelCollector);b.destroy.call(this);k.destroy.call(this);r(this,a)};a.prototype.remove=function(){return this.chart.removeAnnotation(this)};a.prototype.update=function(a,b){var c=this.chart,f=this.getLabelsAndShapesOptions(this.userOptions,a),d=c.annotations.indexOf(this);a=v(!0,this.userOptions,a);a.labels=f.labels;a.shapes=f.shapes;this.destroy();this.constructor(c,a);c.options.annotations[d]=
a;this.isUpdating=!0;z(b,!0)&&c.redraw();x(this,"afterUpdate");this.isUpdating=!1};a.prototype.initShape=function(b,c){b=v(this.options.shapeOptions,{controlPointOptions:this.options.controlPointOptions},b);c=new a.shapesMap[b.type](this,b,c);c.itemType="shape";this.shapes.push(c);return c};a.prototype.initLabel=function(a,b){a=v(this.options.labelOptions,{controlPointOptions:this.options.controlPointOptions},a);b=new g(this,a,b);b.itemType="label";this.labels.push(b);return b};a.prototype.redrawItem=
function(a,b){a.linkPoints();a.shouldBeDrawn()?(a.graphic||this.renderItem(a),a.redraw(z(b,!0)&&a.graphic.placed),a.points.length&&this.adjustVisibility(a)):this.destroyItem(a)};a.prototype.adjustVisibility=function(a){var b=!1,c=a.graphic;a.points.forEach(function(a){!1!==a.series.visible&&!1!==a.visible&&(b=!0)});b?"hidden"===c.visibility&&c.show():c.hide()};a.prototype.destroyItem=function(a){t(this[a.itemType+"s"],a);a.destroy()};a.prototype.renderItem=function(a){a.render("label"===a.itemType?
this.labelsGroup:this.shapesGroup)};a.ControlPoint=c;a.MockPoint=f;a.shapesMap={rect:p,circle:h,path:w,image:e};a.types={};return a}();v(!0,C.prototype,k,b,v(C.prototype,{nonDOMEvents:["add","afterUpdate","drag","remove"],defaultOptions:{visible:!0,animation:{},draggable:"xy",labelOptions:{align:"center",allowOverlap:!1,backgroundColor:"rgba(0, 0, 0, 0.75)",borderColor:"black",borderRadius:3,borderWidth:1,className:"",crop:!1,formatter:function(){return m(this.y)?this.y:"Annotation label"},includeInDataExport:!0,
overflow:"justify",padding:5,shadow:!1,shape:"callout",style:{fontSize:"11px",fontWeight:"normal",color:"contrast"},useHTML:!1,verticalAlign:"bottom",x:0,y:-16},shapeOptions:{stroke:"rgba(0, 0, 0, 0.75)",strokeWidth:1,fill:"rgba(0, 0, 0, 0.75)",r:0,snap:2},controlPointOptions:{symbol:"circle",width:10,height:10,style:{stroke:"black","stroke-width":2,fill:"white"},visible:!1,events:{}},events:{},zIndex:6}}));a.extendAnnotation=function(a,b,c,f){b=b||C;v(!0,a.prototype,b.prototype,c);a.prototype.defaultOptions=
v(a.prototype.defaultOptions,f||{})};y(d,{initAnnotation:function(a){a=new (C.types[a.type]||C)(this,a);this.annotations.push(a);return a},addAnnotation:function(a,b){a=this.initAnnotation(a);this.options.annotations.push(a.options);z(b,!0)&&(a.redraw(),a.graphic.attr({opacity:1}));return a},removeAnnotation:function(a){var b=this.annotations,c="annotations"===a.coll?a:B(b,function(b){return b.options.id===a});c&&(x(c,"remove"),t(this.options.annotations,c.options),t(b,c),c.destroy())},drawAnnotations:function(){this.plotBoxClip.attr(this.plotBox);
this.annotations.forEach(function(a){a.redraw();a.graphic.animate({opacity:1},a.animationConfig)})}});d.collectionsWithUpdate.push("annotations");d.collectionsWithInit.annotations=[d.addAnnotation];d.callbacks.push(function(a){a.annotations=[];a.options.annotations||(a.options.annotations=[]);a.plotBoxClip=this.renderer.clipRect(this.plotBox);a.controlPointsGroup=a.renderer.g("control-points").attr({zIndex:99}).clip(a.plotBoxClip).add();a.options.annotations.forEach(function(b,c){b=a.initAnnotation(b);
a.options.annotations[c]=b.options});a.drawAnnotations();l(a,"redraw",a.drawAnnotations);l(a,"destroy",function(){a.plotBoxClip.destroy();a.controlPointsGroup.destroy()});l(a,"exportData",function(b){var c,f,d,n,e,m,g,r,q=a.annotations,t=(this.options.exporting&&this.options.exporting.csv||{}).columnHeaderFormatter,x=!b.dataRows[1].xValues,h=null===(f=null===(c=a.options.lang)||void 0===c?void 0:c.exportData)||void 0===f?void 0:f.annotationHeader;c=function(a){if(t){var b=t(a);if(!1!==b)return b}b=
h+" "+a;return x?{columnTitle:b,topLevelColumnTitle:b}:b};var v=b.dataRows[0].length,A=null===(e=null===(n=null===(d=a.options.exporting)||void 0===d?void 0:d.csv)||void 0===n?void 0:n.annotations)||void 0===e?void 0:e.itemDelimiter,l=null===(r=null===(g=null===(m=a.options.exporting)||void 0===m?void 0:m.csv)||void 0===g?void 0:g.annotations)||void 0===r?void 0:r.join;q.forEach(function(a){a.options.labelOptions.includeInDataExport&&a.labels.forEach(function(a){if(a.options.text){var c=a.options.text;
a.points.forEach(function(a){var f=a.x,d=a.series.xAxis?a.series.xAxis.options.index:-1,n=!1;if(-1===d){a=b.dataRows[0].length;for(var e=Array(a),m=0;m<a;++m)e[m]="";e.push(c);e.xValues=[];e.xValues[d]=f;b.dataRows.push(e);n=!0}n||b.dataRows.forEach(function(a,b){!n&&a.xValues&&void 0!==d&&f===a.xValues[d]&&(l&&a.length>v?a[a.length-1]+=A+c:a.push(c),n=!0)});if(!n){a=b.dataRows[0].length;e=Array(a);for(m=0;m<a;++m)e[m]="";e[0]=f;e.push(c);e.xValues=[];void 0!==d&&(e.xValues[d]=f);b.dataRows.push(e)}})}})});
var z=0;b.dataRows.forEach(function(a){z=Math.max(z,a.length)});d=z-b.dataRows[0].length;for(n=0;n<d;n++)e=c(n+1),x?(b.dataRows[0].push(e.topLevelColumnTitle),b.dataRows[1].push(e.columnTitle)):b.dataRows[0].push(e)})});q(n.prototype,"onContainerMouseDown",function(a){this.chart.hasDraggedAnnotation||a.apply(this,Array.prototype.slice.call(arguments,1))});return a.Annotation=C});u(d,"Extensions/Annotations/Types/BasicAnnotation.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/MockPoint.js"],
d["Core/Utilities.js"]],function(d,k,p){var h=this&&this.__extends||function(){var d=function(e,c){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])};return d(e,c)};return function(e,c){function b(){this.constructor=e}d(e,c);e.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}}();p=p.merge;var l=function(e){function g(c,b){return e.call(this,c,b)||this}h(g,e);g.prototype.addControlPoints=
function(){var c=this.options,b=g.basicControlPoints,a=this.basicType;(c.labels||c.shapes).forEach(function(c){c.controlPoints=b[a]})};g.prototype.init=function(){var c=this.options;c.shapes?(delete c.labelOptions,this.basicType="circle"===c.shapes[0].type?"circle":"rectangle"):(delete c.shapes,this.basicType="label");d.prototype.init.apply(this,arguments)};g.basicControlPoints={label:[{symbol:"triangle-down",positioner:function(c){if(!c.graphic.placed)return{x:0,y:-9E7};c=k.pointToPixels(c.points[0]);
return{x:c.x-this.graphic.width/2,y:c.y-this.graphic.height/2}},events:{drag:function(c,b){c=this.mouseMoveToTranslation(c);b.translatePoint(c.x,c.y);b.annotation.userOptions.labels[0].point=b.options.point;b.redraw(!1)}}},{symbol:"square",positioner:function(c){return c.graphic.placed?{x:c.graphic.alignAttr.x-this.graphic.width/2,y:c.graphic.alignAttr.y-this.graphic.height/2}:{x:0,y:-9E7}},events:{drag:function(c,b){c=this.mouseMoveToTranslation(c);b.translate(c.x,c.y);b.annotation.userOptions.labels[0].point=
b.options.point;b.redraw(!1)}}}],rectangle:[{positioner:function(c){c=k.pointToPixels(c.points[2]);return{x:c.x-4,y:c.y-4}},events:{drag:function(c,b){var a=b.annotation,f=this.chart.pointer.getCoordinates(c);c=f.xAxis[0].value;f=f.yAxis[0].value;var d=b.options.points;d[1].x=c;d[2].x=c;d[2].y=f;d[3].y=f;a.userOptions.shapes[0].points=b.options.points;a.redraw(!1)}}}],circle:[{positioner:function(c){var b=k.pointToPixels(c.points[0]);c=c.options.r;return{x:b.x+c*Math.cos(Math.PI/4)-this.graphic.width/
2,y:b.y+c*Math.sin(Math.PI/4)-this.graphic.height/2}},events:{drag:function(c,b){var a=b.annotation;c=this.mouseMoveToTranslation(c);b.setRadius(Math.max(b.options.r+c.y/Math.sin(Math.PI/4),5));a.userOptions.shapes[0].r=b.options.r;a.userOptions.shapes[0].point=b.options.point;b.redraw(!1)}}}]};return g}(d);l.prototype.defaultOptions=p(d.prototype.defaultOptions,{});return d.types.basicAnnotation=l});u(d,"Extensions/Annotations/Types/CrookedLine.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/ControlPoint.js"],
d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p,h){var l=this&&this.__extends||function(){var d=function(c,b){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return d(c,b)};return function(c,b){function a(){this.constructor=c}d(c,b);c.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}}(),e=h.merge;h=function(d){function c(b,a){return d.call(this,b,
a)||this}l(c,d);c.prototype.setClipAxes=function(){this.clipXAxis=this.chart.xAxis[this.options.typeOptions.xAxis];this.clipYAxis=this.chart.yAxis[this.options.typeOptions.yAxis]};c.prototype.getPointsOptions=function(){var b=this.options.typeOptions;return(b.points||[]).map(function(a){a.xAxis=b.xAxis;a.yAxis=b.yAxis;return a})};c.prototype.getControlPointsOptions=function(){return this.getPointsOptions()};c.prototype.addControlPoints=function(){this.getControlPointsOptions().forEach(function(b,
a){a=new k(this.chart,this,e(this.options.controlPointOptions,b.controlPoint),a);this.controlPoints.push(a);b.controlPoint=a.options},this)};c.prototype.addShapes=function(){var b=this.options.typeOptions,a=this.initShape(e(b.line,{type:"path",points:this.points.map(function(a,b){return function(a){return a.annotation.points[b]}})}),!1);b.line=a.options};return c}(d);h.prototype.defaultOptions=e(d.prototype.defaultOptions,{typeOptions:{xAxis:0,yAxis:0,line:{fill:"none"}},controlPointOptions:{positioner:function(d){var c=
this.graphic;d=p.pointToPixels(d.points[this.index]);return{x:d.x-c.width/2,y:d.y-c.height/2}},events:{drag:function(d,c){c.chart.isInsidePlot(d.chartX-c.chart.plotLeft,d.chartY-c.chart.plotTop)&&(d=this.mouseMoveToTranslation(d),c.translatePoint(d.x,d.y,this.index),c.options.typeOptions.points[this.index].x=c.points[this.index].x,c.options.typeOptions.points[this.index].y=c.points[this.index].y,c.redraw(!1))}}}});return d.types.crookedLine=h});u(d,"Extensions/Annotations/Types/ElliottWave.js",[d["Extensions/Annotations/Annotations.js"],
d["Extensions/Annotations/Types/CrookedLine.js"],d["Core/Utilities.js"]],function(d,k,p){var h=this&&this.__extends||function(){var d=function(e,c){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])};return d(e,c)};return function(e,c){function b(){this.constructor=e}d(e,c);e.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}}(),l=p.merge;p=function(d){function e(c,b){return d.call(this,
c,b)||this}h(e,d);e.prototype.addLabels=function(){this.getPointsOptions().forEach(function(c,b){var a=this.initLabel(l(c.label,{text:this.options.typeOptions.labels[b],point:function(a){return a.annotation.points[b]}}),!1);c.label=a.options},this)};return e}(k);p.prototype.defaultOptions=l(k.prototype.defaultOptions,{typeOptions:{labels:"(0) (A) (B) (C) (D) (E)".split(" "),line:{strokeWidth:1}},labelOptions:{align:"center",allowOverlap:!0,crop:!0,overflow:"none",type:"rect",backgroundColor:"none",
borderWidth:0,y:-5}});return d.types.elliottWave=p});u(d,"Extensions/Annotations/Types/Tunnel.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/ControlPoint.js"],d["Extensions/Annotations/Types/CrookedLine.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p,h,w){var e=this&&this.__extends||function(){var c=function(b,a){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&
(a[c]=b[c])};return c(b,a)};return function(b,a){function d(){this.constructor=b}c(b,a);b.prototype=null===a?Object.create(a):(d.prototype=a.prototype,new d)}}(),g=w.merge;w=function(c){function b(a,b){return c.call(this,a,b)||this}e(b,c);b.prototype.getPointsOptions=function(){var a=p.prototype.getPointsOptions.call(this);a[2]=this.heightPointOptions(a[1]);a[3]=this.heightPointOptions(a[0]);return a};b.prototype.getControlPointsOptions=function(){return this.getPointsOptions().slice(0,2)};b.prototype.heightPointOptions=
function(a){a=g(a);a.y+=this.options.typeOptions.height;return a};b.prototype.addControlPoints=function(){p.prototype.addControlPoints.call(this);var a=this.options,b=a.typeOptions;a=new k(this.chart,this,g(a.controlPointOptions,b.heightControlPoint),2);this.controlPoints.push(a);b.heightControlPoint=a.options};b.prototype.addShapes=function(){this.addLine();this.addBackground()};b.prototype.addLine=function(){var a=this.initShape(g(this.options.typeOptions.line,{type:"path",points:[this.points[0],
this.points[1],function(a){a=h.pointToOptions(a.annotation.points[2]);a.command="M";return a},this.points[3]]}),!1);this.options.typeOptions.line=a.options};b.prototype.addBackground=function(){var a=this.initShape(g(this.options.typeOptions.background,{type:"path",points:this.points.slice()}));this.options.typeOptions.background=a.options};b.prototype.translateSide=function(a,b,c){c=Number(c);var d=0===c?3:2;this.translatePoint(a,b,c);this.translatePoint(a,b,d)};b.prototype.translateHeight=function(a){this.translatePoint(0,
a,2);this.translatePoint(0,a,3);this.options.typeOptions.height=this.points[3].y-this.points[0].y};return b}(p);w.prototype.defaultOptions=g(p.prototype.defaultOptions,{typeOptions:{xAxis:0,yAxis:0,background:{fill:"rgba(130, 170, 255, 0.4)",strokeWidth:0},line:{strokeWidth:1},height:-2,heightControlPoint:{positioner:function(c){var b=h.pointToPixels(c.points[2]);c=h.pointToPixels(c.points[3]);var a=(b.x+c.x)/2;return{x:a-this.graphic.width/2,y:(c.y-b.y)/(c.x-b.x)*(a-b.x)+b.y-this.graphic.height/
2}},events:{drag:function(c,b){b.chart.isInsidePlot(c.chartX-b.chart.plotLeft,c.chartY-b.chart.plotTop)&&(b.translateHeight(this.mouseMoveToTranslation(c).y),b.redraw(!1))}}}},controlPointOptions:{events:{drag:function(c,b){b.chart.isInsidePlot(c.chartX-b.chart.plotLeft,c.chartY-b.chart.plotTop)&&(c=this.mouseMoveToTranslation(c),b.translateSide(c.x,c.y,this.index),b.redraw(!1))}}}});return d.types.tunnel=w});u(d,"Extensions/Annotations/Types/InfinityLine.js",[d["Extensions/Annotations/Annotations.js"],
d["Extensions/Annotations/Types/CrookedLine.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p,h){var l=this&&this.__extends||function(){var d=function(c,b){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return d(c,b)};return function(c,b){function a(){this.constructor=c}d(c,b);c.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}}(),e=h.merge;h=
function(d){function c(b,a){return d.call(this,b,a)||this}l(c,d);c.edgePoint=function(b,a){return function(d){d=d.annotation;var f=d.points,e=d.options.typeOptions.type;"horizontalLine"===e?f=[f[0],new p(d.chart,f[0].target,{x:f[0].x+1,y:f[0].y,xAxis:f[0].options.xAxis,yAxis:f[0].options.yAxis})]:"verticalLine"===e&&(f=[f[0],new p(d.chart,f[0].target,{x:f[0].x,y:f[0].y+1,xAxis:f[0].options.xAxis,yAxis:f[0].options.yAxis})]);return c.findEdgePoint(f[b],f[a])}};c.findEdgeCoordinate=function(b,a,c,d){var f=
"x"===c?"y":"x";return(a[c]-b[c])*(d-b[f])/(a[f]-b[f])+b[c]};c.findEdgePoint=function(b,a){var d=b.series.xAxis,e=a.series.yAxis,q=p.pointToPixels(b),g=p.pointToPixels(a),m=g.x-q.x,r=g.y-q.y;a=d.left;var t=a+d.width;d=e.top;e=d+e.height;var h=0>m?a:t,l=0>r?d:e;t={x:0===m?q.x:h,y:0===r?q.y:l};0!==m&&0!==r&&(m=c.findEdgeCoordinate(q,g,"y",h),q=c.findEdgeCoordinate(q,g,"x",l),m>=d&&m<=e?(t.x=h,t.y=m):(t.x=q,t.y=l));t.x-=a;t.y-=d;b.series.chart.inverted&&(b=t.x,t.x=t.y,t.y=b);return t};c.prototype.addShapes=
function(){var b=this.options.typeOptions,a=[this.points[0],c.endEdgePoint];b.type.match(/Line/g)&&(a[0]=c.startEdgePoint);a=this.initShape(e(b.line,{type:"path",points:a}),!1);b.line=a.options};c.endEdgePoint=c.edgePoint(0,1);c.startEdgePoint=c.edgePoint(1,0);return c}(k);h.prototype.defaultOptions=e(k.prototype.defaultOptions,{});return d.types.infinityLine=h});u(d,"Extensions/Annotations/Types/Fibonacci.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/MockPoint.js"],d["Extensions/Annotations/Types/Tunnel.js"],
d["Core/Utilities.js"]],function(d,k,p,h){var l=this&&this.__extends||function(){var c=function(b,a){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return c(b,a)};return function(b,a){function d(){this.constructor=b}c(b,a);b.prototype=null===a?Object.create(a):(d.prototype=a.prototype,new d)}}(),e=h.merge,g=function(c,b){return function(){var a=this.annotation,d=this.anchor(a.startRetracements[c]).absolutePosition,
e=this.anchor(a.endRetracements[c]).absolutePosition;d=[["M",Math.round(d.x),Math.round(d.y)],["L",Math.round(e.x),Math.round(e.y)]];b&&(e=this.anchor(a.endRetracements[c-1]).absolutePosition,a=this.anchor(a.startRetracements[c-1]).absolutePosition,d.push(["L",Math.round(e.x),Math.round(e.y)],["L",Math.round(a.x),Math.round(a.y)]));return d}};h=function(c){function b(a,b){return c.call(this,a,b)||this}l(b,c);b.prototype.linkPoints=function(){c.prototype.linkPoints.call(this);this.linkRetracementsPoints()};
b.prototype.linkRetracementsPoints=function(){var a=this.points,c=a[0].y-a[3].y,d=a[1].y-a[2].y,e=a[0].x,g=a[1].x;b.levels.forEach(function(b,f){var m=a[0].y-c*b;b=a[1].y-d*b;this.startRetracements=this.startRetracements||[];this.endRetracements=this.endRetracements||[];this.linkRetracementPoint(f,e,m,this.startRetracements);this.linkRetracementPoint(f,g,b,this.endRetracements)},this)};b.prototype.linkRetracementPoint=function(a,b,c,d){var f=d[a],e=this.options.typeOptions;f?(f.options.x=b,f.options.y=
c,f.refresh()):d[a]=new k(this.chart,this,{x:b,y:c,xAxis:e.xAxis,yAxis:e.yAxis})};b.prototype.addShapes=function(){b.levels.forEach(function(a,b){this.initShape({type:"path",d:g(b)},!1);0<b&&this.initShape({type:"path",fill:this.options.typeOptions.backgroundColors[b-1],strokeWidth:0,d:g(b,!0)})},this)};b.prototype.addLabels=function(){b.levels.forEach(function(a,b){var c=this.options.typeOptions;a=this.initLabel(e(c.labels[b],{point:function(a){return k.pointToOptions(a.annotation.startRetracements[b])},
text:a.toString()}));c.labels[b]=a.options},this)};b.levels=[0,.236,.382,.5,.618,.786,1];return b}(p);h.prototype.defaultOptions=e(p.prototype.defaultOptions,{typeOptions:{height:2,backgroundColors:"rgba(130, 170, 255, 0.4);rgba(139, 191, 216, 0.4);rgba(150, 216, 192, 0.4);rgba(156, 229, 161, 0.4);rgba(162, 241, 130, 0.4);rgba(169, 255, 101, 0.4)".split(";"),lineColor:"grey",lineColors:[],labels:[]},labelOptions:{allowOverlap:!0,align:"right",backgroundColor:"none",borderWidth:0,crop:!1,overflow:"none",
shape:"rect",style:{color:"grey"},verticalAlign:"middle",y:0}});return d.types.fibonacci=h});u(d,"Extensions/Annotations/Types/Pitchfork.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/Types/InfinityLine.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p,h){var l=this&&this.__extends||function(){var d=function(c,b){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&
(a[c]=b[c])};return d(c,b)};return function(c,b){function a(){this.constructor=c}d(c,b);c.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}}(),e=h.merge;h=function(d){function c(b,a){return d.call(this,b,a)||this}l(c,d);c.outerLineEdgePoint=function(b){return function(a){var d=a.annotation,e=d.points;return c.findEdgePoint(e[b],e[0],new p(d.chart,a,d.midPointOptions()))}};c.findEdgePoint=function(b,a,c){a=Math.atan2(c.plotY-a.plotY,c.plotX-a.plotX);return{x:b.plotX+1E7*Math.cos(a),
y:b.plotY+1E7*Math.sin(a)}};c.middleLineEdgePoint=function(b){var a=b.annotation;return k.findEdgePoint(a.points[0],new p(a.chart,b,a.midPointOptions()))};c.prototype.midPointOptions=function(){var b=this.points;return{x:(b[1].x+b[2].x)/2,y:(b[1].y+b[2].y)/2,xAxis:b[0].series.xAxis,yAxis:b[0].series.yAxis}};c.prototype.addShapes=function(){this.addLines();this.addBackgrounds()};c.prototype.addLines=function(){this.initShape({type:"path",points:[this.points[0],c.middleLineEdgePoint]},!1);this.initShape({type:"path",
points:[this.points[1],c.topLineEdgePoint]},!1);this.initShape({type:"path",points:[this.points[2],c.bottomLineEdgePoint]},!1)};c.prototype.addBackgrounds=function(){var b=this.shapes,a=this.options.typeOptions,c=this.initShape(e(a.innerBackground,{type:"path",points:[function(a){var b=a.annotation;a=b.points;b=b.midPointOptions();return{x:(a[1].x+b.x)/2,y:(a[1].y+b.y)/2,xAxis:b.xAxis,yAxis:b.yAxis}},b[1].points[1],b[2].points[1],function(a){var b=a.annotation;a=b.points;b=b.midPointOptions();return{x:(b.x+
a[2].x)/2,y:(b.y+a[2].y)/2,xAxis:b.xAxis,yAxis:b.yAxis}}]}));b=this.initShape(e(a.outerBackground,{type:"path",points:[this.points[1],b[1].points[1],b[2].points[1],this.points[2]]}));a.innerBackground=c.options;a.outerBackground=b.options};c.topLineEdgePoint=c.outerLineEdgePoint(1);c.bottomLineEdgePoint=c.outerLineEdgePoint(0);return c}(k);h.prototype.defaultOptions=e(k.prototype.defaultOptions,{typeOptions:{innerBackground:{fill:"rgba(130, 170, 255, 0.4)",strokeWidth:0},outerBackground:{fill:"rgba(156, 229, 161, 0.4)",
strokeWidth:0}}});return d.types.pitchfork=h});u(d,"Extensions/Annotations/Types/VerticalLine.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p){var h=this&&this.__extends||function(){var d=function(e,c){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])};return d(e,c)};return function(e,c){function b(){this.constructor=e}d(e,
c);e.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}}(),l=p.merge;p=function(d){function e(c,b){return d.call(this,c,b)||this}h(e,d);e.connectorFirstPoint=function(c){c=c.annotation;var b=c.points[0],a=k.pointToPixels(b,!0),d=a.y,e=c.options.typeOptions.label.offset;c.chart.inverted&&(d=a.x);return{x:b.x,xAxis:b.series.xAxis,y:d+e}};e.connectorSecondPoint=function(c){var b=c.annotation;c=b.options.typeOptions;var a=b.points[0],d=c.yOffset;b=k.pointToPixels(a,!0)[b.chart.inverted?
"x":"y"];0>c.label.offset&&(d*=-1);return{x:a.x,xAxis:a.series.xAxis,y:b+d}};e.prototype.getPointsOptions=function(){return[this.options.typeOptions.point]};e.prototype.addShapes=function(){var c=this.options.typeOptions,b=this.initShape(l(c.connector,{type:"path",points:[e.connectorFirstPoint,e.connectorSecondPoint]}),!1);c.connector=b.options};e.prototype.addLabels=function(){var c=this.options.typeOptions,b=c.label,a=0,d=b.offset,e=0>b.offset?"bottom":"top",g="center";this.chart.inverted&&(a=b.offset,
d=0,e="middle",g=0>b.offset?"right":"left");b=this.initLabel(l(b,{verticalAlign:e,align:g,x:a,y:d}));c.label=b.options};return e}(d);p.prototype.defaultOptions=l(d.prototype.defaultOptions,{typeOptions:{yOffset:10,label:{offset:-40,point:function(d){return d.annotation.points[0]},allowOverlap:!0,backgroundColor:"none",borderWidth:0,crop:!0,overflow:"none",shape:"rect",text:"{y:.2f}"},connector:{strokeWidth:1,markerEnd:"arrow"}}});return d.types.verticalLine=p});u(d,"Extensions/Annotations/Types/Measure.js",
[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/ControlPoint.js"],d["Core/Utilities.js"]],function(d,k,p){var h=this&&this.__extends||function(){var b=function(a,c){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return b(a,c)};return function(a,c){function d(){this.constructor=a}b(a,c);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}(),l=p.extend,e=p.isNumber,
g=p.merge,c=function(b){function a(a,c){return b.call(this,a,c)||this}h(a,b);a.prototype.init=function(b,c,e){d.prototype.init.call(this,b,c,e);this.resizeY=this.resizeX=this.offsetY=this.offsetX=0;a.calculations.init.call(this);this.addValues();this.addShapes()};a.prototype.setClipAxes=function(){this.clipXAxis=this.chart.xAxis[this.options.typeOptions.xAxis];this.clipYAxis=this.chart.yAxis[this.options.typeOptions.yAxis]};a.prototype.pointsOptions=function(){return this.options.points};a.prototype.shapePointsOptions=
function(){var a=this.options.typeOptions,b=a.xAxis;a=a.yAxis;return[{x:this.xAxisMin,y:this.yAxisMin,xAxis:b,yAxis:a},{x:this.xAxisMax,y:this.yAxisMin,xAxis:b,yAxis:a},{x:this.xAxisMax,y:this.yAxisMax,xAxis:b,yAxis:a},{x:this.xAxisMin,y:this.yAxisMax,xAxis:b,yAxis:a}]};a.prototype.addControlPoints=function(){var a=this.options.typeOptions.selectType;var b=new k(this.chart,this,this.options.controlPointOptions,0);this.controlPoints.push(b);"xy"!==a&&(b=new k(this.chart,this,this.options.controlPointOptions,
1),this.controlPoints.push(b))};a.prototype.addValues=function(b){var c=this.options.typeOptions,d=c.label.formatter;a.calculations.recalculate.call(this,b);c.label.enabled&&(0<this.labels.length?this.labels[0].text=d&&d.call(this)||a.calculations.defaultFormatter.call(this):this.initLabel(l({shape:"rect",backgroundColor:"none",color:"black",borderWidth:0,dashStyle:"dash",overflow:"none",align:"left",vertical:"top",crop:!0,point:function(a){a=a.annotation;var b=a.chart,d=b.inverted,e=b.yAxis[c.yAxis],
f=b.plotTop,g=b.plotLeft;return{x:(d?f:10)+b.xAxis[c.xAxis].toPixels(a.xAxisMin,!d),y:(d?-g+10:f)+e.toPixels(a.yAxisMin)}},text:d&&d.call(this)||a.calculations.defaultFormatter.call(this)},c.label)))};a.prototype.addShapes=function(){this.addCrosshairs();this.addBackground()};a.prototype.addBackground=function(){"undefined"!==typeof this.shapePointsOptions()[0].x&&this.initShape(l({type:"path",points:this.shapePointsOptions()},this.options.typeOptions.background),!1)};a.prototype.addCrosshairs=function(){var a=
this.chart,b=this.options.typeOptions,c=this.options.typeOptions.point,d=a.xAxis[b.xAxis],e=a.yAxis[b.yAxis],r=a.inverted;a=d.toPixels(this.xAxisMin);d=d.toPixels(this.xAxisMax);var t=e.toPixels(this.yAxisMin),h=e.toPixels(this.yAxisMax),k={point:c,type:"path"};c=[];e=[];r&&(r=a,a=t,t=r,r=d,d=h,h=r);b.crosshairX.enabled&&(c=[["M",a,t+(h-t)/2],["L",d,t+(h-t)/2]]);b.crosshairY.enabled&&(e=[["M",a+(d-a)/2,t],["L",a+(d-a)/2,h]]);0<this.shapes.length?(this.shapes[0].options.d=c,this.shapes[1].options.d=
e):(a=g(k,b.crosshairX),b=g(k,b.crosshairY),this.initShape(l({d:c},a),!1),this.initShape(l({d:e},b),!1))};a.prototype.onDrag=function(a){var b=this.mouseMoveToTranslation(a),c=this.options.typeOptions.selectType;a="y"===c?0:b.x;b="x"===c?0:b.y;this.translate(a,b);this.offsetX+=a;this.offsetY+=b;this.redraw(!1,!1,!0)};a.prototype.resize=function(b,c,d,e){var f=this.shapes[2];"x"===e?0===d?(f.translatePoint(b,0,0),f.translatePoint(b,c,3)):(f.translatePoint(b,0,1),f.translatePoint(b,c,2)):"y"===e?0===
d?(f.translatePoint(0,c,0),f.translatePoint(0,c,1)):(f.translatePoint(0,c,2),f.translatePoint(0,c,3)):(f.translatePoint(b,0,1),f.translatePoint(b,c,2),f.translatePoint(0,c,3));a.calculations.updateStartPoints.call(this,!1,!0,d,b,c);this.options.typeOptions.background.height=Math.abs(this.startYMax-this.startYMin);this.options.typeOptions.background.width=Math.abs(this.startXMax-this.startXMin)};a.prototype.redraw=function(b,c,d){this.linkPoints();this.graphic||this.render();d&&a.calculations.updateStartPoints.call(this,
!0,!1);this.clipRect&&this.clipRect.animate(this.getClipBox());this.addValues(c);this.addCrosshairs();this.redrawItems(this.shapes,b);this.redrawItems(this.labels,b);this.controlPoints.forEach(function(a){a.redraw()})};a.prototype.translate=function(a,b){this.shapes.forEach(function(c){c.translate(a,b)});this.options.typeOptions.point.x=this.startXMin;this.options.typeOptions.point.y=this.startYMin};a.calculations={init:function(){var b=this.options.typeOptions,c=this.chart,d=a.calculations.getPointPos,
g=c.inverted,m=c.xAxis[b.xAxis];c=c.yAxis[b.yAxis];var r=b.background,h=g?r.height:r.width;r=g?r.width:r.height;var l=b.selectType,k=g?m.left:c.top;g=g?c.top:m.left;this.startXMin=b.point.x;this.startYMin=b.point.y;e(h)?this.startXMax=this.startXMin+h:this.startXMax=d(m,this.startXMin,parseFloat(h));e(r)?this.startYMax=this.startYMin-r:this.startYMax=d(c,this.startYMin,parseFloat(r));"x"===l?(this.startYMin=c.toValue(k),this.startYMax=c.toValue(k+c.len)):"y"===l&&(this.startXMin=m.toValue(g),this.startXMax=
m.toValue(g+m.len))},recalculate:function(b){var c=a.calculations,d=this.options.typeOptions,e=this.chart.xAxis[d.xAxis];d=this.chart.yAxis[d.yAxis];var f=a.calculations.getPointPos,r=this.offsetX,g=this.offsetY;this.xAxisMin=f(e,this.startXMin,r);this.xAxisMax=f(e,this.startXMax,r);this.yAxisMin=f(d,this.startYMin,g);this.yAxisMax=f(d,this.startYMax,g);this.min=c.min.call(this);this.max=c.max.call(this);this.average=c.average.call(this);this.bins=c.bins.call(this);b&&this.resize(0,0)},getPointPos:function(a,
b,c){return a.toValue(a.toPixels(b)+c)},updateStartPoints:function(b,c,d,e,m){var f=this.options.typeOptions,g=f.selectType,h=this.chart.xAxis[f.xAxis];f=this.chart.yAxis[f.yAxis];var l=a.calculations.getPointPos,x=this.startXMin,A=this.startXMax,v=this.startYMin,k=this.startYMax,n=this.offsetX,q=this.offsetY;c&&("x"===g?0===d?this.startXMin=l(h,x,e):this.startXMax=l(h,A,e):"y"===g?0===d?this.startYMin=l(f,v,m):this.startYMax=l(f,k,m):(this.startXMax=l(h,A,e),this.startYMax=l(f,k,m)));b&&(this.startXMin=
l(h,x,n),this.startXMax=l(h,A,n),this.startYMin=l(f,v,q),this.startYMax=l(f,k,q),this.offsetY=this.offsetX=0)},defaultFormatter:function(){return"Min: "+this.min+"<br>Max: "+this.max+"<br>Average: "+this.average+"<br>Bins: "+this.bins},getExtremes:function(a,b,c,d){return{xAxisMin:Math.min(b,a),xAxisMax:Math.max(b,a),yAxisMin:Math.min(d,c),yAxisMax:Math.max(d,c)}},min:function(){var b=Infinity,c=this.chart.series,d=a.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),
e=!1;c.forEach(function(a){a.visible&&"highcharts-navigator-series"!==a.options.id&&a.points.forEach(function(a){!a.isNull&&a.y<b&&a.x>d.xAxisMin&&a.x<=d.xAxisMax&&a.y>d.yAxisMin&&a.y<=d.yAxisMax&&(b=a.y,e=!0)})});e||(b="");return b},max:function(){var b=-Infinity,c=this.chart.series,d=a.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),e=!1;c.forEach(function(a){a.visible&&"highcharts-navigator-series"!==a.options.id&&a.points.forEach(function(a){!a.isNull&&a.y>b&&
a.x>d.xAxisMin&&a.x<=d.xAxisMax&&a.y>d.yAxisMin&&a.y<=d.yAxisMax&&(b=a.y,e=!0)})});e||(b="");return b},average:function(){var a="";""!==this.max&&""!==this.min&&(a=(this.max+this.min)/2);return a},bins:function(){var b=0,c=this.chart.series,d=a.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),e=!1;c.forEach(function(a){a.visible&&"highcharts-navigator-series"!==a.options.id&&a.points.forEach(function(a){!a.isNull&&a.x>d.xAxisMin&&a.x<=d.xAxisMax&&a.y>d.yAxisMin&&a.y<=
d.yAxisMax&&(b++,e=!0)})});e||(b="");return b}};return a}(d);c.prototype.defaultOptions=g(d.prototype.defaultOptions,{typeOptions:{selectType:"xy",xAxis:0,yAxis:0,background:{fill:"rgba(130, 170, 255, 0.4)",strokeWidth:0,stroke:void 0},crosshairX:{enabled:!0,zIndex:6,dashStyle:"Dash",markerEnd:"arrow"},crosshairY:{enabled:!0,zIndex:6,dashStyle:"Dash",markerEnd:"arrow"},label:{enabled:!0,style:{fontSize:"11px",color:"#666666"},formatter:void 0}},controlPointOptions:{positioner:function(b){var a=this.index,
d=b.chart,e=b.options,g=e.typeOptions,h=g.selectType;e=e.controlPointOptions;var m=d.inverted,r=d.xAxis[g.xAxis];d=d.yAxis[g.yAxis];g=b.xAxisMax;var l=b.yAxisMax,k=c.calculations.getExtremes(b.xAxisMin,b.xAxisMax,b.yAxisMin,b.yAxisMax);"x"===h&&(l=(k.yAxisMax-k.yAxisMin)/2,0===a&&(g=b.xAxisMin));"y"===h&&(g=k.xAxisMin+(k.xAxisMax-k.xAxisMin)/2,0===a&&(l=b.yAxisMin));m?(b=d.toPixels(l),a=r.toPixels(g)):(b=r.toPixels(g),a=d.toPixels(l));return{x:b-e.width/2,y:a-e.height/2}},events:{drag:function(b,
a){var c=this.mouseMoveToTranslation(b);b=a.options.typeOptions.selectType;var d="y"===b?0:c.x;c="x"===b?0:c.y;a.resize(d,c,this.index,b);a.resizeX+=d;a.resizeY+=c;a.redraw(!1,!0)}}}});return d.types.measure=c});u(d,"Mixins/Navigation.js",[],function(){return{initUpdate:function(d){d.navigation||(d.navigation={updates:[],update:function(d,l){this.updates.forEach(function(h){h.update.call(h.context,d,l)})}})},addUpdate:function(d,k){k.navigation||this.initUpdate(k);k.navigation.updates.push({update:d,
context:k})}}});u(d,"Extensions/Annotations/NavigationBindings.js",[d["Extensions/Annotations/Annotations.js"],d["Mixins/Navigation.js"],d["Core/Globals.js"],d["Core/Utilities.js"]],function(d,k,p,h){function l(a){var c=a.prototype.defaultOptions.events&&a.prototype.defaultOptions.events.click;u(!0,a.prototype.defaultOptions.events,{click:function(a){var d=this,e=d.chart.navigationBindings,f=e.activeAnnotation;c&&c.call(d,a);f!==d?(e.deselectAnnotation(),e.activeAnnotation=d,d.setControlPointsVisibility(!0),
b(e,"showPopup",{annotation:d,formType:"annotation-toolbar",options:e.annotationToFields(d),onSubmit:function(a){var b={};"remove"===a.actionType?(e.activeAnnotation=!1,e.chart.removeAnnotation(d)):(e.fieldsToOptions(a.fields,b),e.deselectAnnotation(),a=b.typeOptions,"measure"===d.options.type&&(a.crosshairY.enabled=0!==a.crosshairY.strokeWidth,a.crosshairX.enabled=0!==a.crosshairX.strokeWidth),d.update(b))}})):(e.deselectAnnotation(),b(e,"closePopup"));a.activeAnnotation=!0}})}var e=h.addEvent,g=
h.attr,c=h.format,b=h.fireEvent,a=h.isArray,f=h.isFunction,n=h.isNumber,q=h.isObject,u=h.merge,m=h.objectEach,r=h.pick;h=h.setOptions;var t=p.doc,y=p.win,B=function(){function d(a,b){this.selectedButton=this.boundClassNames=void 0;this.chart=a;this.options=b;this.eventsToUnbind=[];this.container=t.getElementsByClassName(this.options.bindingsClassName||"")}d.prototype.initEvents=function(){var a=this,b=a.chart,c=a.container,d=a.options;a.boundClassNames={};m(d.bindings||{},function(b){a.boundClassNames[b.className]=
b});[].forEach.call(c,function(b){a.eventsToUnbind.push(e(b,"click",function(c){var d=a.getButtonEvents(b,c);d&&a.bindingsButtonClick(d.button,d.events,c)}))});m(d.events||{},function(b,c){f(b)&&a.eventsToUnbind.push(e(a,c,b))});a.eventsToUnbind.push(e(b.container,"click",function(c){!b.cancelClick&&b.isInsidePlot(c.chartX-b.plotLeft,c.chartY-b.plotTop)&&a.bindingsChartClick(this,c)}));a.eventsToUnbind.push(e(b.container,p.isTouchDevice?"touchmove":"mousemove",function(b){a.bindingsContainerMouseMove(this,
b)}))};d.prototype.initUpdate=function(){var a=this;k.addUpdate(function(b){a.update(b)},this.chart)};d.prototype.bindingsButtonClick=function(a,c,d){var e=this.chart;this.selectedButtonElement&&(b(this,"deselectButton",{button:this.selectedButtonElement}),this.nextEvent&&(this.currentUserDetails&&"annotations"===this.currentUserDetails.coll&&e.removeAnnotation(this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1));this.selectedButton=c;this.selectedButtonElement=a;b(this,"selectButton",
{button:a});c.init&&c.init.call(this,a,d);(c.start||c.steps)&&e.renderer.boxWrapper.addClass("highcharts-draw-mode")};d.prototype.bindingsChartClick=function(a,c){a=this.chart;var d=this.selectedButton;a=a.renderer.boxWrapper;var e;if(e=this.activeAnnotation&&!c.activeAnnotation&&c.target.parentNode){a:{e=c.target;var f=y.Element.prototype,g=f.matches||f.msMatchesSelector||f.webkitMatchesSelector,m=null;if(f.closest)m=f.closest.call(e,".highcharts-popup");else{do{if(g.call(e,".highcharts-popup"))break a;
e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType)}e=m}e=!e}e&&(b(this,"closePopup"),this.deselectAnnotation());d&&d.start&&(this.nextEvent?(this.nextEvent(c,this.currentUserDetails),this.steps&&(this.stepIndex++,d.steps[this.stepIndex]?this.mouseMoveEvent=this.nextEvent=d.steps[this.stepIndex]:(b(this,"deselectButton",{button:this.selectedButtonElement}),a.removeClass("highcharts-draw-mode"),d.end&&d.end.call(this,c,this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1,this.selectedButton=
null))):(this.currentUserDetails=d.start.call(this,c),d.steps?(this.stepIndex=0,this.steps=!0,this.mouseMoveEvent=this.nextEvent=d.steps[this.stepIndex]):(b(this,"deselectButton",{button:this.selectedButtonElement}),a.removeClass("highcharts-draw-mode"),this.steps=!1,this.selectedButton=null,d.end&&d.end.call(this,c,this.currentUserDetails))))};d.prototype.bindingsContainerMouseMove=function(a,b){this.mouseMoveEvent&&this.mouseMoveEvent(b,this.currentUserDetails)};d.prototype.fieldsToOptions=function(a,
b){m(a,function(a,c){var d=parseFloat(a),e=c.split("."),f=b,g=e.length-1;!n(d)||a.match(/px/g)||c.match(/format/g)||(a=d);""!==a&&"undefined"!==a&&e.forEach(function(b,c){var d=r(e[c+1],"");g===c?f[b]=a:(f[b]||(f[b]=d.match(/\d/g)?[]:{}),f=f[b])})});return b};d.prototype.deselectAnnotation=function(){this.activeAnnotation&&(this.activeAnnotation.setControlPointsVisibility(!1),this.activeAnnotation=!1)};d.prototype.annotationToFields=function(b){function e(d,f,g,r){if(g&&d&&-1===t.indexOf(f)&&(0<=
(g.indexOf&&g.indexOf(f))||g[f]||!0===g))if(a(d))r[f]=[],d.forEach(function(a,b){q(a)?(r[f][b]={},m(a,function(a,c){e(a,c,h[f],r[f][b])})):e(a,0,h[f],r[f])});else if(q(d)){var k={};a(r)?(r.push(k),k[f]={},k=k[f]):r[f]=k;m(d,function(a,b){e(a,b,0===f?g:h[f],k)})}else"format"===f?r[f]=[c(d,b.labels[0].points[0]).toString(),"text"]:a(r)?r.push([d,l(d)]):r[f]=[d,l(d)]}var f=b.options,g=d.annotationsEditable,h=g.nestedOptions,l=this.utils.getFieldType,k=r(f.type,f.shapes&&f.shapes[0]&&f.shapes[0].type,
f.labels&&f.labels[0]&&f.labels[0].itemType,"label"),t=d.annotationsNonEditable[f.langKey]||[],x={langKey:f.langKey,type:k};m(f,function(a,b){"typeOptions"===b?(x[b]={},m(f[b],function(a,c){e(a,c,h,x[b],!0)})):e(a,b,g[k],x)});return x};d.prototype.getClickedClassNames=function(a,b){var c=b.target;b=[];for(var d;c&&((d=g(c,"class"))&&(b=b.concat(d.split(" ").map(function(a){return[a,c]}))),c=c.parentNode,c!==a););return b};d.prototype.getButtonEvents=function(a,b){var c=this,d;this.getClickedClassNames(a,
b).forEach(function(a){c.boundClassNames[a[0]]&&!d&&(d={events:c.boundClassNames[a[0]],button:a[1]})});return d};d.prototype.update=function(a){this.options=u(!0,this.options,a);this.removeEvents();this.initEvents()};d.prototype.removeEvents=function(){this.eventsToUnbind.forEach(function(a){a()})};d.prototype.destroy=function(){this.removeEvents()};d.annotationsEditable={nestedOptions:{labelOptions:["style","format","backgroundColor"],labels:["style"],label:["style"],style:["fontSize","color"],background:["fill",
"strokeWidth","stroke"],innerBackground:["fill","strokeWidth","stroke"],outerBackground:["fill","strokeWidth","stroke"],shapeOptions:["fill","strokeWidth","stroke"],shapes:["fill","strokeWidth","stroke"],line:["strokeWidth","stroke"],backgroundColors:[!0],connector:["fill","strokeWidth","stroke"],crosshairX:["strokeWidth","stroke"],crosshairY:["strokeWidth","stroke"]},circle:["shapes"],verticalLine:[],label:["labelOptions"],measure:["background","crosshairY","crosshairX"],fibonacci:[],tunnel:["background",
"line","height"],pitchfork:["innerBackground","outerBackground"],rect:["shapes"],crookedLine:[],basicAnnotation:["shapes","labelOptions"]};d.annotationsNonEditable={rectangle:["crosshairX","crosshairY","label"]};return d}();B.prototype.utils={updateRectSize:function(a,b){var c=b.chart,d=b.options.typeOptions,e=c.pointer.getCoordinates(a);a=e.xAxis[0].value-d.point.x;d=d.point.y-e.yAxis[0].value;b.update({typeOptions:{background:{width:c.inverted?d:a,height:c.inverted?a:d}}})},getFieldType:function(a){return{string:"text",
number:"number","boolean":"checkbox"}[typeof a]}};p.Chart.prototype.initNavigationBindings=function(){var a=this.options;a&&a.navigation&&a.navigation.bindings&&(this.navigationBindings=new B(this,a.navigation),this.navigationBindings.initEvents(),this.navigationBindings.initUpdate())};e(p.Chart,"load",function(){this.initNavigationBindings()});e(p.Chart,"destroy",function(){this.navigationBindings&&this.navigationBindings.destroy()});e(B,"deselectButton",function(){this.selectedButtonElement=null});
e(d,"remove",function(){this.chart.navigationBindings&&this.chart.navigationBindings.deselectAnnotation()});p.Annotation&&(l(d),m(d.types,function(a){l(a)}));h({lang:{navigation:{popup:{simpleShapes:"Simple shapes",lines:"Lines",circle:"Circle",rectangle:"Rectangle",label:"Label",shapeOptions:"Shape options",typeOptions:"Details",fill:"Fill",format:"Text",strokeWidth:"Line width",stroke:"Line color",title:"Title",name:"Name",labelOptions:"Label options",labels:"Labels",backgroundColor:"Background color",
backgroundColors:"Background colors",borderColor:"Border color",borderRadius:"Border radius",borderWidth:"Border width",style:"Style",padding:"Padding",fontSize:"Font size",color:"Color",height:"Height",shapes:"Shape options"}}},navigation:{bindingsClassName:"highcharts-bindings-container",bindings:{circleAnnotation:{className:"highcharts-circle-annotation",start:function(a){a=this.chart.pointer.getCoordinates(a);var b=this.chart.options.navigation;return this.chart.addAnnotation(u({langKey:"circle",
type:"basicAnnotation",shapes:[{type:"circle",point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,y:a.yAxis[0].value},r:5}]},b.annotationsOptions,b.bindings.circleAnnotation.annotationsOptions))},steps:[function(a,b){var c=b.options.shapes[0].point,d=this.chart.xAxis[0].toPixels(c.x);c=this.chart.yAxis[0].toPixels(c.y);var e=this.chart.inverted;b.update({shapes:[{r:Math.max(Math.sqrt(Math.pow(e?c-a.chartX:d-a.chartX,2)+Math.pow(e?d-a.chartY:c-a.chartY,2)),5)}]})}]},rectangleAnnotation:{className:"highcharts-rectangle-annotation",
start:function(a){var b=this.chart.pointer.getCoordinates(a);a=this.chart.options.navigation;var c=b.xAxis[0].value;b=b.yAxis[0].value;return this.chart.addAnnotation(u({langKey:"rectangle",type:"basicAnnotation",shapes:[{type:"path",points:[{xAxis:0,yAxis:0,x:c,y:b},{xAxis:0,yAxis:0,x:c,y:b},{xAxis:0,yAxis:0,x:c,y:b},{xAxis:0,yAxis:0,x:c,y:b}]}]},a.annotationsOptions,a.bindings.rectangleAnnotation.annotationsOptions))},steps:[function(a,b){var c=b.options.shapes[0].points,d=this.chart.pointer.getCoordinates(a);
a=d.xAxis[0].value;d=d.yAxis[0].value;c[1].x=a;c[2].x=a;c[2].y=d;c[3].y=d;b.update({shapes:[{points:c}]})}]},labelAnnotation:{className:"highcharts-label-annotation",start:function(a){a=this.chart.pointer.getCoordinates(a);var b=this.chart.options.navigation;return this.chart.addAnnotation(u({langKey:"label",type:"basicAnnotation",labelOptions:{format:"{y:.2f}"},labels:[{point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,y:a.yAxis[0].value},overflow:"none",crop:!0}]},b.annotationsOptions,b.bindings.labelAnnotation.annotationsOptions))}}},
events:{},annotationsOptions:{animation:{defer:0}}}});return B});u(d,"Extensions/Annotations/Popup.js",[d["Core/Globals.js"],d["Extensions/Annotations/NavigationBindings.js"],d["Core/Pointer.js"],d["Core/Utilities.js"]],function(d,k,p,h){var l=h.addEvent,e=h.createElement,g=h.defined,c=h.getOptions,b=h.isArray,a=h.isObject,f=h.isString,n=h.objectEach,q=h.pick;h=h.wrap;var u=/\d/g;h(p.prototype,"onContainerMouseDown",function(a,b){var c=b.target&&b.target.className;f(c)&&0<=c.indexOf("highcharts-popup-field")||
a.apply(this,Array.prototype.slice.call(arguments,1))});d.Popup=function(a,b){this.init(a,b)};d.Popup.prototype={init:function(a,b){this.container=e("div",{className:"highcharts-popup"},null,a);this.lang=this.getLangpack();this.iconsURL=b;this.addCloseBtn()},addCloseBtn:function(){var a=this;var b=e("div",{className:"highcharts-popup-close"},null,this.container);b.style["background-image"]="url("+this.iconsURL+"close.svg)";["click","touchstart"].forEach(function(c){l(b,c,function(){a.closePopup()})})},
addColsContainer:function(a){var b=e("div",{className:"highcharts-popup-lhs-col"},null,a);a=e("div",{className:"highcharts-popup-rhs-col"},null,a);e("div",{className:"highcharts-popup-rhs-col-wrapper"},null,a);return{lhsCol:b,rhsCol:a}},addInput:function(a,b,c,d){var f=a.split(".");f=f[f.length-1];var g=this.lang;b="highcharts-"+b+"-"+f;b.match(u)||e("label",{innerHTML:g[f]||f,htmlFor:b},null,c);e("input",{name:b,value:d[0],type:d[1],className:"highcharts-popup-field"},null,c).setAttribute("highcharts-data-name",
a)},addButton:function(a,b,c,d,f){var g=this,m=this.closePopup,h=this.getFields;var r=e("button",{innerHTML:b},null,a);["click","touchstart"].forEach(function(a){l(r,a,function(){m.call(g);return d(h(f,c))})});return r},getFields:function(a,b){var c=a.querySelectorAll("input"),d=a.querySelectorAll("#highcharts-select-series > option:checked")[0];a=a.querySelectorAll("#highcharts-select-volume > option:checked")[0];var e,f;var g={actionType:b,linkedTo:d&&d.getAttribute("value"),fields:{}};[].forEach.call(c,
function(a){f=a.getAttribute("highcharts-data-name");(e=a.getAttribute("highcharts-data-series-id"))?g.seriesId=a.value:f?g.fields[f]=a.value:g.type=a.value});a&&(g.fields["params.volumeSeriesID"]=a.getAttribute("value"));return g},showPopup:function(){var a=this.container,b=a.querySelectorAll(".highcharts-popup-close")[0];a.innerHTML="";0<=a.className.indexOf("highcharts-annotation-toolbar")&&(a.classList.remove("highcharts-annotation-toolbar"),a.removeAttribute("style"));a.appendChild(b);a.style.display=
"block"},closePopup:function(){this.popup.container.style.display="none"},showForm:function(a,b,c,d){this.popup=b.navigationBindings.popup;this.showPopup();"indicators"===a&&this.indicators.addForm.call(this,b,c,d);"annotation-toolbar"===a&&this.annotations.addToolbar.call(this,b,c,d);"annotation-edit"===a&&this.annotations.addForm.call(this,b,c,d);"flag"===a&&this.annotations.addForm.call(this,b,c,d,!0)},getLangpack:function(){return c().lang.navigation.popup},annotations:{addToolbar:function(a,
b,c){var d=this,f=this.lang,g=this.popup.container,h=this.showForm;-1===g.className.indexOf("highcharts-annotation-toolbar")&&(g.className+=" highcharts-annotation-toolbar");g.style.top=a.plotTop+10+"px";e("span",{innerHTML:q(f[b.langKey]||b.langKey,b.shapes&&b.shapes[0].type)},null,g);var m=this.addButton(g,f.removeButton||"remove","remove",c,g);m.className+=" highcharts-annotation-remove-button";m.style["background-image"]="url("+this.iconsURL+"destroy.svg)";m=this.addButton(g,f.editButton||"edit",
"edit",function(){h.call(d,"annotation-edit",a,b,c)},g);m.className+=" highcharts-annotation-edit-button";m.style["background-image"]="url("+this.iconsURL+"edit.svg)"},addForm:function(a,b,c,d){var f=this.popup.container,g=this.lang;e("h2",{innerHTML:g[b.langKey]||b.langKey,className:"highcharts-popup-main-title"},null,f);var h=e("div",{className:"highcharts-popup-lhs-col highcharts-popup-lhs-full"},null,f);var m=e("div",{className:"highcharts-popup-bottom-row"},null,f);this.annotations.addFormFields.call(this,
h,a,"",b,[],!0);this.addButton(m,d?g.addButton||"add":g.saveButton||"save",d?"add":"save",c,f)},addFormFields:function(c,d,f,g,h,l){var m=this,k=this.annotations.addFormFields,r=this.addInput,t=this.lang,p,q;n(g,function(e,g){p=""!==f?f+"."+g:g;a(e)&&(!b(e)||b(e)&&a(e[0])?(q=t[g]||g,q.match(u)||h.push([!0,q,c]),k.call(m,c,d,p,e,h,!1)):h.push([m,p,"annotation",c,e]))});l&&(h=h.sort(function(a){return a[1].match(/format/g)?-1:1}),h.forEach(function(a){!0===a[0]?e("span",{className:"highcharts-annotation-title",
innerHTML:a[1]},null,a[2]):r.apply(a[0],a.splice(1))}))}},indicators:{addForm:function(a,b,c){var d=this.indicators,e=this.lang;this.tabs.init.call(this,a);b=this.popup.container.querySelectorAll(".highcharts-tab-item-content");this.addColsContainer(b[0]);d.addIndicatorList.call(this,a,b[0],"add");var f=b[0].querySelectorAll(".highcharts-popup-rhs-col")[0];this.addButton(f,e.addButton||"add","add",c,f);this.addColsContainer(b[1]);d.addIndicatorList.call(this,a,b[1],"edit");f=b[1].querySelectorAll(".highcharts-popup-rhs-col")[0];
this.addButton(f,e.saveButton||"save","edit",c,f);this.addButton(f,e.removeButton||"remove","remove",c,f)},addIndicatorList:function(a,b,c){var d=this,f=b.querySelectorAll(".highcharts-popup-lhs-col")[0];b=b.querySelectorAll(".highcharts-popup-rhs-col")[0];var g="edit"===c,h=g?a.series:a.options.plotOptions,m=this.indicators.addFormFields,k;var r=e("ul",{className:"highcharts-indicator-list"},null,f);var t=b.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];n(h,function(b,c){var f=b.options;
if(b.params||f&&f.params){var n=d.indicators.getNameType(b,c),p=n.type;k=e("li",{className:"highcharts-indicator-list",innerHTML:n.name},null,r);["click","touchstart"].forEach(function(c){l(k,c,function(){m.call(d,a,g?b:h[p],n.type,t);g&&b.options&&e("input",{type:"hidden",name:"highcharts-id-"+p,value:b.options.id},null,t).setAttribute("highcharts-data-series-id",b.options.id)})})}});0<r.childNodes.length&&r.childNodes[0].click()},getNameType:function(a,b){var c=a.options,e=d.seriesTypes;e=e[b]&&
e[b].prototype.nameBase||b.toUpperCase();c&&c.type&&(b=a.options.type,e=a.name);return{name:e,type:b}},listAllSeries:function(a,b,c,d,f){a="highcharts-"+b+"-type-"+a;var h;e("label",{innerHTML:this.lang[b]||b,htmlFor:a},null,d);var k=e("select",{name:a,className:"highcharts-popup-field"},null,d);k.setAttribute("id","highcharts-select-"+b);c.series.forEach(function(a){h=a.options;!h.params&&h.id&&"highcharts-navigator-series"!==h.id&&e("option",{innerHTML:h.name||h.id,value:h.id},null,k)});g(f)&&(k.value=
f)},addFormFields:function(a,b,c,d){var f=b.params||b.options.params,g=this.indicators.getNameType;d.innerHTML="";e("h3",{className:"highcharts-indicator-title",innerHTML:g(b,c).name},null,d);e("input",{type:"hidden",name:"highcharts-type-"+c,value:c},null,d);this.indicators.listAllSeries.call(this,c,"series",a,d,b.linkedParent&&f.volumeSeriesID);f.volumeSeriesID&&this.indicators.listAllSeries.call(this,c,"volume",a,d,b.linkedParent&&b.linkedParent.options.id);this.indicators.addParamInputs.call(this,
a,"params",f,c,d)},addParamInputs:function(b,c,d,e,f){var g=this,h=this.indicators.addParamInputs,k=this.addInput,l;n(d,function(d,m){l=c+"."+m;a(d)?h.call(g,b,l,d,e,f):"params.volumeSeriesID"!==l&&k.call(g,l,e,f,[d,"text"])})},getAmount:function(){var a=0;this.series.forEach(function(b){var c=b.options;(b.params||c&&c.params)&&a++});return a}},tabs:{init:function(a){var b=this.tabs;a=this.indicators.getAmount.call(a);var c=b.addMenuItem.call(this,"add");b.addMenuItem.call(this,"edit",a);b.addContentItem.call(this,
"add");b.addContentItem.call(this,"edit");b.switchTabs.call(this,a);b.selectTab.call(this,c,0)},addMenuItem:function(a,b){var c=this.popup.container,d="highcharts-tab-item",f=this.lang;0===b&&(d+=" highcharts-tab-disabled");b=e("span",{innerHTML:f[a+"Button"]||a,className:d},null,c);b.setAttribute("highcharts-data-tab-type",a);return b},addContentItem:function(){return e("div",{className:"highcharts-tab-item-content"},null,this.popup.container)},switchTabs:function(a){var b=this,c;this.popup.container.querySelectorAll(".highcharts-tab-item").forEach(function(d,
e){c=d.getAttribute("highcharts-data-tab-type");"edit"===c&&0===a||["click","touchstart"].forEach(function(a){l(d,a,function(){b.tabs.deselectAll.call(b);b.tabs.selectTab.call(b,this,e)})})})},selectTab:function(a,b){var c=this.popup.container.querySelectorAll(".highcharts-tab-item-content");a.className+=" highcharts-tab-item-active";c[b].className+=" highcharts-tab-item-show"},deselectAll:function(){var a=this.popup.container,b=a.querySelectorAll(".highcharts-tab-item");a=a.querySelectorAll(".highcharts-tab-item-content");
var c;for(c=0;c<b.length;c++)b[c].classList.remove("highcharts-tab-item-active"),a[c].classList.remove("highcharts-tab-item-show")}}};l(k,"showPopup",function(a){this.popup||(this.popup=new d.Popup(this.chart.container,this.chart.options.navigation.iconsURL||this.chart.options.stockTools&&this.chart.options.stockTools.gui.iconsURL||"https://code.highcharts.com/8.2.0/gfx/stock-icons/"));this.popup.showForm(a.formType,this.chart,a.options,a.onSubmit)});l(k,"closePopup",function(){this.popup&&this.popup.closePopup()})});
u(d,"masters/modules/annotations-advanced.src.js",[],function(){})});
//# sourceMappingURL=annotations-advanced.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+114
View File
@@ -0,0 +1,114 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Annotations module
(c) 2009-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/annotations",["highcharts"],function(v){a(v);a.Highcharts=v;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function v(c,a,p,g){c.hasOwnProperty(a)||(c[a]=g.apply(null,p))}a=a?a._modules:{};v(a,"Extensions/Annotations/Mixins/EventEmitterMixin.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(c,a){var k=a.addEvent,
g=a.fireEvent,z=a.objectEach,b=a.pick,A=a.removeEvent;return{addEvents:function(){var b=this,d=function(d){k(d,c.isTouchDevice?"touchstart":"mousedown",function(d){b.onMouseDown(d)})};d(this.graphic.element);(b.labels||[]).forEach(function(b){b.options.useHTML&&b.graphic.text&&d(b.graphic.text.element)});z(b.options.events,function(d,e){var l=function(l){"click"===e&&b.cancelClick||d.call(b,b.chart.pointer.normalize(l),b.target)};if(-1===(b.nonDOMEvents||[]).indexOf(e))b.graphic.on(e,l);else k(b,
e,l)});if(b.options.draggable&&(k(b,"drag",b.onDrag),!b.graphic.renderer.styledMode)){var e={cursor:{x:"ew-resize",y:"ns-resize",xy:"move"}[b.options.draggable]};b.graphic.css(e);(b.labels||[]).forEach(function(d){d.options.useHTML&&d.graphic.text&&d.graphic.text.css(e)})}b.isUpdating||g(b,"add")},removeDocEvents:function(){this.removeDrag&&(this.removeDrag=this.removeDrag());this.removeMouseUp&&(this.removeMouseUp=this.removeMouseUp())},onMouseDown:function(t){var d=this,e=d.chart.pointer;t.preventDefault&&
t.preventDefault();if(2!==t.button){t=e.normalize(t);var u=t.chartX;var l=t.chartY;d.cancelClick=!1;d.chart.hasDraggedAnnotation=!0;d.removeDrag=k(c.doc,c.isTouchDevice?"touchmove":"mousemove",function(b){d.hasDragged=!0;b=e.normalize(b);b.prevChartX=u;b.prevChartY=l;g(d,"drag",b);u=b.chartX;l=b.chartY});d.removeMouseUp=k(c.doc,c.isTouchDevice?"touchend":"mouseup",function(e){d.cancelClick=d.hasDragged;d.hasDragged=!1;d.chart.hasDraggedAnnotation=!1;g(b(d.target,d),"afterUpdate");d.onMouseUp(e)})}},
onMouseUp:function(b){var d=this.chart;b=this.target||this;var e=d.options.annotations;d=d.annotations.indexOf(b);this.removeDocEvents();e[d]=b.options},onDrag:function(b){if(this.chart.isInsidePlot(b.chartX-this.chart.plotLeft,b.chartY-this.chart.plotTop)){var d=this.mouseMoveToTranslation(b);"x"===this.options.draggable&&(d.y=0);"y"===this.options.draggable&&(d.x=0);this.points.length?this.translate(d.x,d.y):(this.shapes.forEach(function(b){b.translate(d.x,d.y)}),this.labels.forEach(function(b){b.translate(d.x,
d.y)}));this.redraw(!1)}},mouseMoveToRadians:function(b,d,e){var c=b.prevChartY-e,l=b.prevChartX-d;e=b.chartY-e;b=b.chartX-d;this.chart.inverted&&(d=l,l=c,c=d,d=b,b=e,e=d);return Math.atan2(e,b)-Math.atan2(c,l)},mouseMoveToTranslation:function(b){var d=b.chartX-b.prevChartX;b=b.chartY-b.prevChartY;if(this.chart.inverted){var e=b;b=d;d=e}return{x:d,y:b}},mouseMoveToScale:function(b,d,e){d=(b.chartX-d||1)/(b.prevChartX-d||1);b=(b.chartY-e||1)/(b.prevChartY-e||1);this.chart.inverted&&(e=b,b=d,d=e);return{x:d,
y:b}},destroy:function(){this.removeDocEvents();A(this);this.hcEvents=null}}});v(a,"Extensions/Annotations/ControlPoint.js",[a["Core/Utilities.js"],a["Extensions/Annotations/Mixins/EventEmitterMixin.js"]],function(c,a){var k=c.merge,g=c.pick;return function(){function c(b,c,t,d){this.addEvents=a.addEvents;this.graphic=void 0;this.mouseMoveToRadians=a.mouseMoveToRadians;this.mouseMoveToScale=a.mouseMoveToScale;this.mouseMoveToTranslation=a.mouseMoveToTranslation;this.onDrag=a.onDrag;this.onMouseDown=
a.onMouseDown;this.onMouseUp=a.onMouseUp;this.removeDocEvents=a.removeDocEvents;this.nonDOMEvents=["drag"];this.chart=b;this.target=c;this.options=t;this.index=g(t.index,d)}c.prototype.setVisibility=function(b){this.graphic.attr("visibility",b?"visible":"hidden");this.options.visible=b};c.prototype.render=function(){var b=this.chart,c=this.options;this.graphic=b.renderer.symbol(c.symbol,0,0,c.width,c.height).add(b.controlPointsGroup).css(c.style);this.setVisibility(c.visible);this.addEvents()};c.prototype.redraw=
function(b){this.graphic[b?"animate":"attr"](this.options.positioner.call(this,this.target))};c.prototype.destroy=function(){a.destroy.call(this);this.graphic&&(this.graphic=this.graphic.destroy());this.options=this.target=this.chart=null};c.prototype.update=function(b){var c=this.chart,a=this.target,d=this.index;b=k(!0,this.options,b);this.destroy();this.constructor(c,a,b,d);this.render(c.controlPointsGroup);this.redraw()};return c}()});v(a,"Extensions/Annotations/MockPoint.js",[a["Core/Globals.js"],
a["Core/Utilities.js"]],function(c,a){var k=a.defined,g=a.fireEvent;return function(){function a(b,a,t){this.y=this.x=this.plotY=this.plotX=this.isInside=void 0;this.mock=!0;this.series={visible:!0,chart:b,getPlotBox:c.Series.prototype.getPlotBox};this.target=a||null;this.options=t;this.applyOptions(this.getOptions())}a.fromPoint=function(b){return new a(b.series.chart,null,{x:b.x,y:b.y,xAxis:b.series.xAxis,yAxis:b.series.yAxis})};a.pointToPixels=function(b,c){var a=b.series,d=a.chart,e=b.plotX,u=
b.plotY;d.inverted&&(b.mock?(e=b.plotY,u=b.plotX):(e=d.plotWidth-b.plotY,u=d.plotHeight-b.plotX));a&&!c&&(b=a.getPlotBox(),e+=b.translateX,u+=b.translateY);return{x:e,y:u}};a.pointToOptions=function(b){return{x:b.x,y:b.y,xAxis:b.series.xAxis,yAxis:b.series.yAxis}};a.prototype.hasDynamicOptions=function(){return"function"===typeof this.options};a.prototype.getOptions=function(){return this.hasDynamicOptions()?this.options(this.target):this.options};a.prototype.applyOptions=function(b){this.command=
b.command;this.setAxis(b,"x");this.setAxis(b,"y");this.refresh()};a.prototype.setAxis=function(b,a){a+="Axis";b=b[a];var t=this.series.chart;this.series[a]=b instanceof c.Axis?b:k(b)?t[a][b]||t.get(b):null};a.prototype.toAnchor=function(){var b=[this.plotX,this.plotY,0,0];this.series.chart.inverted&&(b[0]=this.plotY,b[1]=this.plotX);return b};a.prototype.getLabelConfig=function(){return{x:this.x,y:this.y,point:this}};a.prototype.isInsidePlot=function(){var b=this.plotX,c=this.plotY,a=this.series.xAxis,
d=this.series.yAxis,e={x:b,y:c,isInsidePlot:!0};a&&(e.isInsidePlot=k(b)&&0<=b&&b<=a.len);d&&(e.isInsidePlot=e.isInsidePlot&&k(c)&&0<=c&&c<=d.len);g(this.series.chart,"afterIsInsidePlot",e);return e.isInsidePlot};a.prototype.refresh=function(){var b=this.series,c=b.xAxis;b=b.yAxis;var a=this.getOptions();c?(this.x=a.x,this.plotX=c.toPixels(a.x,!0)):(this.x=null,this.plotX=a.x);b?(this.y=a.y,this.plotY=b.toPixels(a.y,!0)):(this.y=null,this.plotY=a.y);this.isInside=this.isInsidePlot()};a.prototype.translate=
function(b,c,a,d){this.hasDynamicOptions()||(this.plotX+=a,this.plotY+=d,this.refreshOptions())};a.prototype.scale=function(b,c,a,d){if(!this.hasDynamicOptions()){var e=this.plotY*d;this.plotX=(1-a)*b+this.plotX*a;this.plotY=(1-d)*c+e;this.refreshOptions()}};a.prototype.rotate=function(b,c,a){if(!this.hasDynamicOptions()){var d=Math.cos(a);a=Math.sin(a);var e=this.plotX,u=this.plotY;e-=b;u-=c;this.plotX=e*d-u*a+b;this.plotY=e*a+u*d+c;this.refreshOptions()}};a.prototype.refreshOptions=function(){var b=
this.series,c=b.xAxis;b=b.yAxis;this.x=this.options.x=c?this.options.x=c.toValue(this.plotX,!0):this.plotX;this.y=this.options.y=b?b.toValue(this.plotY,!0):this.plotY};return a}()});v(a,"Extensions/Annotations/Mixins/ControllableMixin.js",[a["Extensions/Annotations/ControlPoint.js"],a["Extensions/Annotations/MockPoint.js"],a["Core/Tooltip.js"],a["Core/Utilities.js"]],function(c,a,p,g){var k=g.isObject,b=g.isString,A=g.merge,t=g.splat;return{init:function(b,c,a){this.annotation=b;this.chart=b.chart;
this.options=c;this.points=[];this.controlPoints=[];this.index=a;this.linkPoints();this.addControlPoints()},attr:function(){this.graphic.attr.apply(this.graphic,arguments)},getPointsOptions:function(){var b=this.options;return b.points||b.point&&t(b.point)},attrsFromOptions:function(b){var c=this.constructor.attrsMap,d={},a,m=this.chart.styledMode;for(a in b){var q=c[a];!q||m&&-1!==["fill","stroke","stroke-width"].indexOf(q)||(d[q]=b[a])}return d},anchor:function(b){var c=b.series.getPlotBox();b=
b.mock?b.toAnchor():p.prototype.getAnchor.call({chart:b.series.chart},b);b={x:b[0]+(this.options.x||0),y:b[1]+(this.options.y||0),height:b[2]||0,width:b[3]||0};return{relativePosition:b,absolutePosition:A(b,{x:b.x+c.translateX,y:b.y+c.translateY})}},point:function(c,e){if(c&&c.series)return c;e&&null!==e.series||(k(c)?e=new a(this.chart,this,c):b(c)?e=this.chart.get(c)||null:"function"===typeof c&&(e=c.call(e,this),e=e.series?e:new a(this.chart,this,c)));return e},linkPoints:function(){var b=this.getPointsOptions(),
c=this.points,a=b&&b.length||0,l;for(l=0;l<a;l++){var m=this.point(b[l],c[l]);if(!m){c.length=0;return}m.mock&&m.refresh();c[l]=m}return c},addControlPoints:function(){var b=this.options.controlPoints;(b||[]).forEach(function(a,d){a=A(this.options.controlPointOptions,a);a.index||(a.index=d);b[d]=a;this.controlPoints.push(new c(this.chart,this,a))},this)},shouldBeDrawn:function(){return!!this.points.length},render:function(b){this.controlPoints.forEach(function(b){b.render()})},redraw:function(b){this.controlPoints.forEach(function(c){c.redraw(b)})},
transform:function(b,c,a,l,m){if(this.chart.inverted){var d=c;c=a;a=d}this.points.forEach(function(f,d){this.transformPoint(b,c,a,l,m,d)},this)},transformPoint:function(b,c,u,l,m,q){var f=this.points[q];f.mock||(f=this.points[q]=a.fromPoint(f));f[b](c,u,l,m)},translate:function(b,c){this.transform("translate",null,null,b,c)},translatePoint:function(b,c,a){this.transformPoint("translate",null,null,b,c,a)},translateShape:function(b,c){var a=this.annotation.chart,d=this.annotation.userOptions,e=a.annotations.indexOf(this.annotation);
a=a.options.annotations[e];this.translatePoint(b,c,0);a[this.collection][this.index].point=this.options.point;d[this.collection][this.index].point=this.options.point},rotate:function(b,c,a){this.transform("rotate",b,c,a)},scale:function(b,c,a,l){this.transform("scale",b,c,a,l)},setControlPointsVisibility:function(b){this.controlPoints.forEach(function(c){c.setVisibility(b)})},destroy:function(){this.graphic&&(this.graphic=this.graphic.destroy());this.tracker&&(this.tracker=this.tracker.destroy());
this.controlPoints.forEach(function(b){b.destroy()});this.options=this.controlPoints=this.points=this.chart=null;this.annotation&&(this.annotation=null)},update:function(b){var c=this.annotation;b=A(!0,this.options,b);var a=this.graphic.parentGroup;this.destroy();this.constructor(c,b);this.render(a);this.redraw()}}});v(a,"Extensions/Annotations/Mixins/MarkerMixin.js",[a["Core/Chart/Chart.js"],a["Core/Renderer/SVG/SVGRenderer.js"],a["Core/Utilities.js"]],function(c,a,p){function g(b){return function(c){this.attr(b,
"url(#"+c+")")}}var k=p.addEvent,b=p.defined,A=p.merge,t=p.objectEach,d=p.uniqueKey,e={arrow:{tagName:"marker",render:!1,id:"arrow",refY:5,refX:9,markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 0 L 10 5 L 0 10 Z",strokeWidth:0}]},"reverse-arrow":{tagName:"marker",render:!1,id:"reverse-arrow",refY:5,refX:1,markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 5 L 10 0 L 10 10 Z",strokeWidth:0}]}};a.prototype.addMarker=function(b,c){var a={id:b},d={stroke:c.color||"none",fill:c.color||
"rgba(0, 0, 0, 0.75)"};a.children=c.children.map(function(b){return A(d,b)});c=this.definition(A(!0,{markerWidth:20,markerHeight:20,refX:0,refY:0,orient:"auto"},c,a));c.id=b;return c};a={markerEndSetter:g("marker-end"),markerStartSetter:g("marker-start"),setItemMarkers:function(c){var a=c.options,e=c.chart,q=e.options.defs,f=a.fill,h=b(f)&&"none"!==f?f:a.stroke;["markerStart","markerEnd"].forEach(function(b){var f=a[b],l;if(f){for(l in q){var n=q[l];if(f===n.id&&"marker"===n.tagName){var y=n;break}}y&&
(f=c[b]=e.renderer.addMarker((a.id||d())+"-"+y.id,A(y,{color:h})),c.attr(b,f.attr("id")))}})}};k(c,"afterGetContainer",function(){this.options.defs=A(e,this.options.defs||{});t(this.options.defs,function(b){"marker"===b.tagName&&!1!==b.render&&this.renderer.addMarker(b.id,b)},this)});return a});v(a,"Extensions/Annotations/Controllables/ControllablePath.js",[a["Extensions/Annotations/Mixins/ControllableMixin.js"],a["Core/Globals.js"],a["Extensions/Annotations/Mixins/MarkerMixin.js"],a["Core/Utilities.js"]],
function(c,a,p,g){var k=g.extend,b="rgba(192,192,192,"+(a.svg?.0001:.002)+")";return function(){function a(b,a,e){this.addControlPoints=c.addControlPoints;this.anchor=c.anchor;this.attr=c.attr;this.attrsFromOptions=c.attrsFromOptions;this.destroy=c.destroy;this.getPointsOptions=c.getPointsOptions;this.init=c.init;this.linkPoints=c.linkPoints;this.point=c.point;this.rotate=c.rotate;this.scale=c.scale;this.setControlPointsVisibility=c.setControlPointsVisibility;this.setMarkers=p.setItemMarkers;this.transform=
c.transform;this.transformPoint=c.transformPoint;this.translate=c.translate;this.translatePoint=c.translatePoint;this.translateShape=c.translateShape;this.update=c.update;this.type="path";this.init(b,a,e);this.collection="shapes"}a.prototype.toD=function(){var b=this.options.d;if(b)return"function"===typeof b?b.call(this):b;b=this.points;var c=b.length,a=c,u=b[0],l=a&&this.anchor(u).absolutePosition,m=0,q=[];if(l)for(q.push(["M",l.x,l.y]);++m<c&&a;)u=b[m],a=u.command||"L",l=this.anchor(u).absolutePosition,
"M"===a?q.push([a,l.x,l.y]):"L"===a?q.push([a,l.x,l.y]):"Z"===a&&q.push([a]),a=u.series.visible;return a?this.chart.renderer.crispLine(q,this.graphic.strokeWidth()):null};a.prototype.shouldBeDrawn=function(){return c.shouldBeDrawn.call(this)||!!this.options.d};a.prototype.render=function(a){var d=this.options,e=this.attrsFromOptions(d);this.graphic=this.annotation.chart.renderer.path([["M",0,0]]).attr(e).add(a);d.className&&this.graphic.addClass(d.className);this.tracker=this.annotation.chart.renderer.path([["M",
0,0]]).addClass("highcharts-tracker-line").attr({zIndex:2}).add(a);this.annotation.chart.styledMode||this.tracker.attr({"stroke-linejoin":"round",stroke:b,fill:b,"stroke-width":this.graphic.strokeWidth()+2*d.snap});c.render.call(this);k(this.graphic,{markerStartSetter:p.markerStartSetter,markerEndSetter:p.markerEndSetter});this.setMarkers(this)};a.prototype.redraw=function(b){var a=this.toD(),e=b?"animate":"attr";a?(this.graphic[e]({d:a}),this.tracker[e]({d:a})):(this.graphic.attr({d:"M 0 -9000000000"}),
this.tracker.attr({d:"M 0 -9000000000"}));this.graphic.placed=this.tracker.placed=!!a;c.redraw.call(this,b)};a.attrsMap={dashStyle:"dashstyle",strokeWidth:"stroke-width",stroke:"stroke",fill:"fill",zIndex:"zIndex"};return a}()});v(a,"Extensions/Annotations/Controllables/ControllableRect.js",[a["Extensions/Annotations/Mixins/ControllableMixin.js"],a["Extensions/Annotations/Controllables/ControllablePath.js"],a["Core/Utilities.js"]],function(c,a,p){var g=p.merge;return function(){function k(b,a,k){this.addControlPoints=
c.addControlPoints;this.anchor=c.anchor;this.attr=c.attr;this.attrsFromOptions=c.attrsFromOptions;this.destroy=c.destroy;this.getPointsOptions=c.getPointsOptions;this.init=c.init;this.linkPoints=c.linkPoints;this.point=c.point;this.rotate=c.rotate;this.scale=c.scale;this.setControlPointsVisibility=c.setControlPointsVisibility;this.shouldBeDrawn=c.shouldBeDrawn;this.transform=c.transform;this.transformPoint=c.transformPoint;this.translatePoint=c.translatePoint;this.translateShape=c.translateShape;
this.update=c.update;this.type="rect";this.translate=c.translateShape;this.init(b,a,k);this.collection="shapes"}k.prototype.render=function(b){var a=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.rect(0,-9E9,0,0).attr(a).add(b);c.render.call(this)};k.prototype.redraw=function(b){var a=this.anchor(this.points[0]).absolutePosition;if(a)this.graphic[b?"animate":"attr"]({x:a.x,y:a.y,width:this.options.width,height:this.options.height});else this.attr({x:0,y:-9E9});this.graphic.placed=
!!a;c.redraw.call(this,b)};k.attrsMap=g(a.attrsMap,{width:"width",height:"height"});return k}()});v(a,"Extensions/Annotations/Controllables/ControllableCircle.js",[a["Extensions/Annotations/Mixins/ControllableMixin.js"],a["Extensions/Annotations/Controllables/ControllablePath.js"],a["Core/Utilities.js"]],function(a,k,p){var c=p.merge;return function(){function g(b,c,g){this.addControlPoints=a.addControlPoints;this.anchor=a.anchor;this.attr=a.attr;this.attrsFromOptions=a.attrsFromOptions;this.destroy=
a.destroy;this.getPointsOptions=a.getPointsOptions;this.init=a.init;this.linkPoints=a.linkPoints;this.point=a.point;this.rotate=a.rotate;this.scale=a.scale;this.setControlPointsVisibility=a.setControlPointsVisibility;this.shouldBeDrawn=a.shouldBeDrawn;this.transform=a.transform;this.transformPoint=a.transformPoint;this.translatePoint=a.translatePoint;this.translateShape=a.translateShape;this.update=a.update;this.type="circle";this.translate=a.translateShape;this.init(b,c,g);this.collection="shapes"}
g.prototype.render=function(b){var c=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.circle(0,-9E9,0).attr(c).add(b);a.render.call(this)};g.prototype.redraw=function(b){var c=this.anchor(this.points[0]).absolutePosition;if(c)this.graphic[b?"animate":"attr"]({x:c.x,y:c.y,r:this.options.r});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!c;a.redraw.call(this,b)};g.prototype.setRadius=function(b){this.options.r=b};g.attrsMap=c(k.attrsMap,{r:"r"});return g}()});
v(a,"Extensions/Annotations/Controllables/ControllableLabel.js",[a["Extensions/Annotations/Mixins/ControllableMixin.js"],a["Extensions/Annotations/MockPoint.js"],a["Core/Renderer/SVG/SVGRenderer.js"],a["Core/Tooltip.js"],a["Core/Utilities.js"]],function(a,k,p,g,z){var b=z.extend,c=z.format,t=z.isNumber,d=z.pick;z=function(){function e(b,c,d){this.addControlPoints=a.addControlPoints;this.attr=a.attr;this.attrsFromOptions=a.attrsFromOptions;this.destroy=a.destroy;this.getPointsOptions=a.getPointsOptions;
this.init=a.init;this.linkPoints=a.linkPoints;this.point=a.point;this.rotate=a.rotate;this.scale=a.scale;this.setControlPointsVisibility=a.setControlPointsVisibility;this.shouldBeDrawn=a.shouldBeDrawn;this.transform=a.transform;this.transformPoint=a.transformPoint;this.translateShape=a.translateShape;this.update=a.update;this.init(b,c,d);this.collection="labels"}e.alignedPosition=function(b,a){var c=b.align,d=b.verticalAlign,f=(a.x||0)+(b.x||0),h=(a.y||0)+(b.y||0),l,e;"right"===c?l=1:"center"===c&&
(l=2);l&&(f+=(a.width-(b.width||0))/l);"bottom"===d?e=1:"middle"===d&&(e=2);e&&(h+=(a.height-(b.height||0))/e);return{x:Math.round(f),y:Math.round(h)}};e.justifiedOptions=function(b,a,c,d){var f=c.align,h=c.verticalAlign,e=a.box?0:a.padding||0,l=a.getBBox();a={align:f,verticalAlign:h,x:c.x,y:c.y,width:a.width,height:a.height};c=d.x-b.plotLeft;var g=d.y-b.plotTop;d=c+e;0>d&&("right"===f?a.align="left":a.x=-d);d=c+l.width-e;d>b.plotWidth&&("left"===f?a.align="right":a.x=b.plotWidth-d);d=g+e;0>d&&("bottom"===
h?a.verticalAlign="top":a.y=-d);d=g+l.height-e;d>b.plotHeight&&("top"===h?a.verticalAlign="bottom":a.y=b.plotHeight-d);return a};e.prototype.translatePoint=function(b,c){a.translatePoint.call(this,b,c,0)};e.prototype.translate=function(b,a){var c=this.annotation.chart,d=this.annotation.userOptions,f=c.annotations.indexOf(this.annotation);f=c.options.annotations[f];c.inverted&&(c=b,b=a,a=c);this.options.x+=b;this.options.y+=a;f[this.collection][this.index].x=this.options.x;f[this.collection][this.index].y=
this.options.y;d[this.collection][this.index].x=this.options.x;d[this.collection][this.index].y=this.options.y};e.prototype.render=function(b){var c=this.options,d=this.attrsFromOptions(c),g=c.style;this.graphic=this.annotation.chart.renderer.label("",0,-9999,c.shape,null,null,c.useHTML,null,"annotation-label").attr(d).add(b);this.annotation.chart.styledMode||("contrast"===g.color&&(g.color=this.annotation.chart.renderer.getContrast(-1<e.shapesWithoutBackground.indexOf(c.shape)?"#FFFFFF":c.backgroundColor)),
this.graphic.css(c.style).shadow(c.shadow));c.className&&this.graphic.addClass(c.className);this.graphic.labelrank=c.labelrank;a.render.call(this)};e.prototype.redraw=function(b){var d=this.options,e=this.text||d.format||d.text,g=this.graphic,f=this.points[0];g.attr({text:e?c(e,f.getLabelConfig(),this.annotation.chart):d.formatter.call(f,this)});d=this.anchor(f);(e=this.position(d))?(g.alignAttr=e,e.anchorX=d.absolutePosition.x,e.anchorY=d.absolutePosition.y,g[b?"animate":"attr"](e)):g.attr({x:0,
y:-9999});g.placed=!!e;a.redraw.call(this,b)};e.prototype.anchor=function(b){var c=a.anchor.apply(this,arguments),d=this.options.x||0,e=this.options.y||0;c.absolutePosition.x-=d;c.absolutePosition.y-=e;c.relativePosition.x-=d;c.relativePosition.y-=e;return c};e.prototype.position=function(a){var c=this.graphic,m=this.annotation.chart,q=this.points[0],f=this.options,h=a.absolutePosition,w=a.relativePosition;if(a=q.series.visible&&k.prototype.isInsidePlot.call(q)){if(f.distance)var r=g.prototype.getPosition.call({chart:m,
distance:d(f.distance,16)},c.width,c.height,{plotX:w.x,plotY:w.y,negative:q.negative,ttBelow:q.ttBelow,h:w.height||w.width});else f.positioner?r=f.positioner.call(this):(q={x:h.x,y:h.y,width:0,height:0},r=e.alignedPosition(b(f,{width:c.width,height:c.height}),q),"justify"===this.options.overflow&&(r=e.alignedPosition(e.justifiedOptions(m,c,f,r),q)));f.crop&&(f=r.x-m.plotLeft,q=r.y-m.plotTop,a=m.isInsidePlot(f,q)&&m.isInsidePlot(f+c.width,q+c.height))}return a?r:null};e.attrsMap={backgroundColor:"fill",
borderColor:"stroke",borderWidth:"stroke-width",zIndex:"zIndex",borderRadius:"r",padding:"padding"};e.shapesWithoutBackground=["connector"];return e}();p.prototype.symbols.connector=function(b,a,c,d,g){var f=g&&g.anchorX;g=g&&g.anchorY;var h=c/2;if(t(f)&&t(g)){var e=[["M",f,g]];var r=a-g;0>r&&(r=-d-r);r<c&&(h=f<b+c/2?r:c-r);g>a+d?e.push(["L",b+h,a+d]):g<a?e.push(["L",b+h,a]):f<b?e.push(["L",b,a+d/2]):f>b+c&&e.push(["L",b+c,a+d/2])}return e||[]};return z});v(a,"Extensions/Annotations/Controllables/ControllableImage.js",
[a["Extensions/Annotations/Controllables/ControllableLabel.js"],a["Extensions/Annotations/Mixins/ControllableMixin.js"]],function(a,k){return function(){function c(a,c,b){this.addControlPoints=k.addControlPoints;this.anchor=k.anchor;this.attr=k.attr;this.attrsFromOptions=k.attrsFromOptions;this.destroy=k.destroy;this.getPointsOptions=k.getPointsOptions;this.init=k.init;this.linkPoints=k.linkPoints;this.point=k.point;this.rotate=k.rotate;this.scale=k.scale;this.setControlPointsVisibility=k.setControlPointsVisibility;
this.shouldBeDrawn=k.shouldBeDrawn;this.transform=k.transform;this.transformPoint=k.transformPoint;this.translatePoint=k.translatePoint;this.translateShape=k.translateShape;this.update=k.update;this.type="image";this.translate=k.translateShape;this.init(a,c,b);this.collection="shapes"}c.prototype.render=function(a){var c=this.attrsFromOptions(this.options),b=this.options;this.graphic=this.annotation.chart.renderer.image(b.src,0,-9E9,b.width,b.height).attr(c).add(a);this.graphic.width=b.width;this.graphic.height=
b.height;k.render.call(this)};c.prototype.redraw=function(c){var g=this.anchor(this.points[0]);if(g=a.prototype.position.call(this,g))this.graphic[c?"animate":"attr"]({x:g.x,y:g.y});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!g;k.redraw.call(this,c)};c.attrsMap={width:"width",height:"height",zIndex:"zIndex"};return c}()});v(a,"Extensions/Annotations/Annotations.js",[a["Core/Chart/Chart.js"],a["Extensions/Annotations/Mixins/ControllableMixin.js"],a["Extensions/Annotations/Controllables/ControllableRect.js"],
a["Extensions/Annotations/Controllables/ControllableCircle.js"],a["Extensions/Annotations/Controllables/ControllablePath.js"],a["Extensions/Annotations/Controllables/ControllableImage.js"],a["Extensions/Annotations/Controllables/ControllableLabel.js"],a["Extensions/Annotations/ControlPoint.js"],a["Extensions/Annotations/Mixins/EventEmitterMixin.js"],a["Core/Globals.js"],a["Extensions/Annotations/MockPoint.js"],a["Core/Pointer.js"],a["Core/Utilities.js"]],function(a,k,p,g,z,b,v,t,d,e,u,l,m){a=a.prototype;
var c=m.addEvent,f=m.defined,h=m.destroyObjectProperties,w=m.erase,r=m.extend,B=m.find,n=m.fireEvent,y=m.getDeferredAnimation,x=m.merge,C=m.pick,E=m.splat;m=m.wrap;var D=function(){function a(a,b){this.annotation=void 0;this.coll="annotations";this.shapesGroup=this.labelsGroup=this.labelCollector=this.group=this.graphic=this.animationConfig=this.collection=void 0;this.chart=a;this.points=[];this.controlPoints=[];this.coll="annotations";this.labels=[];this.shapes=[];this.options=x(this.defaultOptions,
b);this.userOptions=b;b=this.getLabelsAndShapesOptions(this.options,b);this.options.labels=b.labels;this.options.shapes=b.shapes;this.init(a,this.options)}a.prototype.init=function(){var a=this.chart,b=this.options.animation;this.linkPoints();this.addControlPoints();this.addShapes();this.addLabels();this.setLabelCollector();this.animationConfig=y(a,b)};a.prototype.getLabelsAndShapesOptions=function(a,b){var c={};["labels","shapes"].forEach(function(d){a[d]&&(c[d]=E(b[d]).map(function(b,c){return x(a[d][c],
b)}))});return c};a.prototype.addShapes=function(){(this.options.shapes||[]).forEach(function(a,b){a=this.initShape(a,b);x(!0,this.options.shapes[b],a.options)},this)};a.prototype.addLabels=function(){(this.options.labels||[]).forEach(function(a,b){a=this.initLabel(a,b);x(!0,this.options.labels[b],a.options)},this)};a.prototype.addClipPaths=function(){this.setClipAxes();this.clipXAxis&&this.clipYAxis&&(this.clipRect=this.chart.renderer.clipRect(this.getClipBox()))};a.prototype.setClipAxes=function(){var a=
this.chart.xAxis,b=this.chart.yAxis,c=(this.options.labels||[]).concat(this.options.shapes||[]).reduce(function(c,d){return[a[d&&d.point&&d.point.xAxis]||c[0],b[d&&d.point&&d.point.yAxis]||c[1]]},[]);this.clipXAxis=c[0];this.clipYAxis=c[1]};a.prototype.getClipBox=function(){if(this.clipXAxis&&this.clipYAxis)return{x:this.clipXAxis.left,y:this.clipYAxis.top,width:this.clipXAxis.width,height:this.clipYAxis.height}};a.prototype.setLabelCollector=function(){var a=this;a.labelCollector=function(){return a.labels.reduce(function(a,
b){b.options.allowOverlap||a.push(b.graphic);return a},[])};a.chart.labelCollectors.push(a.labelCollector)};a.prototype.setOptions=function(a){this.options=x(this.defaultOptions,a)};a.prototype.redraw=function(a){this.linkPoints();this.graphic||this.render();this.clipRect&&this.clipRect.animate(this.getClipBox());this.redrawItems(this.shapes,a);this.redrawItems(this.labels,a);k.redraw.call(this,a)};a.prototype.redrawItems=function(a,b){for(var c=a.length;c--;)this.redrawItem(a[c],b)};a.prototype.renderItems=
function(a){for(var b=a.length;b--;)this.renderItem(a[b])};a.prototype.render=function(){var a=this.chart.renderer;this.graphic=a.g("annotation").attr({opacity:0,zIndex:this.options.zIndex,visibility:this.options.visible?"visible":"hidden"}).add();this.shapesGroup=a.g("annotation-shapes").add(this.graphic).clip(this.chart.plotBoxClip);this.labelsGroup=a.g("annotation-labels").attr({translateX:0,translateY:0}).add(this.graphic);this.addClipPaths();this.clipRect&&this.graphic.clip(this.clipRect);this.renderItems(this.shapes);
this.renderItems(this.labels);this.addEvents();k.render.call(this)};a.prototype.setVisibility=function(a){var b=this.options;a=C(a,!b.visible);this.graphic.attr("visibility",a?"visible":"hidden");a||this.setControlPointsVisibility(!1);b.visible=a};a.prototype.setControlPointsVisibility=function(a){var b=function(b){b.setControlPointsVisibility(a)};k.setControlPointsVisibility.call(this,a);this.shapes.forEach(b);this.labels.forEach(b)};a.prototype.destroy=function(){var a=this.chart,b=function(a){a.destroy()};
this.labels.forEach(b);this.shapes.forEach(b);this.clipYAxis=this.clipXAxis=null;w(a.labelCollectors,this.labelCollector);d.destroy.call(this);k.destroy.call(this);h(this,a)};a.prototype.remove=function(){return this.chart.removeAnnotation(this)};a.prototype.update=function(a,b){var c=this.chart,d=this.getLabelsAndShapesOptions(this.userOptions,a),f=c.annotations.indexOf(this);a=x(!0,this.userOptions,a);a.labels=d.labels;a.shapes=d.shapes;this.destroy();this.constructor(c,a);c.options.annotations[f]=
a;this.isUpdating=!0;C(b,!0)&&c.redraw();n(this,"afterUpdate");this.isUpdating=!1};a.prototype.initShape=function(b,c){b=x(this.options.shapeOptions,{controlPointOptions:this.options.controlPointOptions},b);c=new a.shapesMap[b.type](this,b,c);c.itemType="shape";this.shapes.push(c);return c};a.prototype.initLabel=function(a,b){a=x(this.options.labelOptions,{controlPointOptions:this.options.controlPointOptions},a);b=new v(this,a,b);b.itemType="label";this.labels.push(b);return b};a.prototype.redrawItem=
function(a,b){a.linkPoints();a.shouldBeDrawn()?(a.graphic||this.renderItem(a),a.redraw(C(b,!0)&&a.graphic.placed),a.points.length&&this.adjustVisibility(a)):this.destroyItem(a)};a.prototype.adjustVisibility=function(a){var b=!1,c=a.graphic;a.points.forEach(function(a){!1!==a.series.visible&&!1!==a.visible&&(b=!0)});b?"hidden"===c.visibility&&c.show():c.hide()};a.prototype.destroyItem=function(a){w(this[a.itemType+"s"],a);a.destroy()};a.prototype.renderItem=function(a){a.render("label"===a.itemType?
this.labelsGroup:this.shapesGroup)};a.ControlPoint=t;a.MockPoint=u;a.shapesMap={rect:p,circle:g,path:z,image:b};a.types={};return a}();x(!0,D.prototype,k,d,x(D.prototype,{nonDOMEvents:["add","afterUpdate","drag","remove"],defaultOptions:{visible:!0,animation:{},draggable:"xy",labelOptions:{align:"center",allowOverlap:!1,backgroundColor:"rgba(0, 0, 0, 0.75)",borderColor:"black",borderRadius:3,borderWidth:1,className:"",crop:!1,formatter:function(){return f(this.y)?this.y:"Annotation label"},includeInDataExport:!0,
overflow:"justify",padding:5,shadow:!1,shape:"callout",style:{fontSize:"11px",fontWeight:"normal",color:"contrast"},useHTML:!1,verticalAlign:"bottom",x:0,y:-16},shapeOptions:{stroke:"rgba(0, 0, 0, 0.75)",strokeWidth:1,fill:"rgba(0, 0, 0, 0.75)",r:0,snap:2},controlPointOptions:{symbol:"circle",width:10,height:10,style:{stroke:"black","stroke-width":2,fill:"white"},visible:!1,events:{}},events:{},zIndex:6}}));e.extendAnnotation=function(a,b,c,d){b=b||D;x(!0,a.prototype,b.prototype,c);a.prototype.defaultOptions=
x(a.prototype.defaultOptions,d||{})};r(a,{initAnnotation:function(a){a=new (D.types[a.type]||D)(this,a);this.annotations.push(a);return a},addAnnotation:function(a,b){a=this.initAnnotation(a);this.options.annotations.push(a.options);C(b,!0)&&(a.redraw(),a.graphic.attr({opacity:1}));return a},removeAnnotation:function(a){var b=this.annotations,c="annotations"===a.coll?a:B(b,function(b){return b.options.id===a});c&&(n(c,"remove"),w(this.options.annotations,c.options),w(b,c),c.destroy())},drawAnnotations:function(){this.plotBoxClip.attr(this.plotBox);
this.annotations.forEach(function(a){a.redraw();a.graphic.animate({opacity:1},a.animationConfig)})}});a.collectionsWithUpdate.push("annotations");a.collectionsWithInit.annotations=[a.addAnnotation];a.callbacks.push(function(a){a.annotations=[];a.options.annotations||(a.options.annotations=[]);a.plotBoxClip=this.renderer.clipRect(this.plotBox);a.controlPointsGroup=a.renderer.g("control-points").attr({zIndex:99}).clip(a.plotBoxClip).add();a.options.annotations.forEach(function(b,c){b=a.initAnnotation(b);
a.options.annotations[c]=b.options});a.drawAnnotations();c(a,"redraw",a.drawAnnotations);c(a,"destroy",function(){a.plotBoxClip.destroy();a.controlPointsGroup.destroy()});c(a,"exportData",function(b){var c,d,f,e,h,n,x,y,g=a.annotations,C=(this.options.exporting&&this.options.exporting.csv||{}).columnHeaderFormatter,w=!b.dataRows[1].xValues,r=null===(d=null===(c=a.options.lang)||void 0===c?void 0:c.exportData)||void 0===d?void 0:d.annotationHeader;c=function(a){if(C){var b=C(a);if(!1!==b)return b}b=
r+" "+a;return w?{columnTitle:b,topLevelColumnTitle:b}:b};var k=b.dataRows[0].length,E=null===(h=null===(e=null===(f=a.options.exporting)||void 0===f?void 0:f.csv)||void 0===e?void 0:e.annotations)||void 0===h?void 0:h.itemDelimiter,B=null===(y=null===(x=null===(n=a.options.exporting)||void 0===n?void 0:n.csv)||void 0===x?void 0:x.annotations)||void 0===y?void 0:y.join;g.forEach(function(a){a.options.labelOptions.includeInDataExport&&a.labels.forEach(function(a){if(a.options.text){var c=a.options.text;
a.points.forEach(function(a){var d=a.x,f=a.series.xAxis?a.series.xAxis.options.index:-1,e=!1;if(-1===f){a=b.dataRows[0].length;for(var h=Array(a),n=0;n<a;++n)h[n]="";h.push(c);h.xValues=[];h.xValues[f]=d;b.dataRows.push(h);e=!0}e||b.dataRows.forEach(function(a,b){!e&&a.xValues&&void 0!==f&&d===a.xValues[f]&&(B&&a.length>k?a[a.length-1]+=E+c:a.push(c),e=!0)});if(!e){a=b.dataRows[0].length;h=Array(a);for(n=0;n<a;++n)h[n]="";h[0]=d;h.push(c);h.xValues=[];void 0!==f&&(h.xValues[f]=d);b.dataRows.push(h)}})}})});
var l=0;b.dataRows.forEach(function(a){l=Math.max(l,a.length)});f=l-b.dataRows[0].length;for(e=0;e<f;e++)h=c(e+1),w?(b.dataRows[0].push(h.topLevelColumnTitle),b.dataRows[1].push(h.columnTitle)):b.dataRows[0].push(h)})});m(l.prototype,"onContainerMouseDown",function(a){this.chart.hasDraggedAnnotation||a.apply(this,Array.prototype.slice.call(arguments,1))});return e.Annotation=D});v(a,"Mixins/Navigation.js",[],function(){return{initUpdate:function(a){a.navigation||(a.navigation={updates:[],update:function(a,
c){this.updates.forEach(function(g){g.update.call(g.context,a,c)})}})},addUpdate:function(a,k){k.navigation||this.initUpdate(k);k.navigation.updates.push({update:a,context:k})}}});v(a,"Extensions/Annotations/NavigationBindings.js",[a["Extensions/Annotations/Annotations.js"],a["Mixins/Navigation.js"],a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,k,p,g){function c(a){var b=a.prototype.defaultOptions.events&&a.prototype.defaultOptions.events.click;q(!0,a.prototype.defaultOptions.events,{click:function(a){var c=
this,f=c.chart.navigationBindings,h=f.activeAnnotation;b&&b.call(c,a);h!==c?(f.deselectAnnotation(),f.activeAnnotation=c,c.setControlPointsVisibility(!0),d(f,"showPopup",{annotation:c,formType:"annotation-toolbar",options:f.annotationToFields(c),onSubmit:function(a){var b={};"remove"===a.actionType?(f.activeAnnotation=!1,f.chart.removeAnnotation(c)):(f.fieldsToOptions(a.fields,b),f.deselectAnnotation(),a=b.typeOptions,"measure"===c.options.type&&(a.crosshairY.enabled=0!==a.crosshairY.strokeWidth,
a.crosshairX.enabled=0!==a.crosshairX.strokeWidth),c.update(b))}})):(f.deselectAnnotation(),d(f,"closePopup"));a.activeAnnotation=!0}})}var b=g.addEvent,v=g.attr,t=g.format,d=g.fireEvent,e=g.isArray,u=g.isFunction,l=g.isNumber,m=g.isObject,q=g.merge,f=g.objectEach,h=g.pick;g=g.setOptions;var w=p.doc,r=p.win,B=function(){function a(a,b){this.selectedButton=this.boundClassNames=void 0;this.chart=a;this.options=b;this.eventsToUnbind=[];this.container=w.getElementsByClassName(this.options.bindingsClassName||
"")}a.prototype.initEvents=function(){var a=this,c=a.chart,d=a.container,h=a.options;a.boundClassNames={};f(h.bindings||{},function(b){a.boundClassNames[b.className]=b});[].forEach.call(d,function(c){a.eventsToUnbind.push(b(c,"click",function(b){var d=a.getButtonEvents(c,b);d&&a.bindingsButtonClick(d.button,d.events,b)}))});f(h.events||{},function(c,d){u(c)&&a.eventsToUnbind.push(b(a,d,c))});a.eventsToUnbind.push(b(c.container,"click",function(b){!c.cancelClick&&c.isInsidePlot(b.chartX-c.plotLeft,
b.chartY-c.plotTop)&&a.bindingsChartClick(this,b)}));a.eventsToUnbind.push(b(c.container,p.isTouchDevice?"touchmove":"mousemove",function(b){a.bindingsContainerMouseMove(this,b)}))};a.prototype.initUpdate=function(){var a=this;k.addUpdate(function(b){a.update(b)},this.chart)};a.prototype.bindingsButtonClick=function(a,b,c){var f=this.chart;this.selectedButtonElement&&(d(this,"deselectButton",{button:this.selectedButtonElement}),this.nextEvent&&(this.currentUserDetails&&"annotations"===this.currentUserDetails.coll&&
f.removeAnnotation(this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1));this.selectedButton=b;this.selectedButtonElement=a;d(this,"selectButton",{button:a});b.init&&b.init.call(this,a,c);(b.start||b.steps)&&f.renderer.boxWrapper.addClass("highcharts-draw-mode")};a.prototype.bindingsChartClick=function(a,b){a=this.chart;var c=this.selectedButton;a=a.renderer.boxWrapper;var f;if(f=this.activeAnnotation&&!b.activeAnnotation&&b.target.parentNode){a:{f=b.target;var h=r.Element.prototype,e=
h.matches||h.msMatchesSelector||h.webkitMatchesSelector,n=null;if(h.closest)n=h.closest.call(f,".highcharts-popup");else{do{if(e.call(f,".highcharts-popup"))break a;f=f.parentElement||f.parentNode}while(null!==f&&1===f.nodeType)}f=n}f=!f}f&&(d(this,"closePopup"),this.deselectAnnotation());c&&c.start&&(this.nextEvent?(this.nextEvent(b,this.currentUserDetails),this.steps&&(this.stepIndex++,c.steps[this.stepIndex]?this.mouseMoveEvent=this.nextEvent=c.steps[this.stepIndex]:(d(this,"deselectButton",{button:this.selectedButtonElement}),
a.removeClass("highcharts-draw-mode"),c.end&&c.end.call(this,b,this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1,this.selectedButton=null))):(this.currentUserDetails=c.start.call(this,b),c.steps?(this.stepIndex=0,this.steps=!0,this.mouseMoveEvent=this.nextEvent=c.steps[this.stepIndex]):(d(this,"deselectButton",{button:this.selectedButtonElement}),a.removeClass("highcharts-draw-mode"),this.steps=!1,this.selectedButton=null,c.end&&c.end.call(this,b,this.currentUserDetails))))};a.prototype.bindingsContainerMouseMove=
function(a,b){this.mouseMoveEvent&&this.mouseMoveEvent(b,this.currentUserDetails)};a.prototype.fieldsToOptions=function(a,b){f(a,function(a,c){var f=parseFloat(a),d=c.split("."),e=b,n=d.length-1;!l(f)||a.match(/px/g)||c.match(/format/g)||(a=f);""!==a&&"undefined"!==a&&d.forEach(function(b,c){var f=h(d[c+1],"");n===c?e[b]=a:(e[b]||(e[b]=f.match(/\d/g)?[]:{}),e=e[b])})});return b};a.prototype.deselectAnnotation=function(){this.activeAnnotation&&(this.activeAnnotation.setControlPointsVisibility(!1),
this.activeAnnotation=!1)};a.prototype.annotationToFields=function(b){function c(a,d,h,n){if(h&&a&&-1===k.indexOf(d)&&(0<=(h.indexOf&&h.indexOf(d))||h[d]||!0===h))if(e(a))n[d]=[],a.forEach(function(a,b){m(a)?(n[d][b]={},f(a,function(a,f){c(a,f,g[d],n[d][b])})):c(a,0,g[d],n[d])});else if(m(a)){var r={};e(n)?(n.push(r),r[d]={},r=r[d]):n[d]=r;f(a,function(a,b){c(a,b,0===d?h:g[d],r)})}else"format"===d?n[d]=[t(a,b.labels[0].points[0]).toString(),"text"]:e(n)?n.push([a,w(a)]):n[d]=[a,w(a)]}var d=b.options,
n=a.annotationsEditable,g=n.nestedOptions,w=this.utils.getFieldType,r=h(d.type,d.shapes&&d.shapes[0]&&d.shapes[0].type,d.labels&&d.labels[0]&&d.labels[0].itemType,"label"),k=a.annotationsNonEditable[d.langKey]||[],y={langKey:d.langKey,type:r};f(d,function(a,b){"typeOptions"===b?(y[b]={},f(d[b],function(a,d){c(a,d,g,y[b],!0)})):c(a,b,n[r],y)});return y};a.prototype.getClickedClassNames=function(a,b){var c=b.target;b=[];for(var d;c&&((d=v(c,"class"))&&(b=b.concat(d.split(" ").map(function(a){return[a,
c]}))),c=c.parentNode,c!==a););return b};a.prototype.getButtonEvents=function(a,b){var c=this,d;this.getClickedClassNames(a,b).forEach(function(a){c.boundClassNames[a[0]]&&!d&&(d={events:c.boundClassNames[a[0]],button:a[1]})});return d};a.prototype.update=function(a){this.options=q(!0,this.options,a);this.removeEvents();this.initEvents()};a.prototype.removeEvents=function(){this.eventsToUnbind.forEach(function(a){a()})};a.prototype.destroy=function(){this.removeEvents()};a.annotationsEditable={nestedOptions:{labelOptions:["style",
"format","backgroundColor"],labels:["style"],label:["style"],style:["fontSize","color"],background:["fill","strokeWidth","stroke"],innerBackground:["fill","strokeWidth","stroke"],outerBackground:["fill","strokeWidth","stroke"],shapeOptions:["fill","strokeWidth","stroke"],shapes:["fill","strokeWidth","stroke"],line:["strokeWidth","stroke"],backgroundColors:[!0],connector:["fill","strokeWidth","stroke"],crosshairX:["strokeWidth","stroke"],crosshairY:["strokeWidth","stroke"]},circle:["shapes"],verticalLine:[],
label:["labelOptions"],measure:["background","crosshairY","crosshairX"],fibonacci:[],tunnel:["background","line","height"],pitchfork:["innerBackground","outerBackground"],rect:["shapes"],crookedLine:[],basicAnnotation:["shapes","labelOptions"]};a.annotationsNonEditable={rectangle:["crosshairX","crosshairY","label"]};return a}();B.prototype.utils={updateRectSize:function(a,b){var c=b.chart,d=b.options.typeOptions,f=c.pointer.getCoordinates(a);a=f.xAxis[0].value-d.point.x;d=d.point.y-f.yAxis[0].value;
b.update({typeOptions:{background:{width:c.inverted?d:a,height:c.inverted?a:d}}})},getFieldType:function(a){return{string:"text",number:"number","boolean":"checkbox"}[typeof a]}};p.Chart.prototype.initNavigationBindings=function(){var a=this.options;a&&a.navigation&&a.navigation.bindings&&(this.navigationBindings=new B(this,a.navigation),this.navigationBindings.initEvents(),this.navigationBindings.initUpdate())};b(p.Chart,"load",function(){this.initNavigationBindings()});b(p.Chart,"destroy",function(){this.navigationBindings&&
this.navigationBindings.destroy()});b(B,"deselectButton",function(){this.selectedButtonElement=null});b(a,"remove",function(){this.chart.navigationBindings&&this.chart.navigationBindings.deselectAnnotation()});p.Annotation&&(c(a),f(a.types,function(a){c(a)}));g({lang:{navigation:{popup:{simpleShapes:"Simple shapes",lines:"Lines",circle:"Circle",rectangle:"Rectangle",label:"Label",shapeOptions:"Shape options",typeOptions:"Details",fill:"Fill",format:"Text",strokeWidth:"Line width",stroke:"Line color",
title:"Title",name:"Name",labelOptions:"Label options",labels:"Labels",backgroundColor:"Background color",backgroundColors:"Background colors",borderColor:"Border color",borderRadius:"Border radius",borderWidth:"Border width",style:"Style",padding:"Padding",fontSize:"Font size",color:"Color",height:"Height",shapes:"Shape options"}}},navigation:{bindingsClassName:"highcharts-bindings-container",bindings:{circleAnnotation:{className:"highcharts-circle-annotation",start:function(a){a=this.chart.pointer.getCoordinates(a);
var b=this.chart.options.navigation;return this.chart.addAnnotation(q({langKey:"circle",type:"basicAnnotation",shapes:[{type:"circle",point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,y:a.yAxis[0].value},r:5}]},b.annotationsOptions,b.bindings.circleAnnotation.annotationsOptions))},steps:[function(a,b){var c=b.options.shapes[0].point,d=this.chart.xAxis[0].toPixels(c.x);c=this.chart.yAxis[0].toPixels(c.y);var f=this.chart.inverted;b.update({shapes:[{r:Math.max(Math.sqrt(Math.pow(f?c-a.chartX:d-a.chartX,2)+
Math.pow(f?d-a.chartY:c-a.chartY,2)),5)}]})}]},rectangleAnnotation:{className:"highcharts-rectangle-annotation",start:function(a){var b=this.chart.pointer.getCoordinates(a);a=this.chart.options.navigation;var c=b.xAxis[0].value;b=b.yAxis[0].value;return this.chart.addAnnotation(q({langKey:"rectangle",type:"basicAnnotation",shapes:[{type:"path",points:[{xAxis:0,yAxis:0,x:c,y:b},{xAxis:0,yAxis:0,x:c,y:b},{xAxis:0,yAxis:0,x:c,y:b},{xAxis:0,yAxis:0,x:c,y:b}]}]},a.annotationsOptions,a.bindings.rectangleAnnotation.annotationsOptions))},
steps:[function(a,b){var c=b.options.shapes[0].points,d=this.chart.pointer.getCoordinates(a);a=d.xAxis[0].value;d=d.yAxis[0].value;c[1].x=a;c[2].x=a;c[2].y=d;c[3].y=d;b.update({shapes:[{points:c}]})}]},labelAnnotation:{className:"highcharts-label-annotation",start:function(a){a=this.chart.pointer.getCoordinates(a);var b=this.chart.options.navigation;return this.chart.addAnnotation(q({langKey:"label",type:"basicAnnotation",labelOptions:{format:"{y:.2f}"},labels:[{point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,
y:a.yAxis[0].value},overflow:"none",crop:!0}]},b.annotationsOptions,b.bindings.labelAnnotation.annotationsOptions))}}},events:{},annotationsOptions:{animation:{defer:0}}}});return B});v(a,"Extensions/Annotations/Popup.js",[a["Core/Globals.js"],a["Extensions/Annotations/NavigationBindings.js"],a["Core/Pointer.js"],a["Core/Utilities.js"]],function(a,k,p,g){var c=g.addEvent,b=g.createElement,v=g.defined,t=g.getOptions,d=g.isArray,e=g.isObject,u=g.isString,l=g.objectEach,m=g.pick;g=g.wrap;var q=/\d/g;
g(p.prototype,"onContainerMouseDown",function(a,b){var c=b.target&&b.target.className;u(c)&&0<=c.indexOf("highcharts-popup-field")||a.apply(this,Array.prototype.slice.call(arguments,1))});a.Popup=function(a,b){this.init(a,b)};a.Popup.prototype={init:function(a,c){this.container=b("div",{className:"highcharts-popup"},null,a);this.lang=this.getLangpack();this.iconsURL=c;this.addCloseBtn()},addCloseBtn:function(){var a=this;var d=b("div",{className:"highcharts-popup-close"},null,this.container);d.style["background-image"]=
"url("+this.iconsURL+"close.svg)";["click","touchstart"].forEach(function(b){c(d,b,function(){a.closePopup()})})},addColsContainer:function(a){var c=b("div",{className:"highcharts-popup-lhs-col"},null,a);a=b("div",{className:"highcharts-popup-rhs-col"},null,a);b("div",{className:"highcharts-popup-rhs-col-wrapper"},null,a);return{lhsCol:c,rhsCol:a}},addInput:function(a,c,d,e){var f=a.split(".");f=f[f.length-1];var h=this.lang;c="highcharts-"+c+"-"+f;c.match(q)||b("label",{innerHTML:h[f]||f,htmlFor:c},
null,d);b("input",{name:c,value:e[0],type:e[1],className:"highcharts-popup-field"},null,d).setAttribute("highcharts-data-name",a)},addButton:function(a,d,e,g,k){var f=this,h=this.closePopup,r=this.getFields;var w=b("button",{innerHTML:d},null,a);["click","touchstart"].forEach(function(a){c(w,a,function(){h.call(f);return g(r(k,e))})});return w},getFields:function(a,b){var c=a.querySelectorAll("input"),d=a.querySelectorAll("#highcharts-select-series > option:checked")[0];a=a.querySelectorAll("#highcharts-select-volume > option:checked")[0];
var f,e;var h={actionType:b,linkedTo:d&&d.getAttribute("value"),fields:{}};[].forEach.call(c,function(a){e=a.getAttribute("highcharts-data-name");(f=a.getAttribute("highcharts-data-series-id"))?h.seriesId=a.value:e?h.fields[e]=a.value:h.type=a.value});a&&(h.fields["params.volumeSeriesID"]=a.getAttribute("value"));return h},showPopup:function(){var a=this.container,b=a.querySelectorAll(".highcharts-popup-close")[0];a.innerHTML="";0<=a.className.indexOf("highcharts-annotation-toolbar")&&(a.classList.remove("highcharts-annotation-toolbar"),
a.removeAttribute("style"));a.appendChild(b);a.style.display="block"},closePopup:function(){this.popup.container.style.display="none"},showForm:function(a,b,c,d){this.popup=b.navigationBindings.popup;this.showPopup();"indicators"===a&&this.indicators.addForm.call(this,b,c,d);"annotation-toolbar"===a&&this.annotations.addToolbar.call(this,b,c,d);"annotation-edit"===a&&this.annotations.addForm.call(this,b,c,d);"flag"===a&&this.annotations.addForm.call(this,b,c,d,!0)},getLangpack:function(){return t().lang.navigation.popup},
annotations:{addToolbar:function(a,c,d){var f=this,e=this.lang,h=this.popup.container,g=this.showForm;-1===h.className.indexOf("highcharts-annotation-toolbar")&&(h.className+=" highcharts-annotation-toolbar");h.style.top=a.plotTop+10+"px";b("span",{innerHTML:m(e[c.langKey]||c.langKey,c.shapes&&c.shapes[0].type)},null,h);var k=this.addButton(h,e.removeButton||"remove","remove",d,h);k.className+=" highcharts-annotation-remove-button";k.style["background-image"]="url("+this.iconsURL+"destroy.svg)";k=
this.addButton(h,e.editButton||"edit","edit",function(){g.call(f,"annotation-edit",a,c,d)},h);k.className+=" highcharts-annotation-edit-button";k.style["background-image"]="url("+this.iconsURL+"edit.svg)"},addForm:function(a,c,d,e){var f=this.popup.container,h=this.lang;b("h2",{innerHTML:h[c.langKey]||c.langKey,className:"highcharts-popup-main-title"},null,f);var g=b("div",{className:"highcharts-popup-lhs-col highcharts-popup-lhs-full"},null,f);var k=b("div",{className:"highcharts-popup-bottom-row"},
null,f);this.annotations.addFormFields.call(this,g,a,"",c,[],!0);this.addButton(k,e?h.addButton||"add":h.saveButton||"save",e?"add":"save",d,f)},addFormFields:function(a,c,g,k,m,n){var f=this,h=this.annotations.addFormFields,r=this.addInput,w=this.lang,p,t;l(k,function(b,k){p=""!==g?g+"."+k:k;e(b)&&(!d(b)||d(b)&&e(b[0])?(t=w[k]||k,t.match(q)||m.push([!0,t,a]),h.call(f,a,c,p,b,m,!1)):m.push([f,p,"annotation",a,b]))});n&&(m=m.sort(function(a){return a[1].match(/format/g)?-1:1}),m.forEach(function(a){!0===
a[0]?b("span",{className:"highcharts-annotation-title",innerHTML:a[1]},null,a[2]):r.apply(a[0],a.splice(1))}))}},indicators:{addForm:function(a,b,c){var d=this.indicators,f=this.lang;this.tabs.init.call(this,a);b=this.popup.container.querySelectorAll(".highcharts-tab-item-content");this.addColsContainer(b[0]);d.addIndicatorList.call(this,a,b[0],"add");var e=b[0].querySelectorAll(".highcharts-popup-rhs-col")[0];this.addButton(e,f.addButton||"add","add",c,e);this.addColsContainer(b[1]);d.addIndicatorList.call(this,
a,b[1],"edit");e=b[1].querySelectorAll(".highcharts-popup-rhs-col")[0];this.addButton(e,f.saveButton||"save","edit",c,e);this.addButton(e,f.removeButton||"remove","remove",c,e)},addIndicatorList:function(a,d,e){var f=this,h=d.querySelectorAll(".highcharts-popup-lhs-col")[0];d=d.querySelectorAll(".highcharts-popup-rhs-col")[0];var g="edit"===e,k=g?a.series:a.options.plotOptions,w=this.indicators.addFormFields,m;var p=b("ul",{className:"highcharts-indicator-list"},null,h);var q=d.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];
l(k,function(d,e){var h=d.options;if(d.params||h&&h.params){var r=f.indicators.getNameType(d,e),l=r.type;m=b("li",{className:"highcharts-indicator-list",innerHTML:r.name},null,p);["click","touchstart"].forEach(function(e){c(m,e,function(){w.call(f,a,g?d:k[l],r.type,q);g&&d.options&&b("input",{type:"hidden",name:"highcharts-id-"+l,value:d.options.id},null,q).setAttribute("highcharts-data-series-id",d.options.id)})})}});0<p.childNodes.length&&p.childNodes[0].click()},getNameType:function(b,c){var d=
b.options,f=a.seriesTypes;f=f[c]&&f[c].prototype.nameBase||c.toUpperCase();d&&d.type&&(c=b.options.type,f=b.name);return{name:f,type:c}},listAllSeries:function(a,c,d,e,g){a="highcharts-"+c+"-type-"+a;var f;b("label",{innerHTML:this.lang[c]||c,htmlFor:a},null,e);var h=b("select",{name:a,className:"highcharts-popup-field"},null,e);h.setAttribute("id","highcharts-select-"+c);d.series.forEach(function(a){f=a.options;!f.params&&f.id&&"highcharts-navigator-series"!==f.id&&b("option",{innerHTML:f.name||
f.id,value:f.id},null,h)});v(g)&&(h.value=g)},addFormFields:function(a,c,d,e){var f=c.params||c.options.params,h=this.indicators.getNameType;e.innerHTML="";b("h3",{className:"highcharts-indicator-title",innerHTML:h(c,d).name},null,e);b("input",{type:"hidden",name:"highcharts-type-"+d,value:d},null,e);this.indicators.listAllSeries.call(this,d,"series",a,e,c.linkedParent&&f.volumeSeriesID);f.volumeSeriesID&&this.indicators.listAllSeries.call(this,d,"volume",a,e,c.linkedParent&&c.linkedParent.options.id);
this.indicators.addParamInputs.call(this,a,"params",f,d,e)},addParamInputs:function(a,b,c,d,g){var f=this,h=this.indicators.addParamInputs,k=this.addInput,m;l(c,function(c,l){m=b+"."+l;e(c)?h.call(f,a,m,c,d,g):"params.volumeSeriesID"!==m&&k.call(f,m,d,g,[c,"text"])})},getAmount:function(){var a=0;this.series.forEach(function(b){var c=b.options;(b.params||c&&c.params)&&a++});return a}},tabs:{init:function(a){var b=this.tabs;a=this.indicators.getAmount.call(a);var c=b.addMenuItem.call(this,"add");b.addMenuItem.call(this,
"edit",a);b.addContentItem.call(this,"add");b.addContentItem.call(this,"edit");b.switchTabs.call(this,a);b.selectTab.call(this,c,0)},addMenuItem:function(a,c){var d=this.popup.container,e="highcharts-tab-item",f=this.lang;0===c&&(e+=" highcharts-tab-disabled");c=b("span",{innerHTML:f[a+"Button"]||a,className:e},null,d);c.setAttribute("highcharts-data-tab-type",a);return c},addContentItem:function(){return b("div",{className:"highcharts-tab-item-content"},null,this.popup.container)},switchTabs:function(a){var b=
this,d;this.popup.container.querySelectorAll(".highcharts-tab-item").forEach(function(e,f){d=e.getAttribute("highcharts-data-tab-type");"edit"===d&&0===a||["click","touchstart"].forEach(function(a){c(e,a,function(){b.tabs.deselectAll.call(b);b.tabs.selectTab.call(b,this,f)})})})},selectTab:function(a,b){var c=this.popup.container.querySelectorAll(".highcharts-tab-item-content");a.className+=" highcharts-tab-item-active";c[b].className+=" highcharts-tab-item-show"},deselectAll:function(){var a=this.popup.container,
b=a.querySelectorAll(".highcharts-tab-item");a=a.querySelectorAll(".highcharts-tab-item-content");var c;for(c=0;c<b.length;c++)b[c].classList.remove("highcharts-tab-item-active"),a[c].classList.remove("highcharts-tab-item-show")}}};c(k,"showPopup",function(b){this.popup||(this.popup=new a.Popup(this.chart.container,this.chart.options.navigation.iconsURL||this.chart.options.stockTools&&this.chart.options.stockTools.gui.iconsURL||"https://code.highcharts.com/8.2.0/gfx/stock-icons/"));this.popup.showForm(b.formType,
this.chart,b.options,b.onSubmit)});c(k,"closePopup",function(){this.popup&&this.popup.closePopup()})});v(a,"masters/modules/annotations.src.js",[],function(){})});
//# sourceMappingURL=annotations.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+13
View File
@@ -0,0 +1,13 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Arrow Symbols
(c) 2017-2019 Lars A. V. Cabrera
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/arrow-symbols",["highcharts"],function(f){a(f);a.Highcharts=f;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function f(a,e,b,c){a.hasOwnProperty(e)||(a[e]=c.apply(null,b))}a=a?a._modules:{};f(a,"Extensions/ArrowSymbols.js",[a["Core/Renderer/SVG/SVGRenderer.js"]],function(a){a.prototype.symbols.arrow=function(a,b,c,
d){return[["M",a,b+d/2],["L",a+c,b],["L",a,b+d/2],["L",a+c,b+d]]};a.prototype.symbols["arrow-half"]=function(e,b,c,d){return a.prototype.symbols.arrow(e,b,c/2,d)};a.prototype.symbols["triangle-left"]=function(a,b,c,d){return[["M",a+c,b],["L",a,b+d/2],["L",a+c,b+d],["Z"]]};a.prototype.symbols["arrow-filled"]=a.prototype.symbols["triangle-left"];a.prototype.symbols["triangle-left-half"]=function(e,b,c,d){return a.prototype.symbols["triangle-left"](e,b,c/2,d)};a.prototype.symbols["arrow-filled-half"]=
a.prototype.symbols["triangle-left-half"]});f(a,"masters/modules/arrow-symbols.src.js",[],function(){})});
//# sourceMappingURL=arrow-symbols.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"arrow-symbols.js.map","lineCount":12,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,kCAAP,CAA2C,CAAC,YAAD,CAA3C,CAA2D,QAAS,CAACE,CAAD,CAAa,CAC7EL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAHsE,CAAjF,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC,QAAS,CAACD,CAAD,CAAa,CAEpBE,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAkBC,CAAlB,CAAsB,CACrCH,CAAAI,eAAA,CAAmBH,CAAnB,CAAL,GACID,CAAA,CAAIC,CAAJ,CADJ,CACgBE,CAAAE,MAAA,CAAS,IAAT,CAAeH,CAAf,CADhB,CAD0C,CAD1CI,CAAAA,CAAWT,CAAA,CAAaA,CAAAS,SAAb,CAAmC,EAMlDP,EAAA,CAAgBO,CAAhB,CAA0B,4BAA1B,CAAwD,CAACA,CAAA,CAAS,kCAAT,CAAD,CAAxD,CAAwG,QAAS,CAACC,CAAD,CAAc,CAyC3HA,CAAAC,UAAAC,QAAAC,MAAA,CAAsCC,QAAS,CAACC,CAAD,CAAIC,CAAJ,CAAOC,CAAP;AAAUC,CAAV,CAAa,CACxD,MAAO,CACH,CAAC,GAAD,CAAMH,CAAN,CAASC,CAAT,CAAaE,CAAb,CAAiB,CAAjB,CADG,CAEH,CAAC,GAAD,CAAMH,CAAN,CAAUE,CAAV,CAAaD,CAAb,CAFG,CAGH,CAAC,GAAD,CAAMD,CAAN,CAASC,CAAT,CAAaE,CAAb,CAAiB,CAAjB,CAHG,CAIH,CAAC,GAAD,CAAMH,CAAN,CAAUE,CAAV,CAAaD,CAAb,CAAiBE,CAAjB,CAJG,CADiD,CAoC5DR,EAAAC,UAAAC,QAAA,CAA8B,YAA9B,CAAA,CAA8C,QAAS,CAACG,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAUC,CAAV,CAAa,CAChE,MAAOR,EAAAC,UAAAC,QAAAC,MAAA,CAAoCE,CAApC,CAAuCC,CAAvC,CAA0CC,CAA1C,CAA8C,CAA9C,CAAiDC,CAAjD,CADyD,CA+BpER,EAAAC,UAAAC,QAAA,CAA8B,eAA9B,CAAA,CAAiD,QAAS,CAACG,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAUC,CAAV,CAAa,CACnE,MAAO,CACH,CAAC,GAAD,CAAMH,CAAN,CAAUE,CAAV,CAAaD,CAAb,CADG,CAEH,CAAC,GAAD,CAAMD,CAAN,CAASC,CAAT,CAAaE,CAAb,CAAiB,CAAjB,CAFG,CAGH,CAAC,GAAD,CAAMH,CAAN,CAAUE,CAAV,CAAaD,CAAb,CAAiBE,CAAjB,CAHG,CAIH,CAAC,GAAD,CAJG,CAD4D,CA6BvER,EAAAC,UAAAC,QAAA,CAA8B,cAA9B,CAAA,CAAgDF,CAAAC,UAAAC,QAAA,CAA8B,eAA9B,CA6BhDF,EAAAC,UAAAC,QAAA,CAA8B,oBAA9B,CAAA,CAAsD,QAAS,CAACG,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAUC,CAAV,CAAa,CACxE,MAAOR,EAAAC,UAAAC,QAAA,CAA8B,eAA9B,CAAA,CAA+CG,CAA/C,CAAkDC,CAAlD,CAAqDC,CAArD,CAAyD,CAAzD,CAA4DC,CAA5D,CADiE,CAwB5ER,EAAAC,UAAAC,QAAA,CAA8B,mBAA9B,CAAA;AAAqDF,CAAAC,UAAAC,QAAA,CAA8B,oBAA9B,CA9LsE,CAA/H,CAiMAV,EAAA,CAAgBO,CAAhB,CAA0B,sCAA1B,CAAkE,EAAlE,CAAsE,QAAS,EAAG,EAAlF,CAxMoB,CAbvB;","sources":["arrow-symbols.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","SVGRenderer","prototype","symbols","arrow","SVGRenderer.prototype.symbols.arrow","x","y","w","h"]}
+228
View File
@@ -0,0 +1,228 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Arrow Symbols
*
* (c) 2017-2019 Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/arrow-symbols', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Extensions/ArrowSymbols.js', [_modules['Core/Renderer/SVG/SVGRenderer.js']], function (SVGRenderer) {
/* *
*
* (c) 2017 Highsoft AS
* Authors: Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
/**
* Creates an arrow symbol. Like a triangle, except not filled.
* ```
* o
* o
* o
* o
* o
* o
* o
* ```
*
* @private
* @function
*
* @param {number} x
* x position of the arrow
*
* @param {number} y
* y position of the arrow
*
* @param {number} w
* width of the arrow
*
* @param {number} h
* height of the arrow
*
* @return {Highcharts.SVGPathArray}
* Path array
*/
SVGRenderer.prototype.symbols.arrow = function (x, y, w, h) {
return [
['M', x, y + h / 2],
['L', x + w, y],
['L', x, y + h / 2],
['L', x + w, y + h]
];
};
/**
* Creates a half-width arrow symbol. Like a triangle, except not filled.
* ```
* o
* o
* o
* o
* o
* ```
*
* @private
* @function
*
* @param {number} x
* x position of the arrow
*
* @param {number} y
* y position of the arrow
*
* @param {number} w
* width of the arrow
*
* @param {number} h
* height of the arrow
*
* @return {Highcharts.SVGPathArray}
* Path array
*/
SVGRenderer.prototype.symbols['arrow-half'] = function (x, y, w, h) {
return SVGRenderer.prototype.symbols.arrow(x, y, w / 2, h);
};
/**
* Creates a left-oriented triangle.
* ```
* o
* ooooooo
* ooooooooooooo
* ooooooo
* o
* ```
*
* @private
* @function
*
* @param {number} x
* x position of the triangle
*
* @param {number} y
* y position of the triangle
*
* @param {number} w
* width of the triangle
*
* @param {number} h
* height of the triangle
*
* @return {Highcharts.SVGPathArray}
* Path array
*/
SVGRenderer.prototype.symbols['triangle-left'] = function (x, y, w, h) {
return [
['M', x + w, y],
['L', x, y + h / 2],
['L', x + w, y + h],
['Z']
];
};
/**
* Alias function for triangle-left.
*
* @private
* @function
*
* @param {number} x
* x position of the arrow
*
* @param {number} y
* y position of the arrow
*
* @param {number} w
* width of the arrow
*
* @param {number} h
* height of the arrow
*
* @return {Highcharts.SVGPathArray}
* Path array
*/
SVGRenderer.prototype.symbols['arrow-filled'] = SVGRenderer.prototype.symbols['triangle-left'];
/**
* Creates a half-width, left-oriented triangle.
* ```
* o
* oooo
* ooooooo
* oooo
* o
* ```
*
* @private
* @function
*
* @param {number} x
* x position of the triangle
*
* @param {number} y
* y position of the triangle
*
* @param {number} w
* width of the triangle
*
* @param {number} h
* height of the triangle
*
* @return {Highcharts.SVGPathArray}
* Path array
*/
SVGRenderer.prototype.symbols['triangle-left-half'] = function (x, y, w, h) {
return SVGRenderer.prototype.symbols['triangle-left'](x, y, w / 2, h);
};
/**
* Alias function for triangle-left-half.
*
* @private
* @function
*
* @param {number} x
* x position of the arrow
*
* @param {number} y
* y position of the arrow
*
* @param {number} w
* width of the arrow
*
* @param {number} h
* height of the arrow
*
* @return {Highcharts.SVGPathArray}
* Path array
*/
SVGRenderer.prototype.symbols['arrow-filled-half'] = SVGRenderer.prototype.symbols['triangle-left-half'];
});
_registerModule(_modules, 'masters/modules/arrow-symbols.src.js', [], function () {
});
}));
+25
View File
@@ -0,0 +1,25 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Boost module
(c) 2010-2019 Highsoft AS
Author: Torstein Honsi
License: www.highcharts.com/license
*/
(function(f){"object"===typeof module&&module.exports?(f["default"]=f,module.exports=f):"function"===typeof define&&define.amd?define("highcharts/modules/boost-canvas",["highcharts"],function(q){f(q);f.Highcharts=q;return f}):f("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(f){function q(f,r,q,m){f.hasOwnProperty(r)||(f[r]=m.apply(null,q))}f=f?f._modules:{};q(f,"Extensions/BoostCanvas.js",[f["Core/Chart/Chart.js"],f["Core/Globals.js"],f["Core/Color.js"],f["Core/Utilities.js"]],function(f,
r,q,m){var ba=q.parse,z=m.addEvent,x=m.extend,ca=m.fireEvent,da=m.isNumber,ea=m.merge,fa=m.pick,w=m.wrap,A=r.win.document,ha=function(){},B=r.Series,n=r.seriesTypes,L;r.initCanvasBoost=function(){r.seriesTypes.heatmap&&w(r.seriesTypes.heatmap.prototype,"drawPoints",function(){var a=this.chart,b=this.getContext(),e=this.chart.inverted,f=this.xAxis,c=this.yAxis;b?(this.points.forEach(function(d){var g=d.plotY;"undefined"===typeof g||isNaN(g)||null===d.y||(g=d.shapeArgs,d=a.styledMode?d.series.colorAttribs(d):
d.series.pointAttribs(d),b.fillStyle=d.fill,e?b.fillRect(c.len-g.y+f.left,f.len-g.x+c.top,-g.height,-g.width):b.fillRect(g.x+f.left,g.y+c.top,g.width,g.height))}),this.canvasToSVG()):this.chart.showLoading("Your browser doesn't support HTML5 canvas, <br>please use a modern browser")});x(B.prototype,{getContext:function(){var a=this.chart,b=a.chartWidth,e=a.chartHeight,d=a.seriesGroup||this.group,c=this,f=function(a,c,e,b,f,d,g){a.call(this,e,c,b,f,d,g)};a.isChartSeriesBoosting()&&(c=a,d=a.seriesGroup);
var g=c.ctx;c.canvas||(c.canvas=A.createElement("canvas"),c.renderTarget=a.renderer.image("",0,0,b,e).addClass("highcharts-boost-canvas").add(d),c.ctx=g=c.canvas.getContext("2d"),a.inverted&&["moveTo","lineTo","rect","arc"].forEach(function(a){w(g,a,f)}),c.boostCopy=function(){c.renderTarget.attr({href:c.canvas.toDataURL("image/png")})},c.boostClear=function(){g.clearRect(0,0,c.canvas.width,c.canvas.height);c===this&&c.renderTarget.attr({href:""})},c.boostClipRect=a.renderer.clipRect(),c.renderTarget.clip(c.boostClipRect));
c.canvas.width!==b&&(c.canvas.width=b);c.canvas.height!==e&&(c.canvas.height=e);c.renderTarget.attr({x:0,y:0,width:b,height:e,style:"pointer-events: none",href:""});c.boostClipRect.attr(a.getBoostClipRect(c));return g},canvasToSVG:function(){this.chart.isChartSeriesBoosting()?this.boostClear&&this.boostClear():(this.boostCopy||this.chart.boostCopy)&&(this.boostCopy||this.chart.boostCopy)()},cvsLineTo:function(a,b,e){a.lineTo(b,e)},renderCanvas:function(){var a=this,b=a.options,e=a.chart,f=this.xAxis,
c=this.yAxis,n=(e.options.boost||{}).timeRendering||!1,g=0,w=a.processedXData,A=a.processedYData,M=b.data,k=f.getExtremes(),C=k.min,D=k.max;k=c.getExtremes();var B=k.min,ia=k.max,N={},E,ja=!!a.sampling,F=b.marker&&b.marker.radius,O=this.cvsDrawPoint,G=b.lineWidth?this.cvsLineTo:void 0,P=F&&1>=F?this.cvsMarkerSquare:this.cvsMarkerCircle,ka=this.cvsStrokeBatch||1E3,la=!1!==b.enableMouseTracking,Q;k=b.threshold;var u=c.getThreshold(k),R=da(k),S=u,ma=this.fill,T=a.pointArrayMap&&"low,high"===a.pointArrayMap.join(","),
U=!!b.stacking,V=a.cropStart||0;k=e.options.loading;var na=a.requireSorting,W,oa=b.connectNulls,X=!w,H,I,v,y,J,t=U?a.data:w||M,pa=a.fillOpacity?(new q(a.color)).setOpacity(fa(b.fillOpacity,.75)).get():a.color,Y=function(){ma?(l.fillStyle=pa,l.fill()):(l.strokeStyle=a.color,l.lineWidth=b.lineWidth,l.stroke())},Z=function(c,b,f,d){0===g&&(l.beginPath(),G&&(l.lineJoin="round"));e.scroller&&"highcharts-navigator-series"===a.options.className?(b+=e.scroller.top,f&&(f+=e.scroller.top)):b+=e.plotTop;c+=
e.plotLeft;W?l.moveTo(c,b):O?O(l,c,b,f,Q):G?G(l,c,b):P&&P.call(a,l,c,b,F,d);g+=1;g===ka&&(Y(),g=0);Q={clientX:c,plotY:b,yBottom:f}},qa="x"===b.findNearestPointBy,aa=this.xData||this.options.xData||this.processedXData||!1,K=function(a,b,d){J=qa?a:a+","+b;la&&!N[J]&&(N[J]=!0,e.inverted&&(a=f.len-a,b=c.len-b),ra.push({x:aa?aa[V+d]:!1,clientX:a,plotX:a,plotY:b,i:V+d}))};this.renderTarget&&this.renderTarget.attr({href:""});(this.points||this.graph)&&this.destroyGraphics();a.plotGroup("group","series",
a.visible?"visible":"hidden",b.zIndex,e.seriesGroup);a.markerGroup=a.group;z(a,"destroy",function(){a.markerGroup=null});var ra=this.points=[];var l=this.getContext();a.buildKDTree=ha;this.boostClear&&this.boostClear();this.visible&&(99999<M.length&&(e.options.loading=ea(k,{labelStyle:{backgroundColor:ba("#ffffff").setOpacity(.75).get(),padding:"1em",borderRadius:"0.5em"},style:{backgroundColor:"none",opacity:1}}),m.clearTimeout(L),e.showLoading("Drawing..."),e.options.loading=k),n&&console.time("canvas rendering"),
r.eachAsync(t,function(b,d){var g=!1,n=!1,k=!1,l=!1,q="undefined"===typeof e.index,r=!0;if(!q){if(X){var p=b[0];var h=b[1];t[d+1]&&(k=t[d+1][0]);t[d-1]&&(l=t[d-1][0])}else p=b,h=A[d],t[d+1]&&(k=t[d+1]),t[d-1]&&(l=t[d-1]);k&&k>=C&&k<=D&&(g=!0);l&&l>=C&&l<=D&&(n=!0);if(T){X&&(h=b.slice(1,3));var m=h[0];h=h[1]}else U&&(p=b.x,h=b.stackY,m=h-b.y);b=null===h;na||(r=h>=B&&h<=ia);if(!b&&(p>=C&&p<=D&&r||g||n))if(p=Math.round(f.toPixels(p,!0)),ja){if("undefined"===typeof v||p===E){T||(m=h);if("undefined"===
typeof y||h>I)I=h,y=d;if("undefined"===typeof v||m<H)H=m,v=d}p!==E&&("undefined"!==typeof v&&(h=c.toPixels(I,!0),u=c.toPixels(H,!0),Z(p,R?Math.min(h,S):h,R?Math.max(u,S):u,d),K(p,h,y),u!==h&&K(p,u,v)),v=y=void 0,E=p)}else h=Math.round(c.toPixels(h,!0)),Z(p,h,u,d),K(p,h,d);W=b&&!oa;0===d%5E4&&(a.boostCopy||a.chart.boostCopy)&&(a.boostCopy||a.chart.boostCopy)()}return!q},function(){var b=e.loadingDiv,c=e.loadingShown;Y();a.canvasToSVG();n&&console.timeEnd("canvas rendering");ca(a,"renderedCanvas");
c&&(x(b.style,{transition:"opacity 250ms",opacity:0}),e.loadingShown=!1,L=setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b);e.loadingDiv=e.loadingSpan=null},250));delete a.buildKDTree;a.buildKDTree()},e.renderer.forExport?Number.MAX_VALUE:void 0))}});n.scatter.prototype.cvsMarkerCircle=function(a,b,e,d){a.moveTo(b,e);a.arc(b,e,d,0,2*Math.PI,!1)};n.scatter.prototype.cvsMarkerSquare=function(a,b,e,d){a.rect(b-d,e-d,2*d,2*d)};n.scatter.prototype.fill=!0;n.bubble&&(n.bubble.prototype.cvsMarkerCircle=
function(a,b,e,d,c){a.moveTo(b,e);a.arc(b,e,this.radii&&this.radii[c],0,2*Math.PI,!1)},n.bubble.prototype.cvsStrokeBatch=1);x(n.area.prototype,{cvsDrawPoint:function(a,b,e,d,c){c&&b!==c.clientX&&(a.moveTo(c.clientX,c.yBottom),a.lineTo(c.clientX,c.plotY),a.lineTo(b,e),a.lineTo(b,d))},fill:!0,fillOpacity:!0,sampling:!0});x(n.column.prototype,{cvsDrawPoint:function(a,b,e,d){a.rect(b-1,e,1,d-e)},fill:!0,sampling:!0});f.prototype.callbacks.push(function(a){z(a,"predraw",function(){a.renderTarget&&a.renderTarget.attr({href:""});
a.canvas&&a.canvas.getContext("2d").clearRect(0,0,a.canvas.width,a.canvas.height)});z(a,"render",function(){a.boostCopy&&a.boostCopy()})})}});q(f,"masters/modules/boost-canvas.src.js",[],function(){})});
//# sourceMappingURL=boost-canvas.js.map
File diff suppressed because one or more lines are too long
+585
View File
@@ -0,0 +1,585 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Boost module
*
* (c) 2010-2019 Highsoft AS
* Author: Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/boost-canvas', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Extensions/BoostCanvas.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/Color.js'], _modules['Core/Utilities.js']], function (Chart, H, Color, U) {
/* *
*
* License: www.highcharts.com/license
* Author: Torstein Honsi, Christer Vasseng
*
* This module serves as a fallback for the Boost module in IE9 and IE10. Newer
* browsers support WebGL which is faster.
*
* It is recommended to include this module in conditional comments targeting
* IE9 and IE10.
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var color = Color.parse;
var addEvent = U.addEvent,
extend = U.extend,
fireEvent = U.fireEvent,
isNumber = U.isNumber,
merge = U.merge,
pick = U.pick,
wrap = U.wrap;
var win = H.win,
doc = win.document,
noop = function () { },
Series = H.Series,
seriesTypes = H.seriesTypes,
CHUNK_SIZE = 50000,
destroyLoadingDiv;
/* eslint-disable no-invalid-this, valid-jsdoc */
/**
* Initialize the canvas boost.
*
* @function Highcharts.initCanvasBoost
*/
H.initCanvasBoost = function () {
if (H.seriesTypes.heatmap) {
wrap(H.seriesTypes.heatmap.prototype, 'drawPoints', function () {
var chart = this.chart,
ctx = this.getContext(),
inverted = this.chart.inverted,
xAxis = this.xAxis,
yAxis = this.yAxis;
if (ctx) {
// draw the columns
this.points.forEach(function (point) {
var plotY = point.plotY,
shapeArgs,
pointAttr;
if (typeof plotY !== 'undefined' &&
!isNaN(plotY) &&
point.y !== null) {
shapeArgs = point.shapeArgs;
if (!chart.styledMode) {
pointAttr = point.series.pointAttribs(point);
}
else {
pointAttr = point.series.colorAttribs(point);
}
ctx.fillStyle = pointAttr.fill;
if (inverted) {
ctx.fillRect(yAxis.len - shapeArgs.y + xAxis.left, xAxis.len - shapeArgs.x + yAxis.top, -shapeArgs.height, -shapeArgs.width);
}
else {
ctx.fillRect(shapeArgs.x + xAxis.left, shapeArgs.y + yAxis.top, shapeArgs.width, shapeArgs.height);
}
}
});
this.canvasToSVG();
}
else {
this.chart.showLoading('Your browser doesn\'t support HTML5 canvas, <br>' +
'please use a modern browser');
// Uncomment this to provide low-level (slow) support in oldIE.
// It will cause script errors on charts with more than a few
// thousand points.
// arguments[0].call(this);
}
});
}
extend(Series.prototype, {
/**
* Create a hidden canvas to draw the graph on. The contents is later
* copied over to an SVG image element.
*
* @private
* @function Highcharts.Series#getContext
*/
getContext: function () {
var chart = this.chart,
width = chart.chartWidth,
height = chart.chartHeight,
targetGroup = chart.seriesGroup || this.group,
target = this,
ctx,
swapXY = function (proceed,
x,
y,
a,
b,
c,
d) {
proceed.call(this,
y,
x,
a,
b,
c,
d);
};
if (chart.isChartSeriesBoosting()) {
target = chart;
targetGroup = chart.seriesGroup;
}
ctx = target.ctx;
if (!target.canvas) {
target.canvas = doc.createElement('canvas');
target.renderTarget = chart.renderer
.image('', 0, 0, width, height)
.addClass('highcharts-boost-canvas')
.add(targetGroup);
target.ctx = ctx = target.canvas.getContext('2d');
if (chart.inverted) {
['moveTo', 'lineTo', 'rect', 'arc'].forEach(function (fn) {
wrap(ctx, fn, swapXY);
});
}
target.boostCopy = function () {
target.renderTarget.attr({
href: target.canvas.toDataURL('image/png')
});
};
target.boostClear = function () {
ctx.clearRect(0, 0, target.canvas.width, target.canvas.height);
if (target === this) {
target.renderTarget.attr({ href: '' });
}
};
target.boostClipRect = chart.renderer.clipRect();
target.renderTarget.clip(target.boostClipRect);
}
else if (!(target instanceof H.Chart)) {
// ctx.clearRect(0, 0, width, height);
}
if (target.canvas.width !== width) {
target.canvas.width = width;
}
if (target.canvas.height !== height) {
target.canvas.height = height;
}
target.renderTarget.attr({
x: 0,
y: 0,
width: width,
height: height,
style: 'pointer-events: none',
href: ''
});
target.boostClipRect.attr(chart.getBoostClipRect(target));
return ctx;
},
/**
* Draw the canvas image inside an SVG image
*
* @private
* @function Highcharts.Series#canvasToSVG
*/
canvasToSVG: function () {
if (!this.chart.isChartSeriesBoosting()) {
if (this.boostCopy || this.chart.boostCopy) {
(this.boostCopy || this.chart.boostCopy)();
}
}
else {
if (this.boostClear) {
this.boostClear();
}
}
},
cvsLineTo: function (ctx, clientX, plotY) {
ctx.lineTo(clientX, plotY);
},
renderCanvas: function () {
var series = this, options = series.options, chart = series.chart, xAxis = this.xAxis, yAxis = this.yAxis, activeBoostSettings = chart.options.boost || {}, boostSettings = {
timeRendering: activeBoostSettings.timeRendering || false,
timeSeriesProcessing: activeBoostSettings.timeSeriesProcessing || false,
timeSetup: activeBoostSettings.timeSetup || false
}, ctx, c = 0, xData = series.processedXData, yData = series.processedYData, rawData = options.data, xExtremes = xAxis.getExtremes(), xMin = xExtremes.min, xMax = xExtremes.max, yExtremes = yAxis.getExtremes(), yMin = yExtremes.min, yMax = yExtremes.max, pointTaken = {}, lastClientX, sampling = !!series.sampling, points, r = options.marker && options.marker.radius, cvsDrawPoint = this.cvsDrawPoint, cvsLineTo = options.lineWidth ? this.cvsLineTo : void 0, cvsMarker = (r && r <= 1 ?
this.cvsMarkerSquare :
this.cvsMarkerCircle), strokeBatch = this.cvsStrokeBatch || 1000, enableMouseTracking = options.enableMouseTracking !== false, lastPoint, threshold = options.threshold, yBottom = yAxis.getThreshold(threshold), hasThreshold = isNumber(threshold), translatedThreshold = yBottom, doFill = this.fill, isRange = (series.pointArrayMap &&
series.pointArrayMap.join(',') === 'low,high'), isStacked = !!options.stacking, cropStart = series.cropStart || 0, loadingOptions = chart.options.loading, requireSorting = series.requireSorting, wasNull, connectNulls = options.connectNulls, useRaw = !xData, minVal, maxVal, minI, maxI, index, sdata = (isStacked ?
series.data :
(xData || rawData)), fillColor = (series.fillOpacity ?
new Color(series.color).setOpacity(pick(options.fillOpacity, 0.75)).get() :
series.color),
//
stroke = function () {
if (doFill) {
ctx.fillStyle = fillColor;
ctx.fill();
}
else {
ctx.strokeStyle = series.color;
ctx.lineWidth = options.lineWidth;
ctx.stroke();
}
},
//
drawPoint = function (clientX, plotY, yBottom, i) {
if (c === 0) {
ctx.beginPath();
if (cvsLineTo) {
ctx.lineJoin = 'round';
}
}
if (chart.scroller &&
series.options.className ===
'highcharts-navigator-series') {
plotY += chart.scroller.top;
if (yBottom) {
yBottom += chart.scroller.top;
}
}
else {
plotY += chart.plotTop;
}
clientX += chart.plotLeft;
if (wasNull) {
ctx.moveTo(clientX, plotY);
}
else {
if (cvsDrawPoint) {
cvsDrawPoint(ctx, clientX, plotY, yBottom, lastPoint);
}
else if (cvsLineTo) {
cvsLineTo(ctx, clientX, plotY);
}
else if (cvsMarker) {
cvsMarker.call(series, ctx, clientX, plotY, r, i);
}
}
// We need to stroke the line for every 1000 pixels. It will
// crash the browser memory use if we stroke too
// infrequently.
c = c + 1;
if (c === strokeBatch) {
stroke();
c = 0;
}
// Area charts need to keep track of the last point
lastPoint = {
clientX: clientX,
plotY: plotY,
yBottom: yBottom
};
},
//
compareX = options.findNearestPointBy === 'x',
//
xDataFull = (this.xData ||
this.options.xData ||
this.processedXData ||
false),
//
addKDPoint = function (clientX, plotY, i) {
// Shaves off about 60ms compared to repeated concatenation
index = compareX ? clientX : clientX + ',' + plotY;
// The k-d tree requires series points.
// Reduce the amount of points, since the time to build the
// tree increases exponentially.
if (enableMouseTracking && !pointTaken[index]) {
pointTaken[index] = true;
if (chart.inverted) {
clientX = xAxis.len - clientX;
plotY = yAxis.len - plotY;
}
points.push({
x: xDataFull ?
xDataFull[cropStart + i] :
false,
clientX: clientX,
plotX: clientX,
plotY: plotY,
i: cropStart + i
});
}
};
if (this.renderTarget) {
this.renderTarget.attr({ 'href': '' });
}
// If we are zooming out from SVG mode, destroy the graphics
if (this.points || this.graph) {
this.destroyGraphics();
}
// The group
series.plotGroup('group', 'series', series.visible ? 'visible' : 'hidden', options.zIndex, chart.seriesGroup);
series.markerGroup = series.group;
addEvent(series, 'destroy', function () {
// Prevent destroy twice
series.markerGroup = null;
});
points = this.points = [];
ctx = this.getContext();
series.buildKDTree = noop; // Do not start building while drawing
if (this.boostClear) {
this.boostClear();
}
// if (this.canvas) {
// ctx.clearRect(
// 0,
// 0,
// this.canvas.width,
// this.canvas.height
// );
// }
if (!this.visible) {
return;
}
// Display a loading indicator
if (rawData.length > 99999) {
chart.options.loading = merge(loadingOptions, {
labelStyle: {
backgroundColor: color('#ffffff').setOpacity(0.75).get(),
padding: '1em',
borderRadius: '0.5em'
},
style: {
backgroundColor: 'none',
opacity: 1
}
});
U.clearTimeout(destroyLoadingDiv);
chart.showLoading('Drawing...');
chart.options.loading = loadingOptions; // reset
}
if (boostSettings.timeRendering) {
console.time('canvas rendering'); // eslint-disable-line no-console
}
// Loop over the points
H.eachAsync(sdata, function (d, i) {
var x,
y,
clientX,
plotY,
isNull,
low,
isNextInside = false,
isPrevInside = false,
nx = false,
px = false,
chartDestroyed = typeof chart.index === 'undefined',
isYInside = true;
if (!chartDestroyed) {
if (useRaw) {
x = d[0];
y = d[1];
if (sdata[i + 1]) {
nx = sdata[i + 1][0];
}
if (sdata[i - 1]) {
px = sdata[i - 1][0];
}
}
else {
x = d;
y = yData[i];
if (sdata[i + 1]) {
nx = sdata[i + 1];
}
if (sdata[i - 1]) {
px = sdata[i - 1];
}
}
if (nx && nx >= xMin && nx <= xMax) {
isNextInside = true;
}
if (px && px >= xMin && px <= xMax) {
isPrevInside = true;
}
// Resolve low and high for range series
if (isRange) {
if (useRaw) {
y = d.slice(1, 3);
}
low = y[0];
y = y[1];
}
else if (isStacked) {
x = d.x;
y = d.stackY;
low = y - d.y;
}
isNull = y === null;
// Optimize for scatter zooming
if (!requireSorting) {
isYInside = y >= yMin && y <= yMax;
}
if (!isNull &&
((x >= xMin && x <= xMax && isYInside) ||
(isNextInside || isPrevInside))) {
clientX = Math.round(xAxis.toPixels(x, true));
if (sampling) {
if (typeof minI === 'undefined' ||
clientX === lastClientX) {
if (!isRange) {
low = y;
}
if (typeof maxI === 'undefined' || y > maxVal) {
maxVal = y;
maxI = i;
}
if (typeof minI === 'undefined' ||
low < minVal) {
minVal = low;
minI = i;
}
}
// Add points and reset
if (clientX !== lastClientX) {
// maxI also a number:
if (typeof minI !== 'undefined') {
plotY = yAxis.toPixels(maxVal, true);
yBottom = yAxis.toPixels(minVal, true);
drawPoint(clientX, hasThreshold ?
Math.min(plotY, translatedThreshold) : plotY, hasThreshold ?
Math.max(yBottom, translatedThreshold) : yBottom, i);
addKDPoint(clientX, plotY, maxI);
if (yBottom !== plotY) {
addKDPoint(clientX, yBottom, minI);
}
}
minI = maxI = void 0;
lastClientX = clientX;
}
}
else {
plotY = Math.round(yAxis.toPixels(y, true));
drawPoint(clientX, plotY, yBottom, i);
addKDPoint(clientX, plotY, i);
}
}
wasNull = isNull && !connectNulls;
if (i % CHUNK_SIZE === 0) {
if (series.boostCopy || series.chart.boostCopy) {
(series.boostCopy || series.chart.boostCopy)();
}
}
}
return !chartDestroyed;
}, function () {
var loadingDiv = chart.loadingDiv,
loadingShown = chart.loadingShown;
stroke();
// if (series.boostCopy || series.chart.boostCopy) {
// (series.boostCopy || series.chart.boostCopy)();
// }
series.canvasToSVG();
if (boostSettings.timeRendering) {
console.timeEnd('canvas rendering'); // eslint-disable-line no-console
}
fireEvent(series, 'renderedCanvas');
// Do not use chart.hideLoading, as it runs JS animation and
// will be blocked by buildKDTree. CSS animation looks good, but
// then it must be deleted in timeout. If we add the module to
// core, change hideLoading so we can skip this block.
if (loadingShown) {
extend(loadingDiv.style, {
transition: 'opacity 250ms',
opacity: 0
});
chart.loadingShown = false;
destroyLoadingDiv = setTimeout(function () {
if (loadingDiv.parentNode) { // In exporting it is falsy
loadingDiv.parentNode.removeChild(loadingDiv);
}
chart.loadingDiv = chart.loadingSpan = null;
}, 250);
}
// Go back to prototype, ready to build
delete series.buildKDTree;
series.buildKDTree();
// Don't do async on export, the exportChart, getSVGForExport and
// getSVG methods are not chained for it.
}, chart.renderer.forExport ? Number.MAX_VALUE : void 0);
}
});
seriesTypes.scatter.prototype.cvsMarkerCircle = function (ctx, clientX, plotY, r) {
ctx.moveTo(clientX, plotY);
ctx.arc(clientX, plotY, r, 0, 2 * Math.PI, false);
};
// Rect is twice as fast as arc, should be used for small markers
seriesTypes.scatter.prototype.cvsMarkerSquare = function (ctx, clientX, plotY, r) {
ctx.rect(clientX - r, plotY - r, r * 2, r * 2);
};
seriesTypes.scatter.prototype.fill = true;
if (seriesTypes.bubble) {
seriesTypes.bubble.prototype.cvsMarkerCircle = function (ctx, clientX, plotY, r, i) {
ctx.moveTo(clientX, plotY);
ctx.arc(clientX, plotY, this.radii && this.radii[i], 0, 2 * Math.PI, false);
};
seriesTypes.bubble.prototype.cvsStrokeBatch = 1;
}
extend(seriesTypes.area.prototype, {
cvsDrawPoint: function (ctx, clientX, plotY, yBottom, lastPoint) {
if (lastPoint && clientX !== lastPoint.clientX) {
ctx.moveTo(lastPoint.clientX, lastPoint.yBottom);
ctx.lineTo(lastPoint.clientX, lastPoint.plotY);
ctx.lineTo(clientX, plotY);
ctx.lineTo(clientX, yBottom);
}
},
fill: true,
fillOpacity: true,
sampling: true
});
extend(seriesTypes.column.prototype, {
cvsDrawPoint: function (ctx, clientX, plotY, yBottom) {
ctx.rect(clientX - 1, plotY, 1, yBottom - plotY);
},
fill: true,
sampling: true
});
Chart.prototype.callbacks.push(function (chart) {
/**
* @private
*/
function canvasToSVG() {
if (chart.boostCopy) {
chart.boostCopy();
}
}
/**
* @private
*/
function clear() {
if (chart.renderTarget) {
chart.renderTarget.attr({ href: '' });
}
if (chart.canvas) {
chart.canvas.getContext('2d').clearRect(0, 0, chart.canvas.width, chart.canvas.height);
}
}
addEvent(chart, 'predraw', clear);
addEvent(chart, 'render', canvasToSVG);
});
};
});
_registerModule(_modules, 'masters/modules/boost-canvas.src.js', [], function () {
});
}));
+136
View File
@@ -0,0 +1,136 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Boost module
(c) 2010-2019 Highsoft AS
Author: Torstein Honsi
License: www.highcharts.com/license
This is a Highcharts module that draws long data series on a canvas in order
to increase performance of the initial load time and tooltip responsiveness.
Compatible with WebGL compatible browsers (not IE < 11).
If this module is taken in as part of the core
- All the loading logic should be merged with core. Update styles in the
core.
- Most of the method wraps should probably be added directly in parent
methods.
Notes for boost mode
- Area lines are not drawn
- Lines are not drawn on scatter charts
- Zones and negativeColor don't work
- Dash styles are not rendered on lines.
- Columns are always one pixel wide. Don't set the threshold too low.
- Disable animations
- Marker shapes are not supported: markers will always be circles, except
heatmap series, where markers are always rectangles.
Optimizing tips for users
- Set extremes (min, max) explicitly on the axes in order for Highcharts to
avoid computing extremes.
- Set enableMouseTracking to false on the series to improve total rendering
time.
- The default threshold is set based on one series. If you have multiple,
dense series, the combined number of points drawn gets higher, and you may
want to set the threshold lower in order to use optimizations.
- If drawing large scatter charts, it's beneficial to set the marker radius
to a value less than 1. This is to add additional spacing to make the chart
more readable.
- If the value increments on both the X and Y axis aren't small, consider
setting useGPUTranslations to true on the boost settings object. If you do
this and the increments are small (e.g. datetime axis with small time
increments) it may cause rendering issues due to floating point rounding
errors, so your millage may vary.
Settings
There are two ways of setting the boost threshold:
- Per series: boost based on number of points in individual series
- Per chart: boost based on the number of series
To set the series boost threshold, set seriesBoostThreshold on the chart
object.
To set the series-specific threshold, set boostThreshold on the series
object.
In addition, the following can be set in the boost object:
{
//Wether or not to use alpha blending
useAlpha: boolean - default: true
//Set to true to perform translations on the GPU.
//Much faster, but may cause rendering issues
//when using values far from 0 due to floating point
//rounding issues
useGPUTranslations: boolean - default: false
//Use pre-allocated buffers, much faster,
//but may cause rendering issues with some data sets
usePreallocated: boolean - default: false
}
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/boost",["highcharts"],function(n){b(n);b.Highcharts=n;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function n(b,l,E,m){b.hasOwnProperty(l)||(b[l]=m.apply(null,E))}b=b?b._modules:{};n(b,"Extensions/Boost/Boostables.js",[],function(){return"area arearange column columnrange bar line scatter heatmap bubble treemap".split(" ")});
n(b,"Extensions/Boost/BoostableMap.js",[b["Extensions/Boost/Boostables.js"]],function(b){var v={};b.forEach(function(b){v[b]=1});return v});n(b,"Extensions/Boost/WGLShader.js",[b["Core/Utilities.js"]],function(b){var v=b.clamp,E=b.error,m=b.pick;return function(d){function b(){k.length&&E("[highcharts boost] shader error - "+k.join("\n"))}function g(c,a){var e=d.createShader("vertex"===a?d.VERTEX_SHADER:d.FRAGMENT_SHADER);d.shaderSource(e,c);d.compileShader(e);return d.getShaderParameter(e,d.COMPILE_STATUS)?
e:(k.push("when compiling "+a+" shader:\n"+d.getShaderInfoLog(e)),!1)}function z(){function c(c){return d.getUniformLocation(a,c)}var H=g("#version 100\n#define LN10 2.302585092994046\nprecision highp float;\nattribute vec4 aVertexPosition;\nattribute vec4 aColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform mat4 uPMatrix;\nuniform float pSize;\nuniform float translatedThreshold;\nuniform bool hasThreshold;\nuniform bool skipTranslation;\nuniform float xAxisTrans;\nuniform float xAxisMin;\nuniform float xAxisMinPad;\nuniform float xAxisPointRange;\nuniform float xAxisLen;\nuniform bool xAxisPostTranslate;\nuniform float xAxisOrdinalSlope;\nuniform float xAxisOrdinalOffset;\nuniform float xAxisPos;\nuniform bool xAxisCVSCoord;\nuniform bool xAxisIsLog;\nuniform bool xAxisReversed;\nuniform float yAxisTrans;\nuniform float yAxisMin;\nuniform float yAxisMinPad;\nuniform float yAxisPointRange;\nuniform float yAxisLen;\nuniform bool yAxisPostTranslate;\nuniform float yAxisOrdinalSlope;\nuniform float yAxisOrdinalOffset;\nuniform float yAxisPos;\nuniform bool yAxisCVSCoord;\nuniform bool yAxisIsLog;\nuniform bool yAxisReversed;\nuniform bool isBubble;\nuniform bool bubbleSizeByArea;\nuniform float bubbleZMin;\nuniform float bubbleZMax;\nuniform float bubbleZThreshold;\nuniform float bubbleMinSize;\nuniform float bubbleMaxSize;\nuniform bool bubbleSizeAbs;\nuniform bool isInverted;\nfloat bubbleRadius(){\nfloat value = aVertexPosition.w;\nfloat zMax = bubbleZMax;\nfloat zMin = bubbleZMin;\nfloat radius = 0.0;\nfloat pos = 0.0;\nfloat zRange = zMax - zMin;\nif (bubbleSizeAbs){\nvalue = value - bubbleZThreshold;\nzMax = max(zMax - bubbleZThreshold, zMin - bubbleZThreshold);\nzMin = 0.0;\n}\nif (value < zMin){\nradius = bubbleZMin / 2.0 - 1.0;\n} else {\npos = zRange > 0.0 ? (value - zMin) / zRange : 0.5;\nif (bubbleSizeByArea && pos > 0.0){\npos = sqrt(pos);\n}\nradius = ceil(bubbleMinSize + pos * (bubbleMaxSize - bubbleMinSize)) / 2.0;\n}\nreturn radius * 2.0;\n}\nfloat translate(float val,\nfloat pointPlacement,\nfloat localA,\nfloat localMin,\nfloat minPixelPadding,\nfloat pointRange,\nfloat len,\nbool cvsCoord,\nbool isLog,\nbool reversed\n){\nfloat sign = 1.0;\nfloat cvsOffset = 0.0;\nif (cvsCoord) {\nsign *= -1.0;\ncvsOffset = len;\n}\nif (isLog) {\nval = log(val) / LN10;\n}\nif (reversed) {\nsign *= -1.0;\ncvsOffset -= sign * len;\n}\nreturn sign * (val - localMin) * localA + cvsOffset + \n(sign * minPixelPadding);\n}\nfloat xToPixels(float value) {\nif (skipTranslation){\nreturn value;// + xAxisPos;\n}\nreturn translate(value, 0.0, xAxisTrans, xAxisMin, xAxisMinPad, xAxisPointRange, xAxisLen, xAxisCVSCoord, xAxisIsLog, xAxisReversed);// + xAxisPos;\n}\nfloat yToPixels(float value, float checkTreshold) {\nfloat v;\nif (skipTranslation){\nv = value;// + yAxisPos;\n} else {\nv = translate(value, 0.0, yAxisTrans, yAxisMin, yAxisMinPad, yAxisPointRange, yAxisLen, yAxisCVSCoord, yAxisIsLog, yAxisReversed);// + yAxisPos;\nif (v > yAxisLen) {\nv = yAxisLen;\n}\n}\nif (checkTreshold > 0.0 && hasThreshold) {\nv = min(v, translatedThreshold);\n}\nreturn v;\n}\nvoid main(void) {\nif (isBubble){\ngl_PointSize = bubbleRadius();\n} else {\ngl_PointSize = pSize;\n}\nvColor = aColor;\nif (skipTranslation && isInverted) {\ngl_Position = uPMatrix * vec4(aVertexPosition.y + yAxisPos, aVertexPosition.x + xAxisPos, 0.0, 1.0);\n} else if (isInverted) {\ngl_Position = uPMatrix * vec4(yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, xToPixels(aVertexPosition.x) + xAxisPos, 0.0, 1.0);\n} else {\ngl_Position = uPMatrix * vec4(xToPixels(aVertexPosition.x) + xAxisPos, yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, 0.0, 1.0);\n}\n}",
"vertex"),e=g("precision highp float;\nuniform vec4 fillColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform sampler2D uSampler;\nuniform bool isCircle;\nuniform bool hasColor;\nvoid main(void) {\nvec4 col = fillColor;\nvec4 tcol;\nif (hasColor) {\ncol = vColor;\n}\nif (isCircle) {\ntcol = texture2D(uSampler, gl_PointCoord.st);\ncol *= tcol;\nif (tcol.r < 0.0) {\ndiscard;\n} else {\ngl_FragColor = col;\n}\n} else {\ngl_FragColor = col;\n}\n}","fragment");if(!H||!e)return a=!1,
b(),!1;a=d.createProgram();d.attachShader(a,H);d.attachShader(a,e);d.linkProgram(a);if(!d.getProgramParameter(a,d.LINK_STATUS))return k.push(d.getProgramInfoLog(a)),b(),a=!1;d.useProgram(a);d.bindAttribLocation(a,0,"aVertexPosition");w=c("uPMatrix");p=c("pSize");f=c("fillColor");B=c("isBubble");O=c("bubbleSizeAbs");h=c("bubbleSizeByArea");I=c("uSampler");l=c("skipTranslation");G=c("isCircle");t=c("isInverted");return!0}function q(c,k){d&&a&&(c=r[c]=r[c]||d.getUniformLocation(a,c),d.uniform1f(c,k))}
var r={},a,w,p,f,B,O,h,l,G,t,k=[],I;return d&&!z()?!1:{psUniform:function(){return p},pUniform:function(){return w},fillColorUniform:function(){return f},setBubbleUniforms:function(c,k,e){var t=c.options,b=Number.MAX_VALUE,p=-Number.MAX_VALUE;d&&a&&"bubble"===c.type&&(b=m(t.zMin,v(k,!1===t.displayNegative?t.zThreshold:-Number.MAX_VALUE,b)),p=m(t.zMax,Math.max(p,e)),d.uniform1i(B,1),d.uniform1i(G,1),d.uniform1i(h,"width"!==c.options.sizeBy),d.uniform1i(O,c.options.sizeByAbsoluteValue),q("bubbleZMin",
b),q("bubbleZMax",p),q("bubbleZThreshold",c.options.zThreshold),q("bubbleMinSize",c.minPxSize),q("bubbleMaxSize",c.maxPxSize))},bind:function(){d&&a&&d.useProgram(a)},program:function(){return a},create:z,setUniform:q,setPMatrix:function(c){d&&a&&d.uniformMatrix4fv(w,!1,c)},setColor:function(c){d&&a&&d.uniform4f(f,c[0]/255,c[1]/255,c[2]/255,c[3])},setPointSize:function(c){d&&a&&d.uniform1f(p,c)},setSkipTranslation:function(c){d&&a&&d.uniform1i(l,!0===c?1:0)},setTexture:function(c){d&&a&&d.uniform1i(I,
c)},setDrawAsCircle:function(c){d&&a&&d.uniform1i(G,c?1:0)},reset:function(){d&&a&&(d.uniform1i(B,0),d.uniform1i(G,0))},setInverted:function(c){d&&a&&d.uniform1i(t,c)},destroy:function(){d&&a&&(d.deleteProgram(a),a=!1)}}}});n(b,"Extensions/Boost/WGLVBuffer.js",[],function(){return function(b,l,E){function m(){d&&(b.deleteBuffer(d),v=d=!1);q=0;g=E||2;r=[]}var d=!1,v=!1,g=E||2,z=!1,q=0,r;return{destroy:m,bind:function(){if(!d)return!1;b.vertexAttribPointer(v,g,b.FLOAT,!1,0,0)},data:r,build:function(a,
w,p){var f;r=a||[];if(!(r&&0!==r.length||z))return m(),!1;g=p||g;d&&b.deleteBuffer(d);z||(f=new Float32Array(r));d=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,d);b.bufferData(b.ARRAY_BUFFER,z||f,b.STATIC_DRAW);v=b.getAttribLocation(l.program(),w);b.enableVertexAttribArray(v);return!0},render:function(a,m,p){var f=z?z.length:r.length;if(!d||!f)return!1;if(!a||a>f||0>a)a=0;if(!m||m>f)m=f;b.drawArrays(b[(p||"points").toUpperCase()],a/g,(m-a)/g);return!0},allocate:function(a){q=-1;z=new Float32Array(4*
a)},push:function(a,b,d,f){z&&(z[++q]=a,z[++q]=b,z[++q]=d,z[++q]=f)}}}});n(b,"Extensions/Boost/WGLRenderer.js",[b["Core/Globals.js"],b["Extensions/Boost/WGLShader.js"],b["Extensions/Boost/WGLVBuffer.js"],b["Core/Color.js"],b["Core/Utilities.js"]],function(b,l,E,m,d){var v=m.parse,g=d.isNumber,z=d.isObject,q=d.merge,r=d.objectEach,a=d.pick,w=b.win.document;return function(d){function p(c){if(c.isSeriesBoosting){var a=!!c.options.stacking;var e=c.xData||c.options.xData||c.processedXData;a=(a?c.data:
e||c.options.data).length;"treemap"===c.type?a*=12:"heatmap"===c.type?a*=6:ma[c.type]&&(a*=2);return a}return 0}function B(){e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function O(c,a){function e(c){c&&(a.colorData.push(c[0]),a.colorData.push(c[1]),a.colorData.push(c[2]),a.colorData.push(c[3]))}function b(c,a,b,k,d){e(d);y.usePreallocated?H.push(c,a,b?1:0,k||1):(N.push(c),N.push(a),N.push(b?1:0),N.push(k||1))}function k(){a.segments.length&&(a.segments[a.segments.length-1].to=N.length)}function d(){a.segments.length&&
a.segments[a.segments.length-1].from===N.length||(k(),a.segments.push({from:N.length}))}function t(c,a,k,d,t){e(t);b(c+k,a);e(t);b(c,a);e(t);b(c,a+d);e(t);b(c,a+d);e(t);b(c+k,a+d);e(t);b(c+k,a)}function p(c,e){y.useGPUTranslations||(a.skipTranslation=!0,c.x=w.toPixels(c.x,!0),c.y=n.toPixels(c.y,!0));e?N=[c.x,c.y,0,2].concat(N):b(c.x,c.y,0,2)}var Z=c.pointArrayMap&&"low,high"===c.pointArrayMap.join(","),P=c.chart,f=c.options,G=!!f.stacking,I=f.data,g=c.xAxis.getExtremes(),h=g.min;g=g.max;var B=c.yAxis.getExtremes(),
q=B.min;B=B.max;var l=c.xData||f.xData||c.processedXData,O=c.yData||f.yData||c.processedYData,r=c.zData||f.zData||c.processedZData,n=c.yAxis,w=c.xAxis,E=c.chart.plotWidth,J=!l||0===l.length,L=f.connectNulls,u=c.points||!1,F=!1,K=!1,Q;l=G?c.data:l||I;var X={x:Number.MAX_VALUE,y:0},M={x:-Number.MAX_VALUE,y:0},T=0,W=!1,D=-1,S=!1,U=!1,ka="undefined"===typeof P.index,fa=!1,ha=!1;var x=!1;var za=ma[c.type],ia=!1,sa=!0,ta=!0,Y=f.zones||!1,V=!1,ua=f.threshold,ja=!1;if(!(f.boostData&&0<f.boostData.length)){f.gapSize&&
(ja="value"!==f.gapUnit?f.gapSize*c.closestPointRange:f.gapSize);Y&&(Y.some(function(c){return"undefined"===typeof c.value?(V=new m(c.color),!0):!1}),V||(V=c.pointAttribs&&c.pointAttribs().fill||c.color,V=new m(V)));P.inverted&&(E=c.chart.plotHeight);c.closestPointRangePx=Number.MAX_VALUE;d();if(u&&0<u.length)a.skipTranslation=!0,a.drawMode="triangles",u[0].node&&u[0].node.levelDynamic&&u.sort(function(c,a){if(c.node){if(c.node.levelDynamic>a.node.levelDynamic)return 1;if(c.node.levelDynamic<a.node.levelDynamic)return-1}return 0}),
u.forEach(function(a){var e=a.plotY;if("undefined"!==typeof e&&!isNaN(e)&&null!==a.y){e=a.shapeArgs;var b=P.styledMode?a.series.colorAttribs(a):b=a.series.pointAttribs(a);a=b["stroke-width"]||0;x=v(b.fill).rgba;x[0]/=255;x[1]/=255;x[2]/=255;"treemap"===c.type&&(a=a||1,Q=v(b.stroke).rgba,Q[0]/=255,Q[1]/=255,Q[2]/=255,t(e.x,e.y,e.width,e.height,Q),a/=2);"heatmap"===c.type&&P.inverted&&(e.x=w.len-e.x,e.y=n.len-e.y,e.width=-e.width,e.height=-e.height);t(e.x+a,e.y+a,e.width-2*a,e.height-2*a,x)}});else{for(;D<
l.length-1;){var C=l[++D];if(ka)break;u=I&&I[D];!J&&z(u,!0)&&u.color&&(x=v(u.color).rgba,x[0]/=255,x[1]/=255,x[2]/=255);if(J){u=C[0];var A=C[1];l[D+1]&&(U=l[D+1][0]);l[D-1]&&(S=l[D-1][0]);if(3<=C.length){var va=C[2];C[2]>a.zMax&&(a.zMax=C[2]);C[2]<a.zMin&&(a.zMin=C[2])}}else u=C,A=O[D],l[D+1]&&(U=l[D+1]),l[D-1]&&(S=l[D-1]),r&&r.length&&(va=r[D],r[D]>a.zMax&&(a.zMax=r[D]),r[D]<a.zMin&&(a.zMin=r[D]));if(L||null!==u&&null!==A){U&&U>=h&&U<=g&&(fa=!0);S&&S>=h&&S<=g&&(ha=!0);if(Z){J&&(A=C.slice(1,3));var ba=
A[0];A=A[1]}else G&&(u=C.x,A=C.stackY,ba=A-C.y);null!==q&&"undefined"!==typeof q&&null!==B&&"undefined"!==typeof B&&(sa=A>=q&&A<=B);u>g&&M.x<g&&(M.x=u,M.y=A);u<h&&X.x>h&&(X.x=u,X.y=A);if(null!==A||!L)if(null!==A&&(sa||fa||ha)){if((U>=h||u>=h)&&(S<=g||u<=g)&&(ia=!0),ia||fa||ha){ja&&u-S>ja&&d();Y&&(x=V.rgba,Y.some(function(c,a){a=Y[a-1];if("undefined"!==typeof c.value&&A<=c.value){if(!a||A>=a.value)x=v(c.color).rgba;return!0}return!1}),x[0]/=255,x[1]/=255,x[2]/=255);if(!y.useGPUTranslations&&(a.skipTranslation=
!0,u=w.toPixels(u,!0),A=n.toPixels(A,!0),u>E&&"points"===a.drawMode))continue;if(za){C=ba;if(!1===ba||"undefined"===typeof ba)C=0>A?A:0;Z||G||(C=Math.max(null===ua?q:ua,q));y.useGPUTranslations||(C=n.toPixels(C,!0));b(u,C,0,0,x)}a.hasMarkers&&ia&&!1!==F&&(c.closestPointRangePx=Math.min(c.closestPointRangePx,Math.abs(u-F)));!y.useGPUTranslations&&!y.usePreallocated&&F&&1>Math.abs(u-F)&&K&&1>Math.abs(A-K)?y.debug.showSkipSummary&&++T:(f.step&&!ta&&b(u,K,0,2,x),b(u,A,0,"bubble"===c.type?va||1:2,x),F=
u,K=A,W=!0,ta=!1)}}else d()}else d()}y.debug.showSkipSummary&&console.log("skipped points:",T);W||!1===L||"line_strip"!==c.drawMode||(X.x<Number.MAX_VALUE&&p(X,!0),M.x>-Number.MAX_VALUE&&p(M))}k()}}function h(){F=[];W.data=N=[];L=[];H&&H.destroy()}function J(a){c&&(c.setUniform("xAxisTrans",a.transA),c.setUniform("xAxisMin",a.min),c.setUniform("xAxisMinPad",a.minPixelPadding),c.setUniform("xAxisPointRange",a.pointRange),c.setUniform("xAxisLen",a.len),c.setUniform("xAxisPos",a.pos),c.setUniform("xAxisCVSCoord",
!a.horiz),c.setUniform("xAxisIsLog",!!a.logarithmic),c.setUniform("xAxisReversed",!!a.reversed))}function G(a){c&&(c.setUniform("yAxisTrans",a.transA),c.setUniform("yAxisMin",a.min),c.setUniform("yAxisMinPad",a.minPixelPadding),c.setUniform("yAxisPointRange",a.pointRange),c.setUniform("yAxisLen",a.len),c.setUniform("yAxisPos",a.pos),c.setUniform("yAxisCVSCoord",!a.horiz),c.setUniform("yAxisIsLog",!!a.logarithmic),c.setUniform("yAxisReversed",!!a.reversed))}function t(a,e){c.setUniform("hasThreshold",
a);c.setUniform("translatedThreshold",e)}function k(k){if(k)n=k.chartWidth||800,K=k.chartHeight||400;else return!1;if(!(e&&n&&K&&c))return!1;y.debug.timeRendering&&console.time("gl rendering");e.canvas.width=n;e.canvas.height=K;c.bind();e.viewport(0,0,n,K);c.setPMatrix([2/n,0,0,0,0,-(2/K),0,0,0,0,-2,0,-1,1,-1,1]);1<y.lineWidth&&!b.isMS&&e.lineWidth(y.lineWidth);H.build(W.data,"aVertexPosition",4);H.bind();c.setInverted(k.inverted);F.forEach(function(b,d){var f=b.series.options,p=f.marker;var h="undefined"!==
typeof f.lineWidth?f.lineWidth:1;var I=f.threshold,l=g(I),B=b.series.yAxis.getThreshold(I);I=a(f.marker?f.marker.enabled:null,b.series.xAxis.isRadial?!0:null,b.series.closestPointRangePx>2*((f.marker?f.marker.radius:10)||10));p=M[p&&p.symbol||b.series.symbol]||M.circle;if(!(0===b.segments.length||b.segmentslength&&b.segments[0].from===b.segments[0].to)){p.isReady&&(e.bindTexture(e.TEXTURE_2D,p.handle),c.setTexture(p.handle));k.styledMode?p=b.series.markerGroup&&b.series.markerGroup.getStyle("fill"):
(p=b.series.pointAttribs&&b.series.pointAttribs().fill||b.series.color,f.colorByPoint&&(p=b.series.chart.options.colors[d]));b.series.fillOpacity&&f.fillOpacity&&(p=(new m(p)).setOpacity(a(f.fillOpacity,1)).get());p=v(p).rgba;y.useAlpha||(p[3]=1);"lines"===b.drawMode&&y.useAlpha&&1>p[3]&&(p[3]/=10);"add"===f.boostBlending?(e.blendFunc(e.SRC_ALPHA,e.ONE),e.blendEquation(e.FUNC_ADD)):"mult"===f.boostBlending||"multiply"===f.boostBlending?e.blendFunc(e.DST_COLOR,e.ZERO):"darken"===f.boostBlending?(e.blendFunc(e.ONE,
e.ONE),e.blendEquation(e.FUNC_MIN)):e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);c.reset();0<b.colorData.length&&(c.setUniform("hasColor",1),d=E(e,c),d.build(b.colorData,"aColor",4),d.bind());c.setColor(p);J(b.series.xAxis);G(b.series.yAxis);t(l,B);"points"===b.drawMode&&(f.marker&&g(f.marker.radius)?c.setPointSize(2*f.marker.radius):c.setPointSize(1));c.setSkipTranslation(b.skipTranslation);"bubble"===b.series.type&&c.setBubbleUniforms(b.series,b.zMin,b.zMax);
c.setDrawAsCircle(ka[b.series.type]||!1);if(0<h||"line_strip"!==b.drawMode)for(h=0;h<b.segments.length;h++)H.render(b.segments[h].from,b.segments[h].to,b.drawMode);if(b.hasMarkers&&I)for(f.marker&&g(f.marker.radius)?c.setPointSize(2*f.marker.radius):c.setPointSize(10),c.setDrawAsCircle(!0),h=0;h<b.segments.length;h++)H.render(b.segments[h].from,b.segments[h].to,"POINTS")}});y.debug.timeRendering&&console.timeEnd("gl rendering");d&&d();h()}function I(a){B();if(a.renderer.forExport)return k(a);T?k(a):
setTimeout(function(){I(a)},1)}var c=!1,H=!1,e=!1,n=0,K=0,N=!1,L=!1,W={},T=!1,F=[],M={},ma={column:!0,columnrange:!0,bar:!0,area:!0,arearange:!0},ka={scatter:!0,bubble:!0},y={pointSize:1,lineWidth:1,fillColor:"#AA00AA",useAlpha:!0,usePreallocated:!1,useGPUTranslations:!1,debug:{timeRendering:!1,timeSeriesProcessing:!1,timeSetup:!1,timeBufferCopy:!1,timeKDTree:!1,showSkipSummary:!1}};return W={allocateBufferForSingleSeries:function(a){var c=0;y.usePreallocated&&(a.isSeriesBoosting&&(c=p(a)),H.allocate(c))},
pushSeries:function(a){0<F.length&&F[F.length-1].hasMarkers&&(F[F.length-1].markerTo=L.length);y.debug.timeSeriesProcessing&&console.time("building "+a.type+" series");F.push({segments:[],markerFrom:L.length,colorData:[],series:a,zMin:Number.MAX_VALUE,zMax:-Number.MAX_VALUE,hasMarkers:a.options.marker?!1!==a.options.marker.enabled:!1,showMarkers:!0,drawMode:{area:"lines",arearange:"lines",areaspline:"line_strip",column:"lines",columnrange:"lines",bar:"lines",line:"line_strip",scatter:"points",heatmap:"triangles",
treemap:"triangles",bubble:"points"}[a.type]||"line_strip"});O(a,F[F.length-1]);y.debug.timeSeriesProcessing&&console.timeEnd("building "+a.type+" series")},setSize:function(a,b){n===a&&K===b||!c||(n=a,K=b,c.bind(),c.setPMatrix([2/n,0,0,0,0,-(2/K),0,0,0,0,-2,0,-1,1,-1,1]))},inited:function(){return T},setThreshold:t,init:function(a,b){function k(a,c){var b={isReady:!1,texture:w.createElement("canvas"),handle:e.createTexture()},k=b.texture.getContext("2d");M[a]=b;b.texture.width=512;b.texture.height=
512;k.mozImageSmoothingEnabled=!1;k.webkitImageSmoothingEnabled=!1;k.msImageSmoothingEnabled=!1;k.imageSmoothingEnabled=!1;k.strokeStyle="rgba(255, 255, 255, 0)";k.fillStyle="#FFF";c(k);try{e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,b.handle),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,b.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),
e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),b.isReady=!0}catch(R){}}var d=0,f=["webgl","experimental-webgl","moz-webgl","webkit-3d"];T=!1;if(!a)return!1;for(y.debug.timeSetup&&console.time("gl setup");d<f.length&&!(e=a.getContext(f[d],{}));d++);if(e)b||h();else return!1;e.enable(e.BLEND);e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA);e.disable(e.DEPTH_TEST);e.depthFunc(e.LESS);c=l(e);if(!c)return!1;H=E(e,c);k("circle",function(a){a.beginPath();a.arc(256,
256,256,0,2*Math.PI);a.stroke();a.fill()});k("square",function(a){a.fillRect(0,0,512,512)});k("diamond",function(a){a.beginPath();a.moveTo(256,0);a.lineTo(512,256);a.lineTo(256,512);a.lineTo(0,256);a.lineTo(256,0);a.fill()});k("triangle",function(a){a.beginPath();a.moveTo(0,512);a.lineTo(256,0);a.lineTo(512,512);a.lineTo(0,512);a.fill()});k("triangle-down",function(a){a.beginPath();a.moveTo(0,0);a.lineTo(256,512);a.lineTo(512,0);a.lineTo(0,0);a.fill()});T=!0;y.debug.timeSetup&&console.timeEnd("gl setup");
return!0},render:I,settings:y,valid:function(){return!1!==e},clear:B,flush:h,setXAxis:J,setYAxis:G,data:N,gl:function(){return e},allocateBuffer:function(a){var c=0;y.usePreallocated&&(a.series.forEach(function(a){a.isSeriesBoosting&&(c+=p(a))}),H.allocate(c))},destroy:function(){h();H.destroy();c.destroy();e&&(r(M,function(a){a.handle&&e.deleteTexture(a.handle)}),e.canvas.width=1,e.canvas.height=1)},setOptions:function(a){q(!0,y,a)}}}});n(b,"Extensions/Boost/BoostAttach.js",[b["Extensions/Boost/WGLRenderer.js"],
b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,l,n){var m=l.doc,d=n.error,v=m.createElement("canvas");return function(g,n){var q=g.chartWidth,r=g.chartHeight,a=g,w=g.seriesGroup||n.group,p=m.implementation.hasFeature("www.http://w3.org/TR/SVG11/feature#Extensibility","1.1");a=g.isChartSeriesBoosting()?g:n;p=!1;a.renderTarget||(a.canvas=v,g.renderer.forExport||!p?(a.renderTarget=g.renderer.image("",0,0,q,r).addClass("highcharts-boost-canvas").add(w),a.boostClear=function(){a.renderTarget.attr({href:""})},
a.boostCopy=function(){a.boostResizeTarget();a.renderTarget.attr({href:a.canvas.toDataURL("image/png")})}):(a.renderTargetFo=g.renderer.createElement("foreignObject").add(w),a.renderTarget=m.createElement("canvas"),a.renderTargetCtx=a.renderTarget.getContext("2d"),a.renderTargetFo.element.appendChild(a.renderTarget),a.boostClear=function(){a.renderTarget.width=a.canvas.width;a.renderTarget.height=a.canvas.height},a.boostCopy=function(){a.renderTarget.width=a.canvas.width;a.renderTarget.height=a.canvas.height;
a.renderTargetCtx.drawImage(a.canvas,0,0)}),a.boostResizeTarget=function(){q=g.chartWidth;r=g.chartHeight;(a.renderTargetFo||a.renderTarget).attr({x:0,y:0,width:q,height:r}).css({pointerEvents:"none",mixedBlendMode:"normal",opacity:1});a instanceof l.Chart&&a.markerGroup.translate(g.plotLeft,g.plotTop)},a.boostClipRect=g.renderer.clipRect(),(a.renderTargetFo||a.renderTarget).clip(a.boostClipRect),a instanceof l.Chart&&(a.markerGroup=a.renderer.g().add(w),a.markerGroup.translate(n.xAxis.pos,n.yAxis.pos)));
a.canvas.width=q;a.canvas.height=r;a.boostClipRect.attr(g.getBoostClipRect(a));a.boostResizeTarget();a.boostClear();a.ogl||(a.ogl=b(function(){a.ogl.settings.debug.timeBufferCopy&&console.time("buffer copy");a.boostCopy();a.ogl.settings.debug.timeBufferCopy&&console.timeEnd("buffer copy")}),a.ogl.init(a.canvas)||d("[highcharts boost] - unable to init WebGL renderer"),a.ogl.setOptions(g.options.boost||{}),a instanceof l.Chart&&a.ogl.allocateBuffer(g));a.ogl.setSize(q,r);return a.ogl}});n(b,"Extensions/Boost/BoostUtils.js",
[b["Core/Globals.js"],b["Extensions/Boost/BoostableMap.js"],b["Extensions/Boost/BoostAttach.js"],b["Core/Utilities.js"]],function(b,l,n,m){function d(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];var d=-Number.MAX_VALUE;a.forEach(function(a){if("undefined"!==typeof a&&null!==a&&"undefined"!==typeof a.length&&0<a.length)return d=a.length,!0});return d}function v(a,b,d){a&&b.renderTarget&&b.canvas&&!(d||b.chart).isChartSeriesBoosting()&&a.render(d||b.chart)}function g(a,b){a&&b.renderTarget&&
b.canvas&&!b.chart.isChartSeriesBoosting()&&a.allocateBufferForSingleSeries(b)}function z(a,b,d,g,h,l){h=h||0;g=g||3E3;for(var f=h+g,t=!0;t&&h<f&&h<a.length;)t=b(a[h],h),++h;t&&(h<a.length?l?z(a,b,d,g,h,l):r.requestAnimationFrame?r.requestAnimationFrame(function(){z(a,b,d,g,h)}):setTimeout(function(){z(a,b,d,g,h)}):d&&d())}function q(){var b=0,d,g=["webgl","experimental-webgl","moz-webgl","webkit-3d"],l=!1;if("undefined"!==typeof r.WebGLRenderingContext)for(d=a.createElement("canvas");b<g.length;b++)try{if(l=
d.getContext(g[b]),"undefined"!==typeof l&&null!==l)return!0}catch(h){}return!1}var r=b.win,a=b.doc,w=m.pick;m={patientMax:d,boostEnabled:function(a){return w(a&&a.options&&a.options.boost&&a.options.boost.enabled,!0)},shouldForceChartSeriesBoosting:function(a){var b=0,g=0,p=w(a.options.boost&&a.options.boost.allowForce,!0);if("undefined"!==typeof a.boostForceChartBoost)return a.boostForceChartBoost;if(1<a.series.length)for(var h=0;h<a.series.length;h++){var m=a.series[h];0!==m.options.boostThreshold&&
!1!==m.visible&&"heatmap"!==m.type&&(l[m.type]&&++g,d(m.processedXData,m.options.data,m.points)>=(m.options.boostThreshold||Number.MAX_VALUE)&&++b)}a.boostForceChartBoost=p&&(g===a.series.length&&0<b||5<b);return a.boostForceChartBoost},renderIfNotSeriesBoosting:v,allocateIfNotSeriesBoosting:g,eachAsync:z,hasWebGLSupport:q,pointDrawHandler:function(a){var b=!0;this.chart.options&&this.chart.options.boost&&(b="undefined"===typeof this.chart.options.boost.enabled?!0:this.chart.options.boost.enabled);
if(!b||!this.isSeriesBoosting)return a.call(this);this.chart.isBoosting=!0;if(a=n(this.chart,this))g(a,this),a.pushSeries(this);v(a,this)}};b.hasWebGLSupport=q;return m});n(b,"Extensions/Boost/BoostInit.js",[b["Core/Chart/Chart.js"],b["Core/Globals.js"],b["Core/Utilities.js"],b["Extensions/Boost/BoostUtils.js"],b["Extensions/Boost/BoostAttach.js"]],function(b,l,n,m,d){var v=n.addEvent,g=n.extend,z=n.fireEvent,q=n.wrap,r=l.Series,a=l.seriesTypes,w=function(){},p=m.eachAsync,f=m.pointDrawHandler,B=
m.allocateIfNotSeriesBoosting,E=m.renderIfNotSeriesBoosting,h=m.shouldForceChartSeriesBoosting,J;return function(){g(r.prototype,{renderCanvas:function(){function a(a,c){var b=!1,d="undefined"===typeof g.index,k=!0;if(!d){if(pa){var t=a[0];var f=a[1]}else t=a,f=m[c];la?(pa&&(f=a.slice(1,3)),b=f[0],f=f[1]):na&&(t=a.x,f=a.stackY,b=f-a.y);wa||(k=f>=v&&f<=M);if(null!==f&&t>=q&&t<=r&&k)if(a=e.toPixels(t,!0),y){if("undefined"===typeof R||a===O){la||(b=f);if("undefined"===typeof aa||f>da)da=f,aa=c;if("undefined"===
typeof R||b<ca)ca=b,R=c}a!==O&&("undefined"!==typeof R&&(f=h.toPixels(da,!0),P=h.toPixels(ca,!0),ea(a,f,aa),P!==f&&ea(a,P,R)),R=aa=void 0,O=a)}else f=Math.ceil(h.toPixels(f,!0)),ea(a,f,c)}return!d}function b(){z(k,"renderedCanvas");delete k.buildKDTree;k.buildKDTree();ra.debug.timeKDTree&&console.timeEnd("kd tree building")}var k=this,f=k.options||{},c=!1,g=k.chart,e=this.xAxis,h=this.yAxis,l=f.xData||k.processedXData,m=f.yData||k.processedYData,n=f.data;c=e.getExtremes();var q=c.min,r=c.max;c=h.getExtremes();
var v=c.min,M=c.max,L={},O,y=!!k.sampling,Z=!1!==f.enableMouseTracking,P=h.getThreshold(f.threshold),la=k.pointArrayMap&&"low,high"===k.pointArrayMap.join(","),na=!!f.stacking,oa=k.cropStart||0,wa=k.requireSorting,pa=!l,ca,da,R,aa,xa="x"===f.findNearestPointBy,qa=this.xData||this.options.xData||this.processedXData||!1,ea=function(a,c,b){a=Math.ceil(a);J=xa?a:a+","+c;Z&&!L[J]&&(L[J]=!0,g.inverted&&(a=e.len-a,c=h.len-c),ya.push({x:qa?qa[oa+b]:!1,clientX:a,plotX:a,plotY:c,i:oa+b}))};c=d(g,k);g.isBoosting=
!0;var ra=c.settings;if(this.visible){(this.points||this.graph)&&this.destroyGraphics();g.isChartSeriesBoosting()?(this.markerGroup&&this.markerGroup!==g.markerGroup&&this.markerGroup.destroy(),this.markerGroup=g.markerGroup,this.renderTarget&&(this.renderTarget=this.renderTarget.destroy())):(this.markerGroup===g.markerGroup&&(this.markerGroup=void 0),this.markerGroup=k.plotGroup("markerGroup","markers",!0,1,g.seriesGroup));var ya=this.points=[];k.buildKDTree=w;c&&(B(c,this),c.pushSeries(k),E(c,this,
g));g.renderer.forExport||(ra.debug.timeKDTree&&console.time("kd tree building"),p(na?k.data:l||n,a,b))}}});["heatmap","treemap"].forEach(function(b){a[b]&&q(a[b].prototype,"drawPoints",f)});a.bubble&&(delete a.bubble.prototype.buildKDTree,q(a.bubble.prototype,"markerAttribs",function(a){return this.isSeriesBoosting?!1:a.apply(this,[].slice.call(arguments,1))}));a.scatter.prototype.fill=!0;g(a.area.prototype,{fill:!0,fillOpacity:!0,sampling:!0});g(a.column.prototype,{fill:!0,sampling:!0});b.prototype.callbacks.push(function(a){v(a,
"predraw",function(){a.boostForceChartBoost=void 0;a.boostForceChartBoost=h(a);a.isBoosting=!1;!a.isChartSeriesBoosting()&&a.didBoost&&(a.didBoost=!1);a.boostClear&&a.boostClear();a.canvas&&a.ogl&&a.isChartSeriesBoosting()&&(a.didBoost=!0,a.ogl.allocateBuffer(a));a.markerGroup&&a.xAxis&&0<a.xAxis.length&&a.yAxis&&0<a.yAxis.length&&a.markerGroup.translate(a.xAxis[0].pos,a.yAxis[0].pos)});v(a,"render",function(){a.ogl&&a.isChartSeriesBoosting()&&a.ogl.render(a)})})}});n(b,"Extensions/Boost/BoostOverrides.js",
[b["Core/Chart/Chart.js"],b["Core/Globals.js"],b["Core/Series/Point.js"],b["Core/Utilities.js"],b["Extensions/Boost/BoostUtils.js"],b["Extensions/Boost/Boostables.js"],b["Extensions/Boost/BoostableMap.js"]],function(b,l,n,m,d,L,g){var v=m.addEvent,q=m.error,r=m.getOptions,a=m.isArray,w=m.isNumber,p=m.pick,f=m.wrap,B=d.boostEnabled,E=d.shouldForceChartSeriesBoosting,h=l.Series,J=l.seriesTypes,G=r().plotOptions;b.prototype.isChartSeriesBoosting=function(){return p(this.options.boost&&this.options.boost.seriesThreshold,
50)<=this.series.length||E(this)};b.prototype.getBoostClipRect=function(a){var b={x:this.plotLeft,y:this.plotTop,width:this.plotWidth,height:this.plotHeight};a===this&&this.yAxis.forEach(function(a){b.y=Math.min(a.pos,b.y);b.height=Math.max(a.pos-this.plotTop+a.len,b.height)},this);return b};h.prototype.getPoint=function(a){var b=a,d=this.xData||this.options.xData||this.processedXData||!1;!a||a instanceof this.pointClass||(b=(new this.pointClass).init(this,this.options.data[a.i],d?d[a.i]:void 0),
b.category=p(this.xAxis.categories?this.xAxis.categories[b.x]:b.x,b.x),b.dist=a.dist,b.distX=a.distX,b.plotX=a.plotX,b.plotY=a.plotY,b.index=a.i,b.isInside=this.isPointInside(a));return b};f(h.prototype,"searchPoint",function(a){return this.getPoint(a.apply(this,[].slice.call(arguments,1)))});f(n.prototype,"haloPath",function(a){var b=this.series,d=this.plotX,c=this.plotY,f=b.chart.inverted;b.isSeriesBoosting&&f&&(this.plotX=b.yAxis.len-c,this.plotY=b.xAxis.len-d);var e=a.apply(this,Array.prototype.slice.call(arguments,
1));b.isSeriesBoosting&&f&&(this.plotX=d,this.plotY=c);return e});f(h.prototype,"markerAttribs",function(a,b){var d=b.plotX,c=b.plotY,f=this.chart.inverted;this.isSeriesBoosting&&f&&(b.plotX=this.yAxis.len-c,b.plotY=this.xAxis.len-d);var e=a.apply(this,Array.prototype.slice.call(arguments,1));this.isSeriesBoosting&&f&&(b.plotX=d,b.plotY=c);return e});v(h,"destroy",function(){var a=this,b=a.chart;b.markerGroup===a.markerGroup&&(a.markerGroup=null);b.hoverPoints&&(b.hoverPoints=b.hoverPoints.filter(function(b){return b.series===
a}));b.hoverPoint&&b.hoverPoint.series===a&&(b.hoverPoint=null)});f(h.prototype,"getExtremes",function(a){return this.isSeriesBoosting&&this.hasExtremes&&this.hasExtremes()?{}:a.apply(this,Array.prototype.slice.call(arguments,1))});["translate","generatePoints","drawTracker","drawPoints","render"].forEach(function(a){function b(b){var c=this.options.stacking&&("translate"===a||"generatePoints"===a);if(!this.isSeriesBoosting||c||!B(this.chart)||"heatmap"===this.type||"treemap"===this.type||!g[this.type]||
0===this.options.boostThreshold)b.call(this);else if(this[a+"Canvas"])this[a+"Canvas"]()}f(h.prototype,a,b);"translate"===a&&"column bar arearange columnrange heatmap treemap".split(" ").forEach(function(d){J[d]&&f(J[d].prototype,a,b)})});f(h.prototype,"processData",function(b){function d(a){return f.chart.isChartSeriesBoosting()||(a?a.length:0)>=(f.options.boostThreshold||Number.MAX_VALUE)}var f=this,c=this.options.data;B(this.chart)&&g[this.type]?(d(c)&&"heatmap"!==this.type&&"treemap"!==this.type&&
!this.options.stacking&&this.hasExtremes&&this.hasExtremes(!0)||(b.apply(this,Array.prototype.slice.call(arguments,1)),c=this.processedXData),(this.isSeriesBoosting=d(c))?(c=this.getFirstValidPoint(this.options.data),w(c)||a(c)||q(12,!1,this.chart),this.enterBoost()):this.exitBoost&&this.exitBoost()):b.apply(this,Array.prototype.slice.call(arguments,1))});v(h,"hide",function(){this.canvas&&this.renderTarget&&(this.ogl&&this.ogl.clear(),this.boostClear())});h.prototype.enterBoost=function(){this.alteredByBoost=
[];["allowDG","directTouch","stickyTracking"].forEach(function(a){this.alteredByBoost.push({prop:a,val:this[a],own:Object.hasOwnProperty.call(this,a)})},this);this.directTouch=this.allowDG=!1;this.finishedAnimating=this.stickyTracking=!0;this.labelBySeries&&(this.labelBySeries=this.labelBySeries.destroy())};h.prototype.exitBoost=function(){(this.alteredByBoost||[]).forEach(function(a){a.own?this[a.prop]=a.val:delete this[a.prop]},this);this.boostClear&&this.boostClear()};h.prototype.hasExtremes=function(a){var b=
this.options,d=this.xAxis&&this.xAxis.options,c=this.yAxis&&this.yAxis.options,f=this.colorAxis&&this.colorAxis.options;return b.data.length>(b.boostThreshold||Number.MAX_VALUE)&&w(c.min)&&w(c.max)&&(!a||w(d.min)&&w(d.max))&&(!f||w(f.min)&&w(f.max))};h.prototype.destroyGraphics=function(){var a=this,b=this.points,d,c;if(b)for(c=0;c<b.length;c+=1)(d=b[c])&&d.destroyElements&&d.destroyElements();["graph","area","tracker"].forEach(function(b){a[b]&&(a[b]=a[b].destroy())})};L.forEach(function(a){G[a]&&
(G[a].boostThreshold=5E3,G[a].boostData=[],J[a].prototype.fillOpacity=!0)})});n(b,"Extensions/Boost/NamedColors.js",[b["Core/Color.js"]],function(b){var l={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",
crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",feldspar:"#d19275",firebrick:"#b22222",
floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",
lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslateblue:"#8470ff",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",
mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",
sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",violetred:"#d02090",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return b.names=l});n(b,"Extensions/Boost/Boost.js",[b["Core/Globals.js"],b["Extensions/Boost/BoostUtils.js"],
b["Extensions/Boost/BoostInit.js"],b["Core/Utilities.js"]],function(b,l,n,m){m=m.error;l=l.hasWebGLSupport;l()?n():"undefined"!==typeof b.initCanvasBoost?b.initCanvasBoost():m(26)});n(b,"masters/modules/boost.src.js",[],function(){})});
//# sourceMappingURL=boost.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
(c) 2009-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/broken-axis",["highcharts"],function(h){c(h);c.Highcharts=h;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function h(c,v,m,h){c.hasOwnProperty(v)||(c[v]=h.apply(null,m))}c=c?c._modules:{};h(c,"Core/Axis/BrokenAxis.js",[c["Core/Axis/Axis.js"],c["Core/Globals.js"],c["Core/Utilities.js"],c["Extensions/Stacking.js"]],
function(c,h,m,A){var q=m.addEvent,v=m.find,x=m.fireEvent,B=m.isArray,y=m.isNumber,r=m.pick,z=h.Series,C=function(){function l(b){this.hasBreaks=!1;this.axis=b}l.isInBreak=function(b,e){var d=b.repeat||Infinity,a=b.from,f=b.to-b.from;e=e>=a?(e-a)%d:d-(a-e)%d;return b.inclusive?e<=f:e<f&&0!==e};l.lin2Val=function(b){var e=this.brokenAxis;e=e&&e.breakArray;if(!e)return b;var d;for(d=0;d<e.length;d++){var a=e[d];if(a.from>=b)break;else a.to<b?b+=a.len:l.isInBreak(a,b)&&(b+=a.len)}return b};l.val2Lin=
function(b){var e=this.brokenAxis;e=e&&e.breakArray;if(!e)return b;var d=b,a;for(a=0;a<e.length;a++){var f=e[a];if(f.to<=b)d-=f.len;else if(f.from>=b)break;else if(l.isInBreak(f,b)){d-=b-f.from;break}}return d};l.prototype.findBreakAt=function(b,e){return v(e,function(d){return d.from<b&&b<d.to})};l.prototype.isInAnyBreak=function(b,e){var d=this.axis,a=d.options.breaks,f=a&&a.length,k;if(f){for(;f--;)if(l.isInBreak(a[f],b)){var t=!0;k||(k=r(a[f].showPoints,!d.isXAxis))}var c=t&&e?t&&!k:t}return c};
l.prototype.setBreaks=function(b,e){var d=this,a=d.axis,f=B(b)&&!!b.length;a.isDirty=d.hasBreaks!==f;d.hasBreaks=f;a.options.breaks=a.userOptions.breaks=b;a.forceRedraw=!0;a.series.forEach(function(a){a.isDirty=!0});f||a.val2lin!==l.val2Lin||(delete a.val2lin,delete a.lin2val);f&&(a.userOptions.ordinal=!1,a.lin2val=l.lin2Val,a.val2lin=l.val2Lin,a.setExtremes=function(a,b,f,g,e){if(d.hasBreaks){for(var k,t=this.options.breaks;k=d.findBreakAt(a,t);)a=k.to;for(;k=d.findBreakAt(b,t);)b=k.from;b<a&&(b=
a)}c.prototype.setExtremes.call(this,a,b,f,g,e)},a.setAxisTranslation=function(b){c.prototype.setAxisTranslation.call(this,b);d.unitLength=null;if(d.hasBreaks){b=a.options.breaks||[];var f=[],e=[],g=0,k,p=a.userMin||a.min,h=a.userMax||a.max,m=r(a.pointRangePadding,0),u;b.forEach(function(a){k=a.repeat||Infinity;l.isInBreak(a,p)&&(p+=a.to%k-p%k);l.isInBreak(a,h)&&(h-=h%k-a.from%k)});b.forEach(function(a){n=a.from;for(k=a.repeat||Infinity;n-k>p;)n-=k;for(;n<p;)n+=k;for(u=n;u<h;u+=k)f.push({value:u,
move:"in"}),f.push({value:u+(a.to-a.from),move:"out",size:a.breakSize})});f.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-b.value});var w=0;var n=p;f.forEach(function(a){w+="in"===a.move?1:-1;1===w&&"in"===a.move&&(n=a.value);0===w&&(e.push({from:n,to:a.value,len:a.value-n-(a.size||0)}),g+=a.value-n-(a.size||0))});a.breakArray=d.breakArray=e;d.unitLength=h-p-g+m;x(a,"afterBreaks");a.staticScale?a.transA=a.staticScale:d.unitLength&&(a.transA*=(h-a.min+
m)/d.unitLength);m&&(a.minPixelPadding=a.transA*a.minPointOffset);a.min=p;a.max=h}});r(e,!0)&&a.chart.redraw()};return l}();h=function(){function c(){}c.compose=function(b,e){b.keepProps.push("brokenAxis");var d=z.prototype;d.drawBreaks=function(a,b){var f=this,e=f.points,d,g,c,h;if(a&&a.brokenAxis&&a.brokenAxis.hasBreaks){var l=a.brokenAxis;b.forEach(function(b){d=l&&l.breakArray||[];g=a.isXAxis?a.min:r(f.options.threshold,a.min);e.forEach(function(f){h=r(f["stack"+b.toUpperCase()],f[b]);d.forEach(function(b){if(y(g)&&
y(h)){c=!1;if(g<b.from&&h>b.to||g>b.from&&h<b.from)c="pointBreak";else if(g<b.from&&h>b.from&&h<b.to||g>b.from&&h>b.to&&h<b.from)c="pointInBreak";c&&x(a,c,{point:f,brk:b})}})})})}};d.gappedPath=function(){var a=this.currentDataGrouping,b=a&&a.gapSize;a=this.options.gapSize;var e=this.points.slice(),d=e.length-1,c=this.yAxis,g;if(a&&0<d)for("value"!==this.options.gapUnit&&(a*=this.basePointRange),b&&b>a&&b>=this.basePointRange&&(a=b),g=void 0;d--;)g&&!1!==g.visible||(g=e[d+1]),b=e[d],!1!==g.visible&&
!1!==b.visible&&(g.x-b.x>a&&(g=(b.x+g.x)/2,e.splice(d+1,0,{isNull:!0,x:g}),c.stacking&&this.options.stacking&&(g=c.stacking.stacks[this.stackKey][g]=new A(c,c.options.stackLabels,!1,g,this.stack),g.total=0)),g=b);return this.getGraphPath(e)};q(b,"init",function(){this.brokenAxis||(this.brokenAxis=new C(this))});q(b,"afterInit",function(){"undefined"!==typeof this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)});q(b,"afterSetTickPositions",function(){var a=this.brokenAxis;if(a&&a.hasBreaks){var b=
this.tickPositions,e=this.tickPositions.info,d=[],c;for(c=0;c<b.length;c++)a.isInAnyBreak(b[c])||d.push(b[c]);this.tickPositions=d;this.tickPositions.info=e}});q(b,"afterSetOptions",function(){this.brokenAxis&&this.brokenAxis.hasBreaks&&(this.options.ordinal=!1)});q(e,"afterGeneratePoints",function(){var a=this.options.connectNulls,b=this.points,c=this.xAxis,d=this.yAxis;if(this.isDirty)for(var e=b.length;e--;){var g=b[e],h=!(null===g.y&&!1===a)&&(c&&c.brokenAxis&&c.brokenAxis.isInAnyBreak(g.x,!0)||
d&&d.brokenAxis&&d.brokenAxis.isInAnyBreak(g.y,!0));g.visible=h?!1:!1!==g.options.visible}});q(e,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,r(this.pointArrayMap,["y"]))})};return c}();h.compose(c,z);return h});h(c,"masters/modules/broken-axis.src.js",[],function(){})});
//# sourceMappingURL=broken-axis.js.map
File diff suppressed because one or more lines are too long
+613
View File
@@ -0,0 +1,613 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* (c) 2009-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/broken-axis', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Core/Axis/BrokenAxis.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js'], _modules['Extensions/Stacking.js']], function (Axis, H, U, StackItem) {
/* *
*
* (c) 2009-2020 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var addEvent = U.addEvent,
find = U.find,
fireEvent = U.fireEvent,
isArray = U.isArray,
isNumber = U.isNumber,
pick = U.pick;
var Series = H.Series;
/* eslint-disable valid-jsdoc */
/**
* Provides support for broken axes.
* @private
* @class
*/
var BrokenAxisAdditions = /** @class */ (function () {
/* *
*
* Constructors
*
* */
function BrokenAxisAdditions(axis) {
this.hasBreaks = false;
this.axis = axis;
}
/* *
*
* Static Functions
*
* */
/**
* @private
*/
BrokenAxisAdditions.isInBreak = function (brk, val) {
var ret,
repeat = brk.repeat || Infinity,
from = brk.from,
length = brk.to - brk.from,
test = (val >= from ?
(val - from) % repeat :
repeat - ((from - val) % repeat));
if (!brk.inclusive) {
ret = test < length && test !== 0;
}
else {
ret = test <= length;
}
return ret;
};
/**
* @private
*/
BrokenAxisAdditions.lin2Val = function (val) {
var axis = this;
var brokenAxis = axis.brokenAxis;
var breakArray = brokenAxis && brokenAxis.breakArray;
if (!breakArray) {
return val;
}
var nval = val,
brk,
i;
for (i = 0; i < breakArray.length; i++) {
brk = breakArray[i];
if (brk.from >= nval) {
break;
}
else if (brk.to < nval) {
nval += brk.len;
}
else if (BrokenAxisAdditions.isInBreak(brk, nval)) {
nval += brk.len;
}
}
return nval;
};
/**
* @private
*/
BrokenAxisAdditions.val2Lin = function (val) {
var axis = this;
var brokenAxis = axis.brokenAxis;
var breakArray = brokenAxis && brokenAxis.breakArray;
if (!breakArray) {
return val;
}
var nval = val,
brk,
i;
for (i = 0; i < breakArray.length; i++) {
brk = breakArray[i];
if (brk.to <= val) {
nval -= brk.len;
}
else if (brk.from >= val) {
break;
}
else if (BrokenAxisAdditions.isInBreak(brk, val)) {
nval -= (val - brk.from);
break;
}
}
return nval;
};
/* *
*
* Functions
*
* */
/**
* Returns the first break found where the x is larger then break.from and
* smaller then break.to.
*
* @param {number} x
* The number which should be within a break.
*
* @param {Array<Highcharts.XAxisBreaksOptions>} breaks
* The array of breaks to search within.
*
* @return {Highcharts.XAxisBreaksOptions|undefined}
* Returns the first break found that matches, returns false if no break is
* found.
*/
BrokenAxisAdditions.prototype.findBreakAt = function (x, breaks) {
return find(breaks, function (b) {
return b.from < x && x < b.to;
});
};
/**
* @private
*/
BrokenAxisAdditions.prototype.isInAnyBreak = function (val, testKeep) {
var brokenAxis = this;
var axis = brokenAxis.axis;
var breaks = axis.options.breaks,
i = breaks && breaks.length,
inbrk,
keep,
ret;
if (i) {
while (i--) {
if (BrokenAxisAdditions.isInBreak(breaks[i], val)) {
inbrk = true;
if (!keep) {
keep = pick(breaks[i].showPoints, !axis.isXAxis);
}
}
}
if (inbrk && testKeep) {
ret = inbrk && !keep;
}
else {
ret = inbrk;
}
}
return ret;
};
/**
* Dynamically set or unset breaks in an axis. This function in lighter than
* usin Axis.update, and it also preserves animation.
*
* @private
* @function Highcharts.Axis#setBreaks
*
* @param {Array<Highcharts.XAxisBreaksOptions>} [breaks]
* The breaks to add. When `undefined` it removes existing breaks.
*
* @param {boolean} [redraw=true]
* Whether to redraw the chart immediately.
*
* @return {void}
*/
BrokenAxisAdditions.prototype.setBreaks = function (breaks, redraw) {
var brokenAxis = this;
var axis = brokenAxis.axis;
var hasBreaks = (isArray(breaks) && !!breaks.length);
axis.isDirty = brokenAxis.hasBreaks !== hasBreaks;
brokenAxis.hasBreaks = hasBreaks;
axis.options.breaks = axis.userOptions.breaks = breaks;
axis.forceRedraw = true; // Force recalculation in setScale
// Recalculate series related to the axis.
axis.series.forEach(function (series) {
series.isDirty = true;
});
if (!hasBreaks && axis.val2lin === BrokenAxisAdditions.val2Lin) {
// Revert to prototype functions
delete axis.val2lin;
delete axis.lin2val;
}
if (hasBreaks) {
axis.userOptions.ordinal = false;
axis.lin2val = BrokenAxisAdditions.lin2Val;
axis.val2lin = BrokenAxisAdditions.val2Lin;
axis.setExtremes = function (newMin, newMax, redraw, animation, eventArguments) {
// If trying to set extremes inside a break, extend min to
// after, and max to before the break ( #3857 )
if (brokenAxis.hasBreaks) {
var axisBreak,
breaks = this.options.breaks;
while ((axisBreak = brokenAxis.findBreakAt(newMin, breaks))) {
newMin = axisBreak.to;
}
while ((axisBreak = brokenAxis.findBreakAt(newMax, breaks))) {
newMax = axisBreak.from;
}
// If both min and max is within the same break.
if (newMax < newMin) {
newMax = newMin;
}
}
Axis.prototype.setExtremes.call(this, newMin, newMax, redraw, animation, eventArguments);
};
axis.setAxisTranslation = function (saveOld) {
Axis.prototype.setAxisTranslation.call(this, saveOld);
brokenAxis.unitLength = null;
if (brokenAxis.hasBreaks) {
var breaks = axis.options.breaks || [],
// Temporary one:
breakArrayT = [],
breakArray = [],
length = 0,
inBrk,
repeat,
min = axis.userMin || axis.min,
max = axis.userMax || axis.max,
pointRangePadding = pick(axis.pointRangePadding, 0),
start,
i;
// Min & max check (#4247)
breaks.forEach(function (brk) {
repeat = brk.repeat || Infinity;
if (BrokenAxisAdditions.isInBreak(brk, min)) {
min +=
(brk.to % repeat) -
(min % repeat);
}
if (BrokenAxisAdditions.isInBreak(brk, max)) {
max -=
(max % repeat) -
(brk.from % repeat);
}
});
// Construct an array holding all breaks in the axis
breaks.forEach(function (brk) {
start = brk.from;
repeat = brk.repeat || Infinity;
while (start - repeat > min) {
start -= repeat;
}
while (start < min) {
start += repeat;
}
for (i = start; i < max; i += repeat) {
breakArrayT.push({
value: i,
move: 'in'
});
breakArrayT.push({
value: i + (brk.to - brk.from),
move: 'out',
size: brk.breakSize
});
}
});
breakArrayT.sort(function (a, b) {
return ((a.value === b.value) ?
((a.move === 'in' ? 0 : 1) -
(b.move === 'in' ? 0 : 1)) :
a.value - b.value);
});
// Simplify the breaks
inBrk = 0;
start = min;
breakArrayT.forEach(function (brk) {
inBrk += (brk.move === 'in' ? 1 : -1);
if (inBrk === 1 && brk.move === 'in') {
start = brk.value;
}
if (inBrk === 0) {
breakArray.push({
from: start,
to: brk.value,
len: brk.value - start - (brk.size || 0)
});
length += brk.value - start - (brk.size || 0);
}
});
/**
* HC <= 8 backwards compatibility, used by demo samples.
* @deprecated
* @private
* @requires modules/broken-axis
*/
axis.breakArray = brokenAxis.breakArray = breakArray;
// Used with staticScale, and below the actual axis length,
// when breaks are substracted.
brokenAxis.unitLength = max - min - length + pointRangePadding;
fireEvent(axis, 'afterBreaks');
if (axis.staticScale) {
axis.transA = axis.staticScale;
}
else if (brokenAxis.unitLength) {
axis.transA *=
(max - axis.min + pointRangePadding) /
brokenAxis.unitLength;
}
if (pointRangePadding) {
axis.minPixelPadding =
axis.transA * axis.minPointOffset;
}
axis.min = min;
axis.max = max;
}
};
}
if (pick(redraw, true)) {
axis.chart.redraw();
}
};
return BrokenAxisAdditions;
}());
/**
* Axis with support of broken data rows.
* @private
* @class
*/
var BrokenAxis = /** @class */ (function () {
function BrokenAxis() {
}
/**
* Adds support for broken axes.
* @private
*/
BrokenAxis.compose = function (AxisClass, SeriesClass) {
AxisClass.keepProps.push('brokenAxis');
var seriesProto = Series.prototype;
/**
* @private
*/
seriesProto.drawBreaks = function (axis, keys) {
var series = this,
points = series.points,
breaks,
threshold,
eventName,
y;
if (axis && // #5950
axis.brokenAxis &&
axis.brokenAxis.hasBreaks) {
var brokenAxis_1 = axis.brokenAxis;
keys.forEach(function (key) {
breaks = brokenAxis_1 && brokenAxis_1.breakArray || [];
threshold = axis.isXAxis ?
axis.min :
pick(series.options.threshold, axis.min);
points.forEach(function (point) {
y = pick(point['stack' + key.toUpperCase()], point[key]);
breaks.forEach(function (brk) {
if (isNumber(threshold) && isNumber(y)) {
eventName = false;
if ((threshold < brk.from && y > brk.to) ||
(threshold > brk.from && y < brk.from)) {
eventName = 'pointBreak';
}
else if ((threshold < brk.from && y > brk.from && y < brk.to) ||
(threshold > brk.from && y > brk.to && y < brk.from)) {
eventName = 'pointInBreak';
}
if (eventName) {
fireEvent(axis, eventName, { point: point, brk: brk });
}
}
});
});
});
}
};
/**
* Extend getGraphPath by identifying gaps in the data so that we can
* draw a gap in the line or area. This was moved from ordinal axis
* module to broken axis module as of #5045.
*
* @private
* @function Highcharts.Series#gappedPath
*
* @return {Highcharts.SVGPathArray}
* Gapped path
*/
seriesProto.gappedPath = function () {
var currentDataGrouping = this.currentDataGrouping,
groupingSize = currentDataGrouping && currentDataGrouping.gapSize,
gapSize = this.options.gapSize,
points = this.points.slice(),
i = points.length - 1,
yAxis = this.yAxis,
stack;
/**
* Defines when to display a gap in the graph, together with the
* [gapUnit](plotOptions.series.gapUnit) option.
*
* In case when `dataGrouping` is enabled, points can be grouped
* into a larger time span. This can make the grouped points to have
* a greater distance than the absolute value of `gapSize` property,
* which will result in disappearing graph completely. To prevent
* this situation the mentioned distance between grouped points is
* used instead of previously defined `gapSize`.
*
* In practice, this option is most often used to visualize gaps in
* time series. In a stock chart, intraday data is available for
* daytime hours, while gaps will appear in nights and weekends.
*
* @see [gapUnit](plotOptions.series.gapUnit)
* @see [xAxis.breaks](#xAxis.breaks)
*
* @sample {highstock} stock/plotoptions/series-gapsize/
* Setting the gap size to 2 introduces gaps for weekends
* in daily datasets.
*
* @type {number}
* @default 0
* @product highstock
* @requires modules/broken-axis
* @apioption plotOptions.series.gapSize
*/
/**
* Together with [gapSize](plotOptions.series.gapSize), this option
* defines where to draw gaps in the graph.
*
* When the `gapUnit` is `"relative"` (default), a gap size of 5
* means that if the distance between two points is greater than
* 5 times that of the two closest points, the graph will be broken.
*
* When the `gapUnit` is `"value"`, the gap is based on absolute
* axis values, which on a datetime axis is milliseconds. This also
* applies to the navigator series that inherits gap options from
* the base series.
*
* @see [gapSize](plotOptions.series.gapSize)
*
* @type {string}
* @default relative
* @since 5.0.13
* @product highstock
* @validvalue ["relative", "value"]
* @requires modules/broken-axis
* @apioption plotOptions.series.gapUnit
*/
if (gapSize && i > 0) { // #5008
// Gap unit is relative
if (this.options.gapUnit !== 'value') {
gapSize *= this.basePointRange;
}
// Setting a new gapSize in case dataGrouping is enabled (#7686)
if (groupingSize &&
groupingSize > gapSize &&
// Except when DG is forced (e.g. from other series)
// and has lower granularity than actual points (#11351)
groupingSize >= this.basePointRange) {
gapSize = groupingSize;
}
// extension for ordinal breaks
var current = void 0,
next = void 0;
while (i--) {
// Reassign next if it is not visible
if (!(next && next.visible !== false)) {
next = points[i + 1];
}
current = points[i];
// Skip iteration if one of the points is not visible
if (next.visible === false || current.visible === false) {
continue;
}
if (next.x - current.x > gapSize) {
var xRange = (current.x + next.x) / 2;
points.splice(// insert after this one
i + 1, 0, {
isNull: true,
x: xRange
});
// For stacked chart generate empty stack items, #6546
if (yAxis.stacking && this.options.stacking) {
stack = yAxis.stacking.stacks[this.stackKey][xRange] =
new StackItem(yAxis, yAxis.options
.stackLabels, false, xRange, this.stack);
stack.total = 0;
}
}
// Assign current to next for the upcoming iteration
next = current;
}
}
// Call base method
return this.getGraphPath(points);
};
/* eslint-disable no-invalid-this */
addEvent(AxisClass, 'init', function () {
var axis = this;
if (!axis.brokenAxis) {
axis.brokenAxis = new BrokenAxisAdditions(axis);
}
});
addEvent(AxisClass, 'afterInit', function () {
if (typeof this.brokenAxis !== 'undefined') {
this.brokenAxis.setBreaks(this.options.breaks, false);
}
});
addEvent(AxisClass, 'afterSetTickPositions', function () {
var axis = this;
var brokenAxis = axis.brokenAxis;
if (brokenAxis &&
brokenAxis.hasBreaks) {
var tickPositions = this.tickPositions,
info = this.tickPositions.info,
newPositions = [],
i;
for (i = 0; i < tickPositions.length; i++) {
if (!brokenAxis.isInAnyBreak(tickPositions[i])) {
newPositions.push(tickPositions[i]);
}
}
this.tickPositions = newPositions;
this.tickPositions.info = info;
}
});
// Force Axis to be not-ordinal when breaks are defined
addEvent(AxisClass, 'afterSetOptions', function () {
if (this.brokenAxis && this.brokenAxis.hasBreaks) {
this.options.ordinal = false;
}
});
addEvent(SeriesClass, 'afterGeneratePoints', function () {
var _a = this,
isDirty = _a.isDirty,
connectNulls = _a.options.connectNulls,
points = _a.points,
xAxis = _a.xAxis,
yAxis = _a.yAxis;
// Set, or reset visibility of the points. Axis.setBreaks marks the
// series as isDirty
if (isDirty) {
var i = points.length;
while (i--) {
var point = points[i];
// Respect nulls inside the break (#4275)
var nullGap = point.y === null && connectNulls === false;
var isPointInBreak = (!nullGap && ((xAxis &&
xAxis.brokenAxis &&
xAxis.brokenAxis.isInAnyBreak(point.x,
true)) || (yAxis &&
yAxis.brokenAxis &&
yAxis.brokenAxis.isInAnyBreak(point.y,
true))));
// Set point.visible if in any break.
// If not in break, reset visible to original value.
point.visible = isPointInBreak ?
false :
point.options.visible !== false;
}
}
});
addEvent(SeriesClass, 'afterRender', function drawPointsWrapped() {
this.drawBreaks(this.xAxis, ['x']);
this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
});
};
return BrokenAxis;
}());
BrokenAxis.compose(Axis, Series); // @todo remove automatism
return BrokenAxis;
});
_registerModule(_modules, 'masters/modules/broken-axis.src.js', [], function () {
});
}));
+15
View File
@@ -0,0 +1,15 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Bullet graph series type for Highcharts
(c) 2010-2019 Kacper Madej
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/bullet",["highcharts"],function(d){a(d);a.Highcharts=d;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function d(a,b,n,d){a.hasOwnProperty(b)||(a[b]=d.apply(null,n))}a=a?a._modules:{};d(a,"Series/BulletSeries.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,b){var d=b.isNumber,r=b.merge,k=b.pick,t=b.relativeLength;
b=b.seriesType;var f=a.seriesTypes.column.prototype;b("bullet","column",{targetOptions:{width:"140%",height:3,borderWidth:0},tooltip:{pointFormat:'<span style="color:{series.color}">\u25cf</span> {series.name}: <b>{point.y}</b>. Target: <b>{point.target}</b><br/>'}},{pointArrayMap:["y","target"],parallelArrays:["x","y","target"],drawPoints:function(){var a=this,l=a.chart,b=a.options,n=b.animationLimit||250;f.drawPoints.apply(this);a.points.forEach(function(c){var p=c.options,e=c.targetGraphic,f=c.target,
m=c.y;if(d(f)&&null!==f){var g=r(b.targetOptions,p.targetOptions);var u=g.height;var h=c.shapeArgs;var q=t(g.width,h.width);var v=a.yAxis.translate(f,!1,!0,!1,!0)-g.height/2-.5;h=a.crispCol.apply({chart:l,borderWidth:g.borderWidth,options:{crisp:b.crisp}},[h.x+h.width/2-q/2,v,q,u]);e?(e[l.pointCount<n?"animate":"attr"](h),d(m)&&null!==m?e.element.point=c:e.element.point=void 0):c.targetGraphic=e=l.renderer.rect().attr(h).add(a.group);l.styledMode||e.attr({fill:k(g.color,p.color,a.zones.length&&(c.getZone.call({series:a,
x:c.x,y:f,options:{}}).color||a.color)||void 0,c.color,a.color),stroke:k(g.borderColor,c.borderColor,a.options.borderColor),"stroke-width":g.borderWidth});d(m)&&null!==m&&(e.element.point=c);e.addClass(c.getClassName()+" highcharts-bullet-target",!0)}else e&&(c.targetGraphic=e.destroy())})},getExtremes:function(a){var b=this.targetData;a=f.getExtremes.call(this,a);b&&b.length&&(b=f.getExtremes.call(this,b),d(b.dataMin)&&(a.dataMin=Math.min(k(a.dataMin,Infinity),b.dataMin)),d(b.dataMax)&&(a.dataMax=
Math.max(k(a.dataMax,-Infinity),b.dataMax)));return a}},{destroy:function(){this.targetGraphic&&(this.targetGraphic=this.targetGraphic.destroy());f.pointClass.prototype.destroy.apply(this,arguments)}});""});d(a,"masters/modules/bullet.src.js",[],function(){})});
//# sourceMappingURL=bullet.js.map
File diff suppressed because one or more lines are too long
+364
View File
@@ -0,0 +1,364 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Bullet graph series type for Highcharts
*
* (c) 2010-2019 Kacper Madej
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/bullet', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Series/BulletSeries.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {
/* *
*
* (c) 2010-2020 Kacper Madej
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var isNumber = U.isNumber,
merge = U.merge,
pick = U.pick,
relativeLength = U.relativeLength,
seriesType = U.seriesType;
var columnProto = H.seriesTypes.column.prototype;
/**
* The bullet series type.
*
* @private
* @class
* @name Highcharts.seriesTypes.bullet
*
* @augments Highcharts.Series
*/
seriesType('bullet', 'column'
/**
* A bullet graph is a variation of a bar graph. The bullet graph features
* a single measure, compares it to a target, and displays it in the context
* of qualitative ranges of performance that could be set using
* [plotBands](#yAxis.plotBands) on [yAxis](#yAxis).
*
* @sample {highcharts} highcharts/demo/bullet-graph/
* Bullet graph
*
* @extends plotOptions.column
* @since 6.0.0
* @product highcharts
* @excluding allAreas, boostThreshold, colorAxis, compare, compareBase,
* dataSorting, boostBlending
* @requires modules/bullet
* @optionparent plotOptions.bullet
*/
, {
/**
* All options related with look and positiong of targets.
*
* @since 6.0.0
*/
targetOptions: {
/**
* The width of the rectangle representing the target. Could be set
* as a pixel value or as a percentage of a column width.
*
* @type {number|string}
* @since 6.0.0
*/
width: '140%',
/**
* The height of the rectangle representing the target.
*
* @since 6.0.0
*/
height: 3,
/**
* The border color of the rectangle representing the target. When
* not set, the point's border color is used.
*
* In styled mode, use class `highcharts-bullet-target` instead.
*
* @type {Highcharts.ColorString}
* @since 6.0.0
* @product highcharts
* @apioption plotOptions.bullet.targetOptions.borderColor
*/
/**
* The color of the rectangle representing the target. When not set,
* point's color (if set in point's options -
* [`color`](#series.bullet.data.color)) or zone of the target value
* (if [`zones`](#plotOptions.bullet.zones) or
* [`negativeColor`](#plotOptions.bullet.negativeColor) are set)
* or the same color as the point has is used.
*
* In styled mode, use class `highcharts-bullet-target` instead.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
* @since 6.0.0
* @product highcharts
* @apioption plotOptions.bullet.targetOptions.color
*/
/**
* The border width of the rectangle representing the target.
*
* In styled mode, use class `highcharts-bullet-target` instead.
*
* @since 6.0.0
*/
borderWidth: 0
},
tooltip: {
pointFormat: '<span style="color:{series.color}">\u25CF</span>' +
' {series.name}: <b>{point.y}</b>. Target: <b>{point.target}' +
'</b><br/>'
}
}, {
pointArrayMap: ['y', 'target'],
parallelArrays: ['x', 'y', 'target'],
/* eslint-disable valid-jsdoc */
/**
* Draws the targets. For inverted chart, the `series.group` is rotated,
* so the same coordinates apply. This method is based on column series
* drawPoints function.
*
* @ignore
* @function Highcharts.Series#drawPoints
*/
drawPoints: function () {
var series = this,
chart = series.chart,
options = series.options,
animationLimit = options.animationLimit || 250;
columnProto.drawPoints.apply(this);
series.points.forEach(function (point) {
var pointOptions = point.options,
shapeArgs,
targetGraphic = point.targetGraphic,
targetShapeArgs,
targetVal = point.target,
pointVal = point.y,
width,
height,
targetOptions,
y;
if (isNumber(targetVal) && targetVal !== null) {
targetOptions = merge(options.targetOptions, pointOptions.targetOptions);
height = targetOptions.height;
shapeArgs = point.shapeArgs;
width = relativeLength(targetOptions.width, shapeArgs.width);
y = series.yAxis.translate(targetVal, false, true, false, true) - targetOptions.height / 2 - 0.5;
targetShapeArgs = series.crispCol.apply({
// Use fake series object to set borderWidth of target
chart: chart,
borderWidth: targetOptions.borderWidth,
options: {
crisp: options.crisp
}
}, [
(shapeArgs.x +
shapeArgs.width / 2 - width / 2),
y,
width,
height
]);
if (targetGraphic) {
// Update
targetGraphic[chart.pointCount < animationLimit ?
'animate' :
'attr'](targetShapeArgs);
// Add or remove tooltip reference
if (isNumber(pointVal) && pointVal !== null) {
targetGraphic.element.point = point;
}
else {
targetGraphic.element.point = void 0;
}
}
else {
point.targetGraphic = targetGraphic = chart.renderer
.rect()
.attr(targetShapeArgs)
.add(series.group);
}
// Presentational
if (!chart.styledMode) {
targetGraphic.attr({
fill: pick(targetOptions.color, pointOptions.color, (series.zones.length && (point.getZone.call({
series: series,
x: point.x,
y: targetVal,
options: {}
}).color || series.color)) || void 0, point.color, series.color),
stroke: pick(targetOptions.borderColor, point.borderColor, series.options.borderColor),
'stroke-width': targetOptions.borderWidth
});
}
// Add tooltip reference
if (isNumber(pointVal) && pointVal !== null) {
targetGraphic.element.point = point;
}
targetGraphic.addClass(point.getClassName() +
' highcharts-bullet-target', true);
}
else if (targetGraphic) {
// #1269:
point.targetGraphic = targetGraphic.destroy();
}
});
},
/**
* Includes target values to extend extremes from y values.
*
* @ignore
* @function Highcharts.Series#getExtremes
*/
getExtremes: function (yData) {
var series = this,
targetData = series.targetData,
yMax,
yMin;
var dataExtremes = columnProto.getExtremes.call(this,
yData);
if (targetData && targetData.length) {
var targetExtremes = columnProto.getExtremes.call(this,
targetData);
if (isNumber(targetExtremes.dataMin)) {
dataExtremes.dataMin = Math.min(pick(dataExtremes.dataMin, Infinity), targetExtremes.dataMin);
}
if (isNumber(targetExtremes.dataMax)) {
dataExtremes.dataMax = Math.max(pick(dataExtremes.dataMax, -Infinity), targetExtremes.dataMax);
}
}
return dataExtremes;
}
/* eslint-enable valid-jsdoc */
},
/** @lends Highcharts.seriesTypes.ohlc.prototype.pointClass.prototype */
{
// eslint-disable-next-line valid-jsdoc
/**
* Destroys target graphic.
*
* @private
* @function
*/
destroy: function () {
if (this.targetGraphic) {
this.targetGraphic = this.targetGraphic.destroy();
}
columnProto.pointClass.prototype.destroy
.apply(this, arguments);
return;
}
});
/**
* A `bullet` series. If the [type](#series.bullet.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.bullet
* @since 6.0.0
* @product highcharts
* @excluding dataParser, dataURL, marker, dataSorting, boostThreshold,
* boostBlending
* @requires modules/bullet
* @apioption series.bullet
*/
/**
* An array of data points for the series. For the `bullet` series type,
* points can be given in the following ways:
*
* 1. An array of arrays with 3 or 2 values. In this case, the values correspond
* to `x,y,target`. If the first value is a string, it is applied as the name
* of the point, and the `x` value is inferred. The `x` value can also be
* omitted, in which case the inner arrays should be of length 2\. Then the
* `x` value is automatically calculated, either starting at 0 and
* incremented by 1, or from `pointStart` and `pointInterval` given in the
* series options.
* ```js
* data: [
* [0, 40, 75],
* [1, 50, 50],
* [2, 60, 40]
* ]
* ```
*
* 2. An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of
* data points exceeds the series'
* [turboThreshold](#series.bullet.turboThreshold), this option is not
* available.
* ```js
* data: [{
* x: 0,
* y: 40,
* target: 75,
* name: "Point1",
* color: "#00FF00"
* }, {
* x: 1,
* y: 60,
* target: 40,
* name: "Point2",
* color: "#FF00FF"
* }]
* ```
*
* @type {Array<Array<(number|string),number>|Array<(number|string),number,number>|*>}
* @extends series.column.data
* @since 6.0.0
* @product highcharts
* @apioption series.bullet.data
*/
/**
* The target value of a point.
*
* @type {number}
* @since 6.0.0
* @product highcharts
* @apioption series.bullet.data.target
*/
/**
* Individual target options for each point.
*
* @extends plotOptions.bullet.targetOptions
* @product highcharts
* @apioption series.bullet.data.targetOptions
*/
/**
* @product highcharts
* @excluding halo, lineWidth, lineWidthPlus, marker
* @apioption series.bullet.states.hover
*/
/**
* @product highcharts
* @excluding halo, lineWidth, lineWidthPlus, marker
* @apioption series.bullet.states.select
*/
''; // adds doclets above to transpiled file
});
_registerModule(_modules, 'masters/modules/bullet.src.js', [], function () {
});
}));
+30
View File
@@ -0,0 +1,30 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
ColorAxis module
(c) 2012-2019 Pawel Potaczek
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/color-axis",["highcharts"],function(m){b(m);b.Highcharts=m;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function m(b,k,g,n){b.hasOwnProperty(k)||(b[k]=n.apply(null,g))}b=b?b._modules:{};m(b,"Mixins/ColorSeries.js",[b["Core/Globals.js"]],function(b){b.colorPointMixin={setVisible:function(b){var g=this,n=b?"show":"hide";
g.visible=g.options.visible=!!b;["graphic","dataLabel"].forEach(function(b){if(g[b])g[b][n]()});this.series.buildKDTree()}};b.colorSeriesMixin={optionalAxis:"colorAxis",colorAxis:0,translateColors:function(){var b=this,g=this.options.nullColor,n=this.colorAxis,m=this.colorKey;(this.data.length?this.data:this.points).forEach(function(p){var k=p.getNestedProperty(m);(k=p.options.color||(p.isNull||null===p.value?g:n&&"undefined"!==typeof k?n.toColor(k,p):p.color||b.color))&&p.color!==k&&(p.color=k,"point"===
b.options.legendType&&p.legendItem&&b.chart.legend.colorizeItem(p,p.visible))})}}});m(b,"Core/Axis/ColorAxis.js",[b["Core/Axis/Axis.js"],b["Core/Chart/Chart.js"],b["Core/Color.js"],b["Core/Globals.js"],b["Core/Legend.js"],b["Mixins/LegendSymbol.js"],b["Core/Series/Point.js"],b["Core/Utilities.js"]],function(b,k,g,n,m,p,A,q){var B=this&&this.__extends||function(){var b=function(d,a){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,e){a.__proto__=e}||function(a,e){for(var c in e)e.hasOwnProperty(c)&&
(a[c]=e[c])};return b(d,a)};return function(d,a){function f(){this.constructor=d}b(d,a);d.prototype=null===a?Object.create(a):(f.prototype=a.prototype,new f)}}(),u=g.parse,C=n.noop;g=q.addEvent;var z=q.erase,x=q.extend,D=q.Fx,E=q.isNumber,y=q.merge,t=q.pick,F=q.splat;"";var v=n.Series;q=n.colorPointMixin;x(v.prototype,n.colorSeriesMixin);x(A.prototype,q);k.prototype.collectionsWithUpdate.push("colorAxis");k.prototype.collectionsWithInit.colorAxis=[k.prototype.addColorAxis];var w=function(b){function d(a,
f){var e=b.call(this,a,f)||this;e.beforePadding=!1;e.chart=void 0;e.coll="colorAxis";e.dataClasses=void 0;e.legendItem=void 0;e.legendItems=void 0;e.name="";e.options=void 0;e.stops=void 0;e.visible=!0;e.init(a,f);return e}B(d,b);d.buildOptions=function(a,f,e){a=a.options.legend||{};var c=e.layout?"vertical"!==e.layout:"vertical"!==a.layout;return y(f,{side:c?2:1,reversed:!c},e,{opposite:!c,showEmpty:!1,title:null,visible:a.enabled&&(e?!1!==e.visible:!0)})};d.prototype.init=function(a,f){var e=d.buildOptions(a,
d.defaultOptions,f);this.coll="colorAxis";b.prototype.init.call(this,a,e);f.dataClasses&&this.initDataClasses(f);this.initStops();this.horiz=!e.opposite;this.zoomEnabled=!1};d.prototype.initDataClasses=function(a){var f=this.chart,e,c=0,b=f.options.chart.colorCount,d=this.options,h=a.dataClasses.length;this.dataClasses=e=[];this.legendItems=[];a.dataClasses.forEach(function(a,r){a=y(a);e.push(a);if(f.styledMode||!a.color)"category"===d.dataClassColor?(f.styledMode||(r=f.options.colors,b=r.length,
a.color=r[c]),a.colorIndex=c,c++,c===b&&(c=0)):a.color=u(d.minColor).tweenTo(u(d.maxColor),2>h?.5:r/(h-1))})};d.prototype.hasData=function(){return!!(this.tickPositions||[]).length};d.prototype.setTickPositions=function(){if(!this.dataClasses)return b.prototype.setTickPositions.call(this)};d.prototype.initStops=function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];this.stops.forEach(function(a){a.color=u(a[1])})};d.prototype.setOptions=function(a){b.prototype.setOptions.call(this,
a);this.options.crosshair=this.options.marker};d.prototype.setAxisSize=function(){var a=this.legendSymbol,f=this.chart,e=f.options.legend||{},c,b;a?(this.left=e=a.attr("x"),this.top=c=a.attr("y"),this.width=b=a.attr("width"),this.height=a=a.attr("height"),this.right=f.chartWidth-e-b,this.bottom=f.chartHeight-c-a,this.len=this.horiz?b:a,this.pos=this.horiz?e:c):this.len=(this.horiz?e.symbolWidth:e.symbolHeight)||d.defaultLegendLength};d.prototype.normalizedValue=function(a){this.logarithmic&&(a=this.logarithmic.log2lin(a));
return 1-(this.max-a)/(this.max-this.min||1)};d.prototype.toColor=function(a,f){var e=this.dataClasses,c=this.stops,b;if(e)for(b=e.length;b--;){var d=e[b];var h=d.from;c=d.to;if(("undefined"===typeof h||a>=h)&&("undefined"===typeof c||a<=c)){var l=d.color;f&&(f.dataClass=b,f.colorIndex=d.colorIndex);break}}else{a=this.normalizedValue(a);for(b=c.length;b--&&!(a>c[b][0]););h=c[b]||c[b+1];c=c[b+1]||h;a=1-(c[0]-a)/(c[0]-h[0]||1);l=h.color.tweenTo(c.color,a)}return l};d.prototype.getOffset=function(){var a=
this.legendGroup,f=this.chart.axisOffset[this.side];a&&(this.axisParent=a,b.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=f)};d.prototype.setLegendColor=function(){var a=this.reversed,f=a?1:0;a=a?0:1;f=this.horiz?[f,0,a,0]:[0,a,0,f];this.legendColor={linearGradient:{x1:f[0],y1:f[1],x2:f[2],y2:f[3]},stops:this.stops}};d.prototype.drawLegendSymbol=function(a,f){var b=a.padding,c=a.options,r=this.horiz,l=t(c.symbolWidth,
r?d.defaultLegendLength:12),h=t(c.symbolHeight,r?12:d.defaultLegendLength),g=t(c.labelPadding,r?16:30);c=t(c.itemDistance,10);this.setLegendColor();f.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,l,h).attr({zIndex:1}).add(f.legendGroup);this.legendItemWidth=l+b+(r?c:g);this.legendItemHeight=h+b+(r?g:0)};d.prototype.setState=function(a){this.series.forEach(function(b){b.setState(a)})};d.prototype.setVisible=function(){};d.prototype.getSeriesExtremes=function(){var a=this.series,b=a.length,
e;this.dataMin=Infinity;for(this.dataMax=-Infinity;b--;){var c=a[b];var d=c.colorKey=t(c.options.colorKey,c.colorKey,c.pointValKey,c.zoneAxis,"y");var l=c.pointArrayMap;var h=c[d+"Min"]&&c[d+"Max"];if(c[d+"Data"])var g=c[d+"Data"];else if(l){g=[];l=l.indexOf(d);var k=c.yData;if(0<=l&&k)for(e=0;e<k.length;e++)g.push(t(k[e][l],k[e]))}else g=c.yData;h?(c.minColorValue=c[d+"Min"],c.maxColorValue=c[d+"Max"]):(g=v.prototype.getExtremes.call(c,g),c.minColorValue=g.dataMin,c.maxColorValue=g.dataMax);"undefined"!==
typeof c.minColorValue&&(this.dataMin=Math.min(this.dataMin,c.minColorValue),this.dataMax=Math.max(this.dataMax,c.maxColorValue));h||v.prototype.applyExtremes.call(c)}};d.prototype.drawCrosshair=function(a,f){var d=f&&f.plotX,c=f&&f.plotY,l=this.pos,g=this.len;if(f){var h=this.toPixels(f.getNestedProperty(f.series.colorKey));h<l?h=l-2:h>l+g&&(h=l+g+2);f.plotX=h;f.plotY=this.len-h;b.prototype.drawCrosshair.call(this,a,f);f.plotX=d;f.plotY=c;this.cross&&!this.cross.addedToColorAxis&&this.legendGroup&&
(this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup),this.cross.addedToColorAxis=!0,!this.chart.styledMode&&this.crosshair&&this.cross.attr({fill:this.crosshair.color}))}};d.prototype.getPlotLinePath=function(a){var d=this.left,e=a.translatedValue,c=this.top;return E(e)?this.horiz?[["M",e-4,c-6],["L",e+4,c-6],["L",e,c],["Z"]]:[["M",d,e],["L",d-6,e+6],["L",d-6,e-6],["Z"]]:b.prototype.getPlotLinePath.call(this,a)};d.prototype.update=function(a,f){var e=this.chart,c=e.legend,l=d.buildOptions(e,
{},a);this.series.forEach(function(a){a.isDirtyData=!0});(a.dataClasses&&c.allItems||this.dataClasses)&&this.destroyItems();e.options[this.coll]=y(this.userOptions,l);b.prototype.update.call(this,l,f);this.legendItem&&(this.setLegendColor(),c.colorizeItem(this,!0))};d.prototype.destroyItems=function(){var a=this.chart;this.legendItem?a.legend.destroyItem(this):this.legendItems&&this.legendItems.forEach(function(b){a.legend.destroyItem(b)});a.isDirtyLegend=!0};d.prototype.remove=function(a){this.destroyItems();
b.prototype.remove.call(this,a)};d.prototype.getDataClassLegendSymbols=function(){var a=this,b=a.chart,d=a.legendItems,c=b.options.legend,l=c.valueDecimals,g=c.valueSuffix||"",h;d.length||a.dataClasses.forEach(function(c,e){var f=!0,k=c.from,m=c.to,n=b.numberFormatter;h="";"undefined"===typeof k?h="< ":"undefined"===typeof m&&(h="> ");"undefined"!==typeof k&&(h+=n(k,l)+g);"undefined"!==typeof k&&"undefined"!==typeof m&&(h+=" - ");"undefined"!==typeof m&&(h+=n(m,l)+g);d.push(x({chart:b,name:h,options:{},
drawLegendSymbol:p.drawRectangle,visible:!0,setState:C,isDataClass:!0,setVisible:function(){f=a.visible=!f;a.series.forEach(function(a){a.points.forEach(function(a){a.dataClass===e&&a.setVisible(f)})});b.legend.colorizeItem(this,f)}},c))});return d};d.defaultLegendLength=200;d.defaultOptions={lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{overflow:"justify",rotation:0},
minColor:"#e6ebf5",maxColor:"#003399",tickLength:5,showInLegend:!0};d.keepProps=["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"];return d}(b);Array.prototype.push.apply(b.keepProps,w.keepProps);n.ColorAxis=w;["fill","stroke"].forEach(function(b){D.prototype[b+"Setter"]=function(){this.elem.attr(b,u(this.start).tweenTo(u(this.end),this.pos),null,!0)}});g(k,"afterGetAxes",function(){var b=this,d=b.options;this.colorAxis=[];d.colorAxis&&(d.colorAxis=F(d.colorAxis),d.colorAxis.forEach(function(a,
d){a.index=d;new w(b,a)}))});g(v,"bindAxes",function(){var b=this.axisTypes;b?-1===b.indexOf("colorAxis")&&b.push("colorAxis"):this.axisTypes=["colorAxis"]});g(m,"afterGetAllItems",function(b){var d=[],a,f;(this.chart.colorAxis||[]).forEach(function(e){(a=e.options)&&a.showInLegend&&(a.dataClasses&&a.visible?d=d.concat(e.getDataClassLegendSymbols()):a.visible&&d.push(e),e.series.forEach(function(c){if(!c.options.showInLegend||a.dataClasses)"point"===c.options.legendType?c.points.forEach(function(a){z(b.allItems,
a)}):z(b.allItems,c)}))});for(f=d.length;f--;)b.allItems.unshift(d[f])});g(m,"afterColorizeItem",function(b){b.visible&&b.item.legendColor&&b.item.legendSymbol.attr({fill:b.item.legendColor})});g(m,"afterUpdate",function(){var b=this.chart.colorAxis;b&&b.forEach(function(b,a,f){b.update({},f)})});g(v,"afterTranslate",function(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()});return w});m(b,"masters/modules/coloraxis.src.js",[],function(){})});
//# sourceMappingURL=coloraxis.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,13 @@
/*
Highcharts Gantt JS v8.2.0 (2020-08-20)
CurrentDateIndicator
(c) 2010-2019 Lars A. V. Cabrera
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/current-date-indicator",["highcharts"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,d,c,b){a.hasOwnProperty(d)||(a[d]=b.apply(null,c))}a=a?a._modules:{};b(a,"Extensions/CurrentDateIndication.js",[a["Core/Globals.js"],a["Core/Options.js"],a["Core/Utilities.js"],a["Core/Axis/PlotLineOrBand.js"]],
function(a,b,c,e){var d=b.dateFormat;b=c.addEvent;var f=c.merge;c=c.wrap;var g={currentDateIndicator:!0,color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:function(a,b){return d(b,a)},rotation:0,style:{fontSize:"10px"}}};b(a.Axis,"afterSetOptions",function(){var a=this.options,b=a.currentDateIndicator;b&&(b="object"===typeof b?f(g,b):f(g),b.value=new Date,a.plotLines||(a.plotLines=[]),a.plotLines.push(b))});b(e,"render",function(){this.label&&this.label.attr({text:this.getLabelText(this.options.label)})});
c(e.prototype,"getLabelText",function(a,b){var c=this.options;return c.currentDateIndicator&&c.label&&"function"===typeof c.label.formatter?(c.value=new Date,c.label.formatter.call(this,c.value,c.label.format)):a.call(this,b)})});b(a,"masters/modules/current-date-indicator.src.js",[],function(){})});
//# sourceMappingURL=current-date-indicator.js.map
@@ -0,0 +1 @@
{"version":3,"file":"current-date-indicator.js.map","lineCount":12,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,2CAAP,CAAoD,CAAC,YAAD,CAApD,CAAoE,QAAS,CAACE,CAAD,CAAa,CACtFL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAH+E,CAA1F,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC,QAAS,CAACD,CAAD,CAAa,CAEpBE,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAkBC,CAAlB,CAAsB,CACrCH,CAAAI,eAAA,CAAmBH,CAAnB,CAAL,GACID,CAAA,CAAIC,CAAJ,CADJ,CACgBE,CAAAE,MAAA,CAAS,IAAT,CAAeH,CAAf,CADhB,CAD0C,CAD1CI,CAAAA,CAAWT,CAAA,CAAaA,CAAAS,SAAb,CAAmC,EAMlDP,EAAA,CAAgBO,CAAhB,CAA0B,qCAA1B,CAAiE,CAACA,CAAA,CAAS,iBAAT,CAAD,CAA8BA,CAAA,CAAS,iBAAT,CAA9B,CAA2DA,CAAA,CAAS,mBAAT,CAA3D,CAA0FA,CAAA,CAAS,6BAAT,CAA1F,CAAjE;AAAqM,QAAS,CAACC,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAUC,CAAV,CAA0B,CAYpO,IAAIC,EAAaH,CAAAG,WACbC,EAAAA,CAAWH,CAAAG,SAbqN,KAchOC,EAAQJ,CAAAI,MACRC,EAAAA,CAAOL,CAAAK,KAEX,KAAIC,EAAgB,CAmBZC,qBAAsB,CAAA,CAnBV,CAoBZC,MAAO,SApBK,CAqBZC,MAAO,CArBK,CAyBZC,MAAO,CAUHC,OAAQ,qBAVL,CAWHC,UAAWA,QAAS,CAACC,CAAD,CAAQF,CAAR,CAAgB,CAChC,MAAOT,EAAA,CAAWS,CAAX,CAAmBE,CAAnB,CADyB,CAXjC,CAcPC,SAAU,CAdH,CAkBPC,MAAO,CAEHC,SAAU,MAFP,CAlBA,CAzBK,CAkDpBb,EAAA,CAnDWL,CAAAmB,KAmDX,CAAe,iBAAf,CAAkC,QAAS,EAAG,CAAA,IACtCC,EAAU,IAAAA,QAD4B,CAEtCC,EAAaD,CAAAX,qBACbY,EAAJ,GACIA,CAMA,CANmC,QAAtB,GAAA,MAAOA,EAAP,CACTf,CAAA,CAAME,CAAN,CAAqBa,CAArB,CADS,CAC0Bf,CAAA,CAAME,CAAN,CAKvC,CAJAa,CAAAN,MAIA,CAJmB,IAAIO,IAIvB,CAHKF,CAAAG,UAGL,GAFIH,CAAAG,UAEJ,CAFwB,EAExB,EAAAH,CAAAG,UAAAC,KAAA,CAAuBH,CAAvB,CAPJ,CAH0C,CAA9C,CAaAhB,EAAA,CAASF,CAAT,CAAyB,QAAzB,CAAmC,QAAS,EAAG,CAEvC,IAAAS,MAAJ,EACI,IAAAA,MAAAa,KAAA,CAAgB,CACZC,KAAM,IAAAC,aAAA,CAAkB,IAAAP,QAAAR,MAAlB,CADM,CAAhB,CAHuC,CAA/C,CAQAL;CAAA,CAAKJ,CAAAyB,UAAL,CAA+B,cAA/B,CAA+C,QAAS,CAACC,CAAD,CAAgBC,CAAhB,CAAqC,CACzF,IAAIV,EAAU,IAAAA,QACd,OAAIA,EAAAX,qBAAJ,EAAoCW,CAAAR,MAApC,EACuC,UADvC,GACI,MAAOQ,EAAAR,MAAAE,UADX,EAEIM,CAAAL,MACO,CADS,IAAIO,IACb,CAAAF,CAAAR,MAAAE,UAAAiB,KAAA,CACG,IADH,CACSX,CAAAL,MADT,CACwBK,CAAAR,MAAAC,OADxB,CAHX,EAMOgB,CAAAE,KAAA,CAAmB,IAAnB,CAAyBD,CAAzB,CARkF,CAA7F,CAxFoO,CAAxO,CAoGAtC,EAAA,CAAgBO,CAAhB,CAA0B,+CAA1B,CAA2E,EAA3E,CAA+E,QAAS,EAAG,EAA3F,CA3GoB,CAbvB;","sources":["current-date-indicator.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","H","O","U","PlotLineOrBand","dateFormat","addEvent","merge","wrap","defaultConfig","currentDateIndicator","color","width","label","format","formatter","value","rotation","style","fontSize","Axis","options","cdiOptions","Date","plotLines","push","attr","text","getLabelText","prototype","defaultMethod","defaultLabelOptions","call"]}
@@ -0,0 +1,135 @@
/**
* @license Highcharts Gantt JS v8.2.0 (2020-08-20)
*
* CurrentDateIndicator
*
* (c) 2010-2019 Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/current-date-indicator', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Extensions/CurrentDateIndication.js', [_modules['Core/Globals.js'], _modules['Core/Options.js'], _modules['Core/Utilities.js'], _modules['Core/Axis/PlotLineOrBand.js']], function (H, O, U, PlotLineOrBand) {
/* *
*
* (c) 2016-2020 Highsoft AS
*
* Author: Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var dateFormat = O.dateFormat;
var addEvent = U.addEvent,
merge = U.merge,
wrap = U.wrap;
var Axis = H.Axis;
var defaultConfig = {
/**
* Show an indicator on the axis for the current date and time. Can be a
* boolean or a configuration object similar to
* [xAxis.plotLines](#xAxis.plotLines).
*
* @sample gantt/current-date-indicator/demo
* Current date indicator enabled
* @sample gantt/current-date-indicator/object-config
* Current date indicator with custom options
*
* @declare Highcharts.AxisCurrentDateIndicatorOptions
* @type {boolean|*}
* @default true
* @extends xAxis.plotLines
* @excluding value
* @product gantt
* @apioption xAxis.currentDateIndicator
*/
currentDateIndicator: true,
color: '#ccd6eb',
width: 2,
/**
* @declare Highcharts.AxisCurrentDateIndicatorLabelOptions
*/
label: {
/**
* Format of the label. This options is passed as the fist argument to
* [dateFormat](/class-reference/Highcharts#dateFormat) function.
*
* @type {string}
* @default '%a, %b %d %Y, %H:%M'
* @product gantt
* @apioption xAxis.currentDateIndicator.label.format
*/
format: '%a, %b %d %Y, %H:%M',
formatter: function (value, format) {
return dateFormat(format, value);
},
rotation: 0,
/**
* @type {Highcharts.CSSObject}
*/
style: {
/** @internal */
fontSize: '10px'
}
}
};
/* eslint-disable no-invalid-this */
addEvent(Axis, 'afterSetOptions', function () {
var options = this.options,
cdiOptions = options.currentDateIndicator;
if (cdiOptions) {
cdiOptions = typeof cdiOptions === 'object' ?
merge(defaultConfig, cdiOptions) : merge(defaultConfig);
cdiOptions.value = new Date();
if (!options.plotLines) {
options.plotLines = [];
}
options.plotLines.push(cdiOptions);
}
});
addEvent(PlotLineOrBand, 'render', function () {
// If the label already exists, update its text
if (this.label) {
this.label.attr({
text: this.getLabelText(this.options.label)
});
}
});
wrap(PlotLineOrBand.prototype, 'getLabelText', function (defaultMethod, defaultLabelOptions) {
var options = this.options;
if (options.currentDateIndicator && options.label &&
typeof options.label.formatter === 'function') {
options.value = new Date();
return options.label.formatter
.call(this, options.value, options.label.format);
}
return defaultMethod.call(this, defaultLabelOptions);
});
});
_registerModule(_modules, 'masters/modules/current-date-indicator.src.js', [], function () {
});
}));
+17
View File
@@ -0,0 +1,17 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Highcharts cylinder module
(c) 2010-2019 Kacper Madej
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/cylinder",["highcharts","highcharts/highcharts-3d"],function(g){b(g);b.Highcharts=g;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function g(b,h,g,f){b.hasOwnProperty(h)||(b[h]=f.apply(null,g))}b=b?b._modules:{};g(b,"Series/CylinderSeries.js",[b["Core/Globals.js"],b["Core/Color.js"],b["Extensions/Math3D.js"],b["Core/Utilities.js"]],
function(b,g,l,f){var h=g.parse,r=l.perspective;g=f.merge;var t=f.pick;l=f.seriesType;var u=b.charts,v=b.deg2rad;f=b.Renderer.prototype;var w=f.cuboidPath,k=function(a){return!a.some(function(a){return"C"===a[0]})};l("cylinder","column",{},{},{shapeType:"cylinder",hasNewShapeType:b.seriesTypes.column.prototype.pointClass.prototype.hasNewShapeType});b=g(f.elements3d.cuboid,{parts:["top","bottom","front","back"],pathType:"cylinder",fillSetter:function(a){this.singleSetterForParts("fill",null,{front:a,
back:a,top:h(a).brighten(.1).get(),bottom:h(a).brighten(-.1).get()});this.color=this.fill=a;return this}});f.elements3d.cylinder=b;f.cylinder=function(a){return this.element3d("cylinder",a)};f.cylinderPath=function(a){var c=u[this.chartIndex],d=w.call(this,a),e=!d.isTop,b=!d.isFront,f=this.getCylinderEnd(c,a);a=this.getCylinderEnd(c,a,!0);return{front:this.getCylinderFront(f,a),back:this.getCylinderBack(f,a),top:f,bottom:a,zIndexes:{top:e?3:0,bottom:e?0:3,front:b?2:1,back:b?1:2,group:d.zIndexes.group}}};
f.getCylinderFront=function(a,c){a=a.slice(0,3);if(k(c)){var d=c[0];"M"===d[0]&&(a.push(c[2]),a.push(c[1]),a.push(["L",d[1],d[2]]))}else{d=c[0];var e=c[1];c=c[2];"M"===d[0]&&"C"===e[0]&&"C"===c[0]&&(a.push(["L",c[5],c[6]]),a.push(["C",c[3],c[4],c[1],c[2],e[5],e[6]]),a.push(["C",e[3],e[4],e[1],e[2],d[1],d[2]]))}a.push(["Z"]);return a};f.getCylinderBack=function(a,c){var d=[];if(k(a)){var e=a[0],b=a[2];"M"===e[0]&&"L"===b[0]&&(d.push(["M",b[1],b[2]]),d.push(a[3]),d.push(["L",e[1],e[2]]))}else"C"===
a[2][0]&&d.push(["M",a[2][5],a[2][6]]),d.push(a[3],a[4]);k(c)?(e=c[0],"M"===e[0]&&(d.push(["L",e[1],e[2]]),d.push(c[3]),d.push(c[2]))):(a=c[2],e=c[3],c=c[4],"C"===a[0]&&"C"===e[0]&&"C"===c[0]&&(d.push(["L",c[5],c[6]]),d.push(["C",c[3],c[4],c[1],c[2],e[5],e[6]]),d.push(["C",e[3],e[4],e[1],e[2],a[5],a[6]])));d.push(["Z"]);return d};f.getCylinderEnd=function(a,c,d){var e=t(c.depth,c.width),b=Math.min(c.width,e)/2,f=v*(a.options.chart.options3d.beta-90+(c.alphaCorrection||0));d=c.y+(d?c.height:0);var g=
.5519*b,h=c.width/2+c.x,l=e/2+c.z,m=[{x:0,y:d,z:b},{x:g,y:d,z:b},{x:b,y:d,z:g},{x:b,y:d,z:0},{x:b,y:d,z:-g},{x:g,y:d,z:-b},{x:0,y:d,z:-b},{x:-g,y:d,z:-b},{x:-b,y:d,z:-g},{x:-b,y:d,z:0},{x:-b,y:d,z:g},{x:-g,y:d,z:b},{x:0,y:d,z:b}],k=Math.cos(f),q=Math.sin(f),n,p;m.forEach(function(a,b){n=a.x;p=a.z;m[b].x=n*k-p*q+h;m[b].z=p*k+n*q+l});a=r(m,a,!0);return 2.5>Math.abs(a[3].y-a[9].y)&&2.5>Math.abs(a[0].y-a[6].y)?this.toLinePath([a[0],a[3],a[6],a[9]],!0):this.getCurvedPath(a)};f.getCurvedPath=function(a){var b=
[["M",a[0].x,a[0].y]],d=a.length-2,e;for(e=1;e<d;e+=3)b.push(["C",a[e].x,a[e].y,a[e+1].x,a[e+1].y,a[e+2].x,a[e+2].y]);return b}});g(b,"masters/modules/cylinder.src.js",[],function(){})});
//# sourceMappingURL=cylinder.js.map
File diff suppressed because one or more lines are too long
+412
View File
@@ -0,0 +1,412 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Highcharts cylinder module
*
* (c) 2010-2019 Kacper Madej
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/cylinder', ['highcharts', 'highcharts/highcharts-3d'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Series/CylinderSeries.js', [_modules['Core/Globals.js'], _modules['Core/Color.js'], _modules['Extensions/Math3D.js'], _modules['Core/Utilities.js']], function (H, Color, Math3D, U) {
/* *
*
* Highcharts cylinder - a 3D series
*
* (c) 2010-2020 Highsoft AS
*
* Author: Kacper Madej
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var color = Color.parse;
var perspective = Math3D.perspective;
var merge = U.merge,
pick = U.pick,
seriesType = U.seriesType;
var charts = H.charts,
deg2rad = H.deg2rad,
// Work on H.Renderer instead of SVGRenderer for VML support.
RendererProto = H.Renderer.prototype,
cuboidPath = RendererProto.cuboidPath,
cylinderMethods;
// Check if a path is simplified. The simplified path contains only lineTo
// segments, whereas non-simplified contain curves.
var isSimplified = function (path) {
return !path.some(function (seg) { return seg[0] === 'C'; });
};
/**
* The cylinder series type.
*
* @requires module:highcharts-3d
* @requires module:modules/cylinder
*
* @private
* @class
* @name Highcharts.seriesTypes.cylinder
*
* @augments Highcharts.Series
*/
seriesType('cylinder', 'column',
/**
* A cylinder graph is a variation of a 3d column graph. The cylinder graph
* features cylindrical points.
*
* @sample {highcharts} highcharts/demo/cylinder/
* Cylinder graph
*
* @extends plotOptions.column
* @since 7.0.0
* @product highcharts
* @excluding allAreas, boostThreshold, colorAxis, compare, compareBase,
* dragDrop, boostBlending
* @requires modules/cylinder
* @optionparent plotOptions.cylinder
*/
{}, {},
/** @lends Highcharts.seriesTypes.cylinder#pointClass# */
{
shapeType: 'cylinder',
hasNewShapeType: H
.seriesTypes.column.prototype
.pointClass.prototype
.hasNewShapeType
});
/**
* A `cylinder` series. If the [type](#series.cylinder.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.cylinder
* @since 7.0.0
* @product highcharts
* @excluding allAreas, boostThreshold, colorAxis, compare, compareBase,
* boostBlending
* @requires modules/cylinder
* @apioption series.cylinder
*/
/**
* An array of data points for the series. For the `cylinder` series type,
* points can be given in the following ways:
*
* 1. An array of numerical values. In this case, the numerical values will be
* interpreted as `y` options. The `x` values will be automatically
* calculated, either starting at 0 and incremented by 1, or from
* `pointStart` and `pointInterval` given in the series options. If the axis
* has categories, these will be used. Example:
* ```js
* data: [0, 5, 3, 5]
* ```
*
* 2. An array of arrays with 2 values. In this case, the values correspond to
* `x,y`. If the first value is a string, it is applied as the name of the
* point, and the `x` value is inferred.
* ```js
* data: [
* [0, 0],
* [1, 8],
* [2, 9]
* ]
* ```
*
* 3. An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of
* data points exceeds the series'
* [turboThreshold](#series.cylinder.turboThreshold), this option is not
* available.
*
* ```js
* data: [{
* x: 1,
* y: 2,
* name: "Point2",
* color: "#00FF00"
* }, {
* x: 1,
* y: 4,
* name: "Point1",
* color: "#FF00FF"
* }]
* ```
*
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-arrays/
* Arrays of numeric x and y
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
* Arrays of datetime x and y
* @sample {highcharts} highcharts/series/data-array-of-name-value/
* Arrays of point.name and y
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
*
* @type {Array<number|Array<(number|string),(number|null)>|null|*>}
* @extends series.column.data
* @product highcharts highstock
* @apioption series.cylinder.data
*/
// cylinder extends cuboid
cylinderMethods = merge(RendererProto.elements3d.cuboid, {
parts: ['top', 'bottom', 'front', 'back'],
pathType: 'cylinder',
fillSetter: function (fill) {
this.singleSetterForParts('fill', null, {
front: fill,
back: fill,
top: color(fill).brighten(0.1).get(),
bottom: color(fill).brighten(-0.1).get()
});
// fill for animation getter (#6776)
this.color = this.fill = fill;
return this;
}
});
RendererProto.elements3d.cylinder = cylinderMethods;
RendererProto.cylinder = function (shapeArgs) {
return this.element3d('cylinder', shapeArgs);
};
// Generates paths and zIndexes.
RendererProto.cylinderPath = function (shapeArgs) {
var renderer = this,
chart = charts[renderer.chartIndex],
// decide zIndexes of parts based on cubiod logic, for consistency.
cuboidData = cuboidPath.call(renderer,
shapeArgs),
isTopFirst = !cuboidData.isTop,
isFronFirst = !cuboidData.isFront,
top = renderer.getCylinderEnd(chart,
shapeArgs),
bottom = renderer.getCylinderEnd(chart,
shapeArgs,
true);
return {
front: renderer.getCylinderFront(top, bottom),
back: renderer.getCylinderBack(top, bottom),
top: top,
bottom: bottom,
zIndexes: {
top: isTopFirst ? 3 : 0,
bottom: isTopFirst ? 0 : 3,
front: isFronFirst ? 2 : 1,
back: isFronFirst ? 1 : 2,
group: cuboidData.zIndexes.group
}
};
};
// Returns cylinder Front path
RendererProto.getCylinderFront = function (topPath, bottomPath) {
var path = topPath.slice(0, 3);
if (isSimplified(bottomPath)) {
var move = bottomPath[0];
if (move[0] === 'M') {
path.push(bottomPath[2]);
path.push(bottomPath[1]);
path.push(['L', move[1], move[2]]);
}
}
else {
var move = bottomPath[0],
curve1 = bottomPath[1],
curve2 = bottomPath[2];
if (move[0] === 'M' && curve1[0] === 'C' && curve2[0] === 'C') {
path.push(['L', curve2[5], curve2[6]]);
path.push(['C', curve2[3], curve2[4], curve2[1], curve2[2], curve1[5], curve1[6]]);
path.push(['C', curve1[3], curve1[4], curve1[1], curve1[2], move[1], move[2]]);
}
}
path.push(['Z']);
return path;
};
// Returns cylinder Back path
RendererProto.getCylinderBack = function (topPath, bottomPath) {
var path = [];
if (isSimplified(topPath)) {
var move = topPath[0],
line2 = topPath[2];
if (move[0] === 'M' && line2[0] === 'L') {
path.push(['M', line2[1], line2[2]]);
path.push(topPath[3]);
// End at start
path.push(['L', move[1], move[2]]);
}
}
else {
if (topPath[2][0] === 'C') {
path.push(['M', topPath[2][5], topPath[2][6]]);
}
path.push(topPath[3], topPath[4]);
}
if (isSimplified(bottomPath)) {
var move = bottomPath[0];
if (move[0] === 'M') {
path.push(['L', move[1], move[2]]);
path.push(bottomPath[3]);
path.push(bottomPath[2]);
}
}
else {
var curve2 = bottomPath[2],
curve3 = bottomPath[3],
curve4 = bottomPath[4];
if (curve2[0] === 'C' && curve3[0] === 'C' && curve4[0] === 'C') {
path.push(['L', curve4[5], curve4[6]]);
path.push(['C', curve4[3], curve4[4], curve4[1], curve4[2], curve3[5], curve3[6]]);
path.push(['C', curve3[3], curve3[4], curve3[1], curve3[2], curve2[5], curve2[6]]);
}
}
path.push(['Z']);
return path;
};
// Retruns cylinder path for top or bottom
RendererProto.getCylinderEnd = function (chart, shapeArgs, isBottom) {
// A half of the smaller one out of width or depth (optional, because
// there's no depth for a funnel that reuses the code)
var depth = pick(shapeArgs.depth,
shapeArgs.width),
radius = Math.min(shapeArgs.width,
depth) / 2,
// Approximated longest diameter
angleOffset = deg2rad * (chart.options.chart.options3d.beta - 90 +
(shapeArgs.alphaCorrection || 0)),
// Could be top or bottom of the cylinder
y = shapeArgs.y + (isBottom ? shapeArgs.height : 0),
// Use cubic Bezier curve to draw a cricle in x,z (y is constant).
// More math. at spencermortensen.com/articles/bezier-circle/
c = 0.5519 * radius,
centerX = shapeArgs.width / 2 + shapeArgs.x,
centerZ = depth / 2 + shapeArgs.z,
// points could be generated in a loop, but readability will plummet
points = [{
x: 0,
y: y,
z: radius
}, {
x: c,
y: y,
z: radius
}, {
x: radius,
y: y,
z: c
}, {
x: radius,
y: y,
z: 0
}, {
x: radius,
y: y,
z: -c
}, {
x: c,
y: y,
z: -radius
}, {
x: 0,
y: y,
z: -radius
}, {
x: -c,
y: y,
z: -radius
}, {
x: -radius,
y: y,
z: -c
}, {
x: -radius,
y: y,
z: 0
}, {
x: -radius,
y: y,
z: c
}, {
x: -c,
y: y,
z: radius
}, {
x: 0,
y: y,
z: radius
}],
cosTheta = Math.cos(angleOffset),
sinTheta = Math.sin(angleOffset),
perspectivePoints,
path,
x,
z;
// rotete to match chart's beta and translate to the shape center
points.forEach(function (point, i) {
x = point.x;
z = point.z;
// x′ = (x * cosθ − z * sinθ) + centerX
// z′ = (z * cosθ + x * sinθ) + centerZ
points[i].x = (x * cosTheta - z * sinTheta) + centerX;
points[i].z = (z * cosTheta + x * sinTheta) + centerZ;
});
perspectivePoints = perspective(points, chart, true);
// check for sub-pixel curve issue, compare front and back edges
if (Math.abs(perspectivePoints[3].y - perspectivePoints[9].y) < 2.5 &&
Math.abs(perspectivePoints[0].y - perspectivePoints[6].y) < 2.5) {
// use simplied shape
path = this.toLinePath([
perspectivePoints[0],
perspectivePoints[3],
perspectivePoints[6],
perspectivePoints[9]
], true);
}
else {
// or default curved path to imitate ellipse (2D circle)
path = this.getCurvedPath(perspectivePoints);
}
return path;
};
// Returns curved path in format of:
// [ M, x, y, ...[C, cp1x, cp2y, cp2x, cp2y, epx, epy]*n_times ]
// (cp - control point, ep - end point)
RendererProto.getCurvedPath = function (points) {
var path = [['M',
points[0].x,
points[0].y]],
limit = points.length - 2,
i;
for (i = 1; i < limit; i += 3) {
path.push([
'C',
points[i].x, points[i].y,
points[i + 1].x, points[i + 1].y,
points[i + 2].x, points[i + 2].y
]);
}
return path;
};
});
_registerModule(_modules, 'masters/modules/cylinder.src.js', [], function () {
});
}));
+41
View File
@@ -0,0 +1,41 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Data module
(c) 2012-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/data",["highcharts"],function(v){b(v);b.Highcharts=v;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function v(b,l,v,t){b.hasOwnProperty(l)||(b[l]=t.apply(null,v))}b=b?b._modules:{};v(b,"Extensions/Ajax.js",[b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,l){var v=l.merge,t=l.objectEach;b.ajax=function(b){var p=
v(!0,{url:!1,type:"get",dataType:"json",success:!1,error:!1,data:!1,headers:{}},b);b={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"};var l=new XMLHttpRequest;if(!p.url)return!1;l.open(p.type.toUpperCase(),p.url,!0);p.headers["Content-Type"]||l.setRequestHeader("Content-Type",b[p.dataType]||b.text);t(p.headers,function(b,p){l.setRequestHeader(p,b)});l.onreadystatechange=function(){if(4===l.readyState){if(200===l.status){var b=l.responseText;if("json"===
p.dataType)try{b=JSON.parse(b)}catch(C){p.error&&p.error(l,C);return}return p.success&&p.success(b)}p.error&&p.error(l,l.responseText)}};try{p.data=JSON.stringify(p.data)}catch(D){}l.send(p.data||!0)};b.getJSON=function(l,p){b.ajax({url:l,success:p,dataType:"json",headers:{"Content-Type":"text/plain"}})};return{ajax:b.ajax,getJSON:b.getJSON}});v(b,"Extensions/Data.js",[b["Core/Chart/Chart.js"],b["Core/Globals.js"],b["Core/Series/Point.js"],b["Core/Utilities.js"],b["Extensions/Ajax.js"]],function(b,
l,v,t,H){var p=t.addEvent,I=t.defined,D=t.extend,C=t.fireEvent,E=t.isNumber,A=t.merge,J=t.objectEach,K=t.pick,L=t.splat,F=H.ajax,M=l.win.document;t=function(){function b(a,c,f){this.options=this.rawColumns=this.firstRowAsNames=this.chartOptions=this.chart=void 0;this.dateFormats={"YYYY/mm/dd":{regex:/^([0-9]{4})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{1,2})$/,parser:function(a){return a?Date.UTC(+a[1],a[2]-1,+a[3]):NaN}},"dd/mm/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(a){return a?
Date.UTC(+a[3],a[2]-1,+a[1]):NaN},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(a){return a?Date.UTC(+a[3],a[1]-1,+a[2]):NaN}},"dd/mm/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(a){if(!a)return NaN;var c=+a[3];c=c>(new Date).getFullYear()-2E3?c+1900:c+2E3;return Date.UTC(c,a[2]-1,+a[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(a){return a?
Date.UTC(+a[3]+2E3,a[1]-1,+a[2]):NaN}}};this.init(a,c,f)}b.prototype.init=function(a,c,f){var d=a.decimalPoint;c&&(this.chartOptions=c);f&&(this.chart=f);"."!==d&&","!==d&&(d=void 0);this.options=a;this.columns=a.columns||this.rowsToColumns(a.rows)||[];this.firstRowAsNames=K(a.firstRowAsNames,this.firstRowAsNames,!0);this.decimalRegex=d&&new RegExp("^(-?[0-9]+)"+d+"([0-9]+)$");this.rawColumns=[];if(this.columns.length){this.dataFound();var g=!0}this.hasURLOption(a)&&(clearTimeout(this.liveDataTimeout),
g=!1);g||(g=this.fetchLiveData());g||(g=!!this.parseCSV().length);g||(g=!!this.parseTable().length);g||(g=this.parseGoogleSpreadsheet());!g&&a.afterComplete&&a.afterComplete()};b.prototype.hasURLOption=function(a){return!(!a||!(a.rowsURL||a.csvURL||a.columnsURL))};b.prototype.getColumnDistribution=function(){var a=this.chartOptions,c=this.options,f=[],d=function(a){return(l.seriesTypes[a||"line"].prototype.pointArrayMap||[0]).length},g=a&&a.chart&&a.chart.type,e=[],b=[],h=0;c=c&&c.seriesMapping||
a&&a.series&&a.series.map(function(){return{x:0}})||[];var k;(a&&a.series||[]).forEach(function(a){e.push(d(a.type||g))});c.forEach(function(a){f.push(a.x||0)});0===f.length&&f.push(0);c.forEach(function(c){var f=new G,u=e[h]||d(g),r=(a&&a.series||[])[h]||{},w=l.seriesTypes[r.type||g||"line"].prototype.pointArrayMap,z=w||["y"];(I(c.x)||r.isCartesian||!w)&&f.addColumnReader(c.x,"x");J(c,function(a,c){"x"!==c&&f.addColumnReader(a,c)});for(k=0;k<u;k++)f.hasReader(z[k])||f.addColumnReader(void 0,z[k]);
b.push(f);h++});c=l.seriesTypes[g||"line"].prototype.pointArrayMap;"undefined"===typeof c&&(c=["y"]);this.valueCount={global:d(g),xColumns:f,individual:e,seriesBuilders:b,globalPointArrayMap:c}};b.prototype.dataFound=function(){this.options.switchRowsAndColumns&&(this.columns=this.rowsToColumns(this.columns));this.getColumnDistribution();this.parseTypes();!1!==this.parsed()&&this.complete()};b.prototype.parseCSV=function(a){function c(a,c,f,d){function g(c){h=a[c];m=a[c-1];r=a[c+1]}function b(a){x.length<
u+1&&x.push([a]);x[u][x[u].length-1]!==a&&x[u].push(a)}function e(){k>y||y>l?(++y,q=""):(!isNaN(parseFloat(q))&&isFinite(q)?(q=parseFloat(q),b("number")):isNaN(Date.parse(q))?b("string"):(q=q.replace(/\//g,"-"),b("date")),w.length<u+1&&w.push([]),f||(w[u][c]=q),q="",++u,++y)}var n=0,h="",m="",r="",q="",y=0,u=0;if(a.trim().length&&"#"!==a.trim()[0]){for(;n<a.length;n++){g(n);if("#"===h){e();return}if('"'===h)for(g(++n);n<a.length&&('"'!==h||'"'===m||'"'===r);){if('"'!==h||'"'===h&&'"'!==m)q+=h;g(++n)}else d&&
d[h]?d[h](h,q)&&e():h===z?e():q+=h}e()}}function f(a){var c=0,f=0,d=!1;a.some(function(a,d){var g=!1,b="";if(13<d)return!0;for(var e=0;e<a.length;e++){d=a[e];var h=a[e+1];var k=a[e-1];if("#"===d)break;if('"'===d)if(g){if('"'!==k&&'"'!==h){for(;" "===h&&e<a.length;)h=a[++e];"undefined"!==typeof r[h]&&r[h]++;g=!1}}else g=!0;else"undefined"!==typeof r[d]?(b=b.trim(),isNaN(Date.parse(b))?!isNaN(b)&&isFinite(b)||r[d]++:r[d]++,b=""):b+=d;","===d&&f++;"."===d&&c++}});d=r[";"]>r[","]?";":",";e.decimalPoint||
(e.decimalPoint=c>f?".":",",g.decimalRegex=new RegExp("^(-?[0-9]+)"+e.decimalPoint+"([0-9]+)$"));return d}function d(a,c){var d=[],f=0,b=!1,h=[],k=[],n;if(!c||c>a.length)c=a.length;for(;f<c;f++)if("undefined"!==typeof a[f]&&a[f]&&a[f].length){var m=a[f].trim().replace(/\//g," ").replace(/\-/g," ").replace(/\./g," ").split(" ");d=["","",""];for(n=0;n<m.length;n++)n<d.length&&(m[n]=parseInt(m[n],10),m[n]&&(k[n]=!k[n]||k[n]<m[n]?m[n]:k[n],"undefined"!==typeof h[n]?h[n]!==m[n]&&(h[n]=!1):h[n]=m[n],31<
m[n]?d[n]=100>m[n]?"YY":"YYYY":12<m[n]&&31>=m[n]?(d[n]="dd",b=!0):d[n].length||(d[n]="mm")))}if(b){for(n=0;n<h.length;n++)!1!==h[n]?12<k[n]&&"YY"!==d[n]&&"YYYY"!==d[n]&&(d[n]="YY"):12<k[n]&&"mm"===d[n]&&(d[n]="dd");3===d.length&&"dd"===d[1]&&"dd"===d[2]&&(d[2]="YY");a=d.join("/");return(e.dateFormats||g.dateFormats)[a]?a:(C("deduceDateFailed"),"YYYY/mm/dd")}return"YYYY/mm/dd"}var g=this,e=a||this.options,b=e.csv;a="undefined"!==typeof e.startRow&&e.startRow?e.startRow:0;var h=e.endRow||Number.MAX_VALUE,
k="undefined"!==typeof e.startColumn&&e.startColumn?e.startColumn:0,l=e.endColumn||Number.MAX_VALUE,m=0,x=[],r={",":0,";":0,"\t":0};var w=this.columns=[];b&&e.beforeParse&&(b=e.beforeParse.call(this,b));if(b){b=b.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(e.lineDelimiter||"\n");if(!a||0>a)a=0;if(!h||h>=b.length)h=b.length-1;if(e.itemDelimiter)var z=e.itemDelimiter;else z=null,z=f(b);var y=0;for(m=a;m<=h;m++)"#"===b[m][0]?y++:c(b[m],m-a-y);e.columnTypes&&0!==e.columnTypes.length||!x.length||!x[0].length||
"date"!==x[0][1]||e.dateFormat||(e.dateFormat=d(w[0]));this.dataFound()}return w};b.prototype.parseTable=function(){var a=this.options,c=a.table,f=this.columns||[],d=a.startRow||0,b=a.endRow||Number.MAX_VALUE,e=a.startColumn||0,u=a.endColumn||Number.MAX_VALUE;c&&("string"===typeof c&&(c=M.getElementById(c)),[].forEach.call(c.getElementsByTagName("tr"),function(a,c){c>=d&&c<=b&&[].forEach.call(a.children,function(a,b){var g=f[b-e],h=1;if(("TD"===a.tagName||"TH"===a.tagName)&&b>=e&&b<=u)for(f[b-e]||
(f[b-e]=[]),f[b-e][c-d]=a.innerHTML;c-d>=h&&void 0===g[c-d-h];)g[c-d-h]=null,h++})}),this.dataFound());return f};b.prototype.fetchLiveData=function(){function a(g){function k(h,k,l){function m(){e&&f.liveDataURL===h&&(c.liveDataTimeout=setTimeout(a,u))}if(!h||0!==h.indexOf("http"))return h&&d.error&&d.error("Invalid URL"),!1;g&&(clearTimeout(c.liveDataTimeout),f.liveDataURL=h);F({url:h,dataType:l||"json",success:function(a){f&&f.series&&k(a);m()},error:function(a,c){3>++b&&m();return d.error&&d.error(c,
a)}});return!0}k(h.csvURL,function(a){f.update({data:{csv:a}})},"text")||k(h.rowsURL,function(a){f.update({data:{rows:a}})})||k(h.columnsURL,function(a){f.update({data:{columns:a}})})}var c=this,f=this.chart,d=this.options,b=0,e=d.enablePolling,u=1E3*(d.dataRefreshRate||2),h=A(d);if(!this.hasURLOption(d))return!1;1E3>u&&(u=1E3);delete d.csvURL;delete d.rowsURL;delete d.columnsURL;a(!0);return this.hasURLOption(d)};b.prototype.parseGoogleSpreadsheet=function(){function a(c){var b=["https://spreadsheets.google.com/feeds/cells",
d,e,"public/values?alt=json"].join("/");F({url:b,dataType:"json",success:function(d){c(d);f.enablePolling&&setTimeout(function(){a(c)},1E3*(f.dataRefreshRate||2))},error:function(a,c){return f.error&&f.error(c,a)}})}var c=this,f=this.options,d=f.googleSpreadsheetKey,b=this.chart,e=f.googleSpreadsheetWorksheet||1,u=f.startRow||0,h=f.endRow||Number.MAX_VALUE,k=f.startColumn||0,l=f.endColumn||Number.MAX_VALUE,m=1E3*(f.dataRefreshRate||2);4E3>m&&(m=4E3);d&&(delete f.googleSpreadsheetKey,a(function(a){var d=
[];a=a.feed.entry;var f=(a||[]).length,g=0,e;if(!a||0===a.length)return!1;for(e=0;e<f;e++){var m=a[e];g=Math.max(g,m.gs$cell.col)}for(e=0;e<g;e++)e>=k&&e<=l&&(d[e-k]=[]);for(e=0;e<f;e++){m=a[e];g=m.gs$cell.row-1;var p=m.gs$cell.col-1;if(p>=k&&p<=l&&g>=u&&g<=h){var q=m.gs$cell||m.content;m=null;q.numericValue?m=0<=q.$t.indexOf("/")||0<=q.$t.indexOf("-")?q.$t:0<q.$t.indexOf("%")?100*parseFloat(q.numericValue):parseFloat(q.numericValue):q.$t&&q.$t.length&&(m=q.$t);d[p-k][g-u]=m}}d.forEach(function(a){for(e=
0;e<a.length;e++)"undefined"===typeof a[e]&&(a[e]=null)});b&&b.series?b.update({data:{columns:d}}):(c.columns=d,c.dataFound())}));return!1};b.prototype.trim=function(a,c){"string"===typeof a&&(a=a.replace(/^\s+|\s+$/g,""),c&&/^[0-9\s]+$/.test(a)&&(a=a.replace(/\s/g,"")),this.decimalRegex&&(a=a.replace(this.decimalRegex,"$1.$2")));return a};b.prototype.parseTypes=function(){for(var a=this.columns,c=a.length;c--;)this.parseColumn(a[c],c)};b.prototype.parseColumn=function(a,c){var f=this.rawColumns,
d=this.columns,b=a.length,e=this.firstRowAsNames,l=-1!==this.valueCount.xColumns.indexOf(c),h,k=[],p=this.chartOptions,m,t=(this.options.columnTypes||[])[c];p=l&&(p&&p.xAxis&&"category"===L(p.xAxis)[0].type||"string"===t);for(f[c]||(f[c]=[]);b--;){var r=k[b]||a[b];var w=this.trim(r);var v=this.trim(r,!0);var B=parseFloat(v);"undefined"===typeof f[c][b]&&(f[c][b]=w);p||0===b&&e?a[b]=""+w:+v===B?(a[b]=B,31536E6<B&&"float"!==t?a.isDatetime=!0:a.isNumeric=!0,"undefined"!==typeof a[b+1]&&(m=B>a[b+1])):
(w&&w.length&&(h=this.parseDate(r)),l&&E(h)&&"float"!==t?(k[b]=r,a[b]=h,a.isDatetime=!0,"undefined"!==typeof a[b+1]&&(r=h>a[b+1],r!==m&&"undefined"!==typeof m&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,b=a.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):a.unsorted=!0),m=r)):(a[b]=""===w?null:w,0!==b&&(a.isDatetime||a.isNumeric)&&(a.mixed=!0)))}l&&a.mixed&&(d[c]=f[c]);if(l&&m&&this.options.sort)for(c=0;c<d.length;c++)d[c].reverse(),e&&d[c].unshift(d[c].pop())};
b.prototype.parseDate=function(a){var c=this.options.parseDate,b,d=this.options.dateFormat||this.dateFormat,g;if(c)var e=c(a);else if("string"===typeof a){if(d)(c=this.dateFormats[d])||(c=this.dateFormats["YYYY/mm/dd"]),(g=a.match(c.regex))&&(e=c.parser(g));else for(b in this.dateFormats)if(c=this.dateFormats[b],g=a.match(c.regex)){this.dateFormat=b;this.alternativeFormat=c.alternative;e=c.parser(g);break}g||(g=Date.parse(a),"object"===typeof g&&null!==g&&g.getTime?e=g.getTime()-6E4*g.getTimezoneOffset():
E(g)&&(e=g-6E4*(new Date(g)).getTimezoneOffset()))}return e};b.prototype.rowsToColumns=function(a){var c,b;if(a){var d=[];var g=a.length;for(c=0;c<g;c++){var e=a[c].length;for(b=0;b<e;b++)d[b]||(d[b]=[]),d[b][c]=a[c][b]}}return d};b.prototype.getData=function(){if(this.columns)return this.rowsToColumns(this.columns).slice(1)};b.prototype.parsed=function(){if(this.options.parsed)return this.options.parsed.call(this,this.columns)};b.prototype.getFreeIndexes=function(a,c){var b,d=[],g=[];for(b=0;b<a;b+=
1)d.push(!0);for(a=0;a<c.length;a+=1){var e=c[a].getReferencedColumnIndexes();for(b=0;b<e.length;b+=1)d[e[b]]=!1}for(b=0;b<d.length;b+=1)d[b]&&g.push(b);return g};b.prototype.complete=function(){var a=this.columns,c,b=this.options,d,g,e=[];if(b.complete||b.afterComplete){if(this.firstRowAsNames)for(d=0;d<a.length;d++)a[d].name=a[d].shift();var l=[];var h=this.getFreeIndexes(a.length,this.valueCount.seriesBuilders);for(d=0;d<this.valueCount.seriesBuilders.length;d++){var k=this.valueCount.seriesBuilders[d];
k.populateColumns(h)&&e.push(k)}for(;0<h.length;){k=new G;k.addColumnReader(0,"x");d=h.indexOf(0);-1!==d&&h.splice(d,1);for(d=0;d<this.valueCount.global;d++)k.addColumnReader(void 0,this.valueCount.globalPointArrayMap[d]);k.populateColumns(h)&&e.push(k)}0<e.length&&0<e[0].readers.length&&(k=a[e[0].readers[0].columnIndex],"undefined"!==typeof k&&(k.isDatetime?c="datetime":k.isNumeric||(c="category")));if("category"===c)for(d=0;d<e.length;d++)for(k=e[d],h=0;h<k.readers.length;h++)"x"===k.readers[h].configName&&
(k.readers[h].configName="name");for(d=0;d<e.length;d++){k=e[d];h=[];for(g=0;g<a[0].length;g++)h[g]=k.read(a,g);l[d]={data:h};k.name&&(l[d].name=k.name);"category"===c&&(l[d].turboThreshold=0)}a={series:l};c&&(a.xAxis={type:c},"category"===c&&(a.xAxis.uniqueNames=!1));b.complete&&b.complete(a);b.afterComplete&&b.afterComplete(a)}};b.prototype.update=function(a,b){var c=this.chart;a&&(a.afterComplete=function(a){a&&(a.xAxis&&c.xAxis[0]&&a.xAxis.type===c.xAxis[0].options.type&&delete a.xAxis,c.update(a,
b,!0))},A(!0,c.options.data,a),this.init(c.options.data))};return b}();l.data=function(b,a,c){return new l.Data(b,a,c)};p(b,"init",function(b){var a=this,c=b.args[0]||{},f=b.args[1];c&&c.data&&!a.hasDataDef&&(a.hasDataDef=!0,a.data=new l.Data(D(c.data,{afterComplete:function(b){var d;if(Object.hasOwnProperty.call(c,"series"))if("object"===typeof c.series)for(d=Math.max(c.series.length,b&&b.series?b.series.length:0);d--;){var e=c.series[d]||{};c.series[d]=A(e,b&&b.series?b.series[d]:{})}else delete c.series;
c=A(b,c);a.init(c,f)}}),c,a),b.preventDefault())});var G=function(){function b(){this.readers=[];this.pointIsArray=!0;this.name=void 0}b.prototype.populateColumns=function(a){var b=!0;this.readers.forEach(function(b){"undefined"===typeof b.columnIndex&&(b.columnIndex=a.shift())});this.readers.forEach(function(a){"undefined"===typeof a.columnIndex&&(b=!1)});return b};b.prototype.read=function(a,b){var c=this.pointIsArray,d=c?[]:{};this.readers.forEach(function(e){var f=a[e.columnIndex][b];c?d.push(f):
0<e.configName.indexOf(".")?v.prototype.setNestedProperty(d,f,e.configName):d[e.configName]=f});if("undefined"===typeof this.name&&2<=this.readers.length){var g=this.getReferencedColumnIndexes();2<=g.length&&(g.shift(),g.sort(function(a,b){return a-b}),this.name=a[g.shift()].name)}return d};b.prototype.addColumnReader=function(a,b){this.readers.push({columnIndex:a,configName:b});"x"!==b&&"y"!==b&&"undefined"!==typeof b&&(this.pointIsArray=!1)};b.prototype.getReferencedColumnIndexes=function(){var a,
b=[];for(a=0;a<this.readers.length;a+=1){var f=this.readers[a];"undefined"!==typeof f.columnIndex&&b.push(f.columnIndex)}return b};b.prototype.hasReader=function(a){var b;for(b=0;b<this.readers.length;b+=1){var f=this.readers[b];if(f.configName===a)return!0}};return b}();l.Data=t;return l.Data});v(b,"masters/modules/data.src.js",[],function(){})});
//# sourceMappingURL=data.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+26
View File
@@ -0,0 +1,26 @@
/*
Highstock JS v8.2.0 (2020-08-20)
Data grouping module
(c) 2010-2019 Torstein Hnsi
License: www.highcharts.com/license
*/
(function(d){"object"===typeof module&&module.exports?(d["default"]=d,module.exports=d):"function"===typeof define&&define.amd?define("highcharts/modules/datagrouping",["highcharts"],function(g){d(g);d.Highcharts=g;return d}):d("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(d){function g(d,m,g,D){d.hasOwnProperty(m)||(d[m]=D.apply(null,g))}d=d?d._modules:{};g(d,"Extensions/DataGrouping.js",[d["Core/Axis/DateTimeAxis.js"],d["Core/Globals.js"],d["Core/Options.js"],d["Core/Series/Point.js"],
d["Core/Tooltip.js"],d["Core/Utilities.js"]],function(d,m,g,D,K,f){"";var y=f.addEvent,C=f.arrayMax,L=f.arrayMin,M=f.correctFloat,E=f.defined,N=f.error,O=f.extend,P=f.format,x=f.isNumber,F=f.merge,G=f.pick,B=m.Axis;f=m.Series;var u=m.approximations={sum:function(a){var c=a.length;if(!c&&a.hasNulls)var b=null;else if(c)for(b=0;c--;)b+=a[c];return b},average:function(a){var c=a.length;a=u.sum(a);x(a)&&c&&(a=M(a/c));return a},averages:function(){var a=[];[].forEach.call(arguments,function(c){a.push(u.average(c))});
return"undefined"===typeof a[0]?void 0:a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?C(a):a.hasNulls?null:void 0},low:function(a){return a.length?L(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,c,b,h){a=u.open(a);c=u.high(c);b=u.low(b);h=u.close(h);if(x(a)||x(c)||x(b)||x(h))return[a,c,b,h]},range:function(a,c){a=u.low(a);c=u.high(c);if(x(a)||x(c))return[a,c];if(null===a&&null===
c)return null}},H=function(a,c,b,h){var e=this,d=e.data,v=e.options&&e.options.data,A=[],n=[],f=[],p=a.length,q=!!c,r=[],k=e.pointArrayMap,g=k&&k.length,w=["x"].concat(k||["y"]),m=0,y=0,t;h="function"===typeof h?h:u[h]?u[h]:u[e.getDGApproximation&&e.getDGApproximation()||"average"];g?k.forEach(function(){r.push([])}):r.push([]);var B=g||1;for(t=0;t<=p&&!(a[t]>=b[0]);t++);for(t;t<=p;t++){for(;"undefined"!==typeof b[m+1]&&a[t]>=b[m+1]||t===p;){var l=b[m];e.dataGroupInfo={start:e.cropStart+y,length:r[0].length};
var z=h.apply(e,r);e.pointClass&&!E(e.dataGroupInfo.options)&&(e.dataGroupInfo.options=F(e.pointClass.prototype.optionsToObject.call({series:e},e.options.data[e.cropStart+y])),w.forEach(function(a){delete e.dataGroupInfo.options[a]}));"undefined"!==typeof z&&(A.push(l),n.push(z),f.push(e.dataGroupInfo));y=t;for(l=0;l<B;l++)r[l].length=0,r[l].hasNulls=!1;m+=1;if(t===p)break}if(t===p)break;if(k)for(l=e.cropStart+t,z=d&&d[l]||e.pointClass.prototype.applyOptions.apply({series:e},[v[l]]),l=0;l<g;l++){var C=
z[k[l]];x(C)?r[l].push(C):null===C&&(r[l].hasNulls=!0)}else l=q?c[t]:null,x(l)?r[0].push(l):null===l&&(r[0].hasNulls=!0)}return{groupedXData:A,groupedYData:n,groupMap:f}},I={approximations:u,groupData:H},w=f.prototype,Q=w.processData,R=w.generatePoints,z={groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M",
"%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},J={line:{},spline:{},area:{},areaspline:{},arearange:{},column:{groupPixelWidth:10},columnrange:{groupPixelWidth:10},candlestick:{groupPixelWidth:10},ohlc:{groupPixelWidth:5}},S=m.defaultDataGroupingUnits=[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,
30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]];w.getDGApproximation=function(){return this.is("arearange")?"range":this.is("ohlc")?"ohlc":this.is("column")?"sum":"average"};w.groupData=H;w.processData=function(){var a=this.chart,c=this.options.dataGrouping,b=!1!==this.allowDG&&c&&G(c.enabled,a.options.isStock),h=this.visible||!a.options.chart.ignoreHiddenSeries,e,f=this.currentDataGrouping,v=!1;this.forceCrop=b;this.groupPixelWidth=null;this.hasProcessed=
!0;b&&!this.requireSorting&&(this.requireSorting=v=!0);b=!1===Q.apply(this,arguments)||!b;v&&(this.requireSorting=!1);if(!b){this.destroyGroupedData();b=c.groupAll?this.xData:this.processedXData;var A=c.groupAll?this.yData:this.processedYData,n=a.plotSizeX;a=this.xAxis;var g=a.options.ordinal,p=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(p){this.isDirty=e=!0;this.points=null;v=a.getExtremes();var q=v.min;v=v.max;g=g&&a.ordinal&&a.ordinal.getGroupIntervalFactor(q,v,this)||
1;p=p*(v-q)/n*g;n=a.getTimeTicks(d.AdditionsClass.prototype.normalizeTimeTickInterval(p,c.units||S),Math.min(q,b[0]),Math.max(v,b[b.length-1]),a.options.startOfWeek,b,this.closestPointRange);A=w.groupData.apply(this,[b,A,n,c.approximation]);b=A.groupedXData;g=A.groupedYData;var r=0;if(c.smoothed&&b.length){var k=b.length-1;for(b[k]=Math.min(b[k],v);k--&&0<k;)b[k]+=p/2;b[0]=Math.max(b[0],q)}for(k=1;k<n.length;k++)n.info.segmentStarts&&-1!==n.info.segmentStarts.indexOf(k)||(r=Math.max(n[k]-n[k-1],r));
q=n.info;q.gapSize=r;this.closestPointRange=n.info.totalRange;this.groupMap=A.groupMap;if(E(b[0])&&b[0]<a.min&&h){if(!E(a.options.min)&&a.min<=a.dataMin||a.min===a.dataMin)a.min=Math.min(b[0],a.min);a.dataMin=Math.min(b[0],a.dataMin)}c.groupAll&&(c=this.cropData(b,g,a.min,a.max,1),b=c.xData,g=c.yData);this.processedXData=b;this.processedYData=g}else this.groupMap=null;this.hasGroupedData=e;this.currentDataGrouping=q;this.preventGraphAnimation=(f&&f.totalRange)!==(q&&q.totalRange)}};w.destroyGroupedData=
function(){this.groupedData&&(this.groupedData.forEach(function(a,c){a&&(this.groupedData[c]=a.destroy?a.destroy():null)},this),this.groupedData.length=0)};w.generatePoints=function(){R.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};y(D,"update",function(){if(this.dataGroup)return N(24,!1,this.series.chart),!1});y(K,"headerFormatter",function(a){var c=this.chart,b=c.time,h=a.labelConfig,e=h.series,d=e.tooltipOptions,g=e.options.dataGrouping,f=d.xDateFormat,
n=e.xAxis,m=d[(a.isFooter?"footer":"header")+"Format"];if(n&&"datetime"===n.options.type&&g&&x(h.key)){var p=e.currentDataGrouping;g=g.dateTimeLabelFormats||z.dateTimeLabelFormats;if(p)if(d=g[p.unitName],1===p.count)f=d[0];else{f=d[1];var q=d[2]}else!f&&g&&(f=this.getXDateFormat(h,d,n));f=b.dateFormat(f,h.key);q&&(f+=b.dateFormat(q,h.key+p.totalRange-1));e.chart.styledMode&&(m=this.styledModeFormat(m));a.text=P(m,{point:O(h.point,{key:f}),series:e},c);a.preventDefault()}});y(f,"destroy",w.destroyGroupedData);
y(f,"afterSetOptions",function(a){a=a.options;var c=this.type,b=this.chart.options.plotOptions,d=g.defaultOptions.plotOptions[c].dataGrouping,e=this.useCommonDataGrouping&&z;if(J[c]||e)d||(d=F(z,J[c])),a.dataGrouping=F(e,d,b.series&&b.series.dataGrouping,b[c].dataGrouping,this.userOptions.dataGrouping)});y(B,"afterSetScale",function(){this.series.forEach(function(a){a.hasProcessed=!1})});B.prototype.getGroupPixelWidth=function(){var a=this.series,c=a.length,b,d=0,e=!1,f;for(b=c;b--;)(f=a[b].options.dataGrouping)&&
(d=Math.max(d,G(f.groupPixelWidth,z.groupPixelWidth)));for(b=c;b--;)(f=a[b].options.dataGrouping)&&a[b].hasProcessed&&(c=(a[b].processedXData||a[b].data).length,a[b].groupPixelWidth||c>this.chart.plotSizeX/d||c&&f.forced)&&(e=!0);return e?d:0};B.prototype.setDataGrouping=function(a,c){var b;c=G(c,!0);a||(a={forced:!1,units:null});if(this instanceof B)for(b=this.series.length;b--;)this.series[b].update({dataGrouping:a},!1);else this.chart.options.series.forEach(function(b){b.dataGrouping=a},!1);this.ordinal&&
(this.ordinal.slope=void 0);c&&this.chart.redraw()};m.dataGrouping=I;"";return I});g(d,"masters/modules/datagrouping.src.js",[d["Extensions/DataGrouping.js"]],function(d){return d})});
//# sourceMappingURL=datagrouping.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+30
View File
@@ -0,0 +1,30 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Debugger module
(c) 2012-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/debugger",["highcharts"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,c,b,f){a.hasOwnProperty(c)||(a[c]=f.apply(null,b))}a=a?a._modules:{};b(a,"error-messages.js",[a["Core/Globals.js"]],function(a){a.errorMessages={10:{title:"Can't plot zero or subzero values on a logarithmic axis",
text:'<h1>Can\'t plot zero or subzero values on a logarithmic axis</h1><p>This error occurs in the following situations: </p><ul><li>If a zero or subzero data value is added to a logarithmic axis</li><li>If the minimum of a logarithimic axis is set to 0 or less</li><li>If the threshold is set to 0 or less</li></ul><p>Note: As of Highcharts 5.0.8 it\'s possible to bypass this error message by setting <code>Axis.prototype.allowNegativeLog</code> to true, and add custom conversion functions. <a href="https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/yaxis/type-log-negative/">View live demo</a>. It is also possible to use a similar workaround for colorAxis. <a href="https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/coloraxis/logarithmic-with-emulate-negative-values/">View live demo</a>.</p>',
enduser:'<h1>Can\'t plot zero or subzero values on a logarithmic axis</h1><p>This error occurs in the following situations:</p><ul><li>If a zero or subzero data value is added to a logarithmic axis</li><li>If the minimum of a logarithimic axis is set to 0 or less</li><li>If the threshold is set to 0 or less</li></ul><p>As of Highcharts 5.0.8 it\'s possible to bypass this error message by setting <code>Axis.prototype.allowNegativeLog</code> to <code>true</code> and add custom conversion functions. <a href="http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/yaxis/type-log-negative/">">View Live Demo</a>. It is also possible to use a similar workaround for colorAxis. <a href="https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/coloraxis/logarithmic-with-emulate-negative-values/">View live demo</a>.</p>'},
11:{title:"Can't link axes of different type",text:"<h1>Can't link axes of different type</h1><p>This error occurs when using the <code>linkedTo</code> option to link two axes of different types, for example a logarithmic axis to a linear axis. Highcharts can't link these because the calculation of ticks, extremes, padding etc. is different.</p>"},12:{title:"Highcharts expects point configuration to be numbers or arrays in turbo mode",text:'<h1>Highcharts expects point configuration to be numbers or arrays in turbo mode</h1><p>This error occurs if the <code>series.data</code> option contains object configurations and the number of points exceeds the turboThreshold. It can be fixed by either setting <code>turboThreshold</code> to a higher value, or changing the point configurations to numbers or arrays.</p><p>In boost mode, turbo mode is always on, which means only array of numbers or two dimensional arrays are allowed.</p><p>See <a href="https://api.highcharts.com/highcharts#plotOptions.series.turboThreshold">plotOptions.series.turboThreshold</a></p>'},
13:{title:"Rendering div not found",text:'<h1>Rendering div not found</h1><p>This error occurs if the <a href="https://api.highcharts.com/highcharts#chart.renderTo">chart.renderTo</a> option is misconfigured so that Highcharts is unable to find the HTML element to render the chart in.</p><p>If using a DOM ID when creating the chart, make sure a node with the same ID exists somewhere in the DOM.</p>'},14:{title:"String value sent to series.data, expected Number",text:"<h1>String value sent to series.data, expected Number</h1><p>This happens if using a string as a data point, for example in a setup like this: </p><pre>series: [{\n data: [&quot;3&quot;, &quot;5&quot;, &quot;1&quot;, &quot;6&quot;]\n}]</pre><p>Highcharts expects numerical data values.</p><p>The most common reason for this error this is that data is parsed from CSV or from a XML source, and the implementer forgot to run <code>parseFloat</code> on the parsed value.</p><p>Note: For performance reasons internal type casting is not performed, and only the first value is checked (since 2.3).</p>"},
15:{title:"Highcharts expects data to be sorted",text:"<h1>Highcharts expects data to be sorted</h1><p>This happens when creating a line series or a stock chart where the data is not sorted in ascending X order.</p><p>For performance reasons, Highcharts does not sort the data, instead it requires that the implementer pre-sorts the data.</p>"},16:{title:"Highcharts already defined in the page",text:"<h1>Highcharts already defined in the page</h1><p>This error happens if the <code>Highcharts</code> namespace already exists when loading Highcharts or Highstock.</p><p>This is caused by including Highcharts or Highstock more than once.</p><p>Keep in mind that the <code>Highcharts.Chart</code> constructor and all features of Highcharts are included in Highstock, so if using the <code>Chart</code> and <code>StockChart</code> constructors in combination, only the <code>highstock.js</code> file is required.</p>"},
17:{title:"The requested series type does not exist",text:"<h1>The requested series type does not exist</h1><p>This error happens when setting <code>chart.type</code> or <code>series.type</code> to a series type that isn't defined in Highcharts. A typical reason may be that the module or extension where the series type is defined isn't included.</p><p>For example in order to create an <code>arearange</code> series, the <code>highcharts-more.js</code> file must be loaded.</p>"},18:{title:"The requested axis does not exist",
text:"<h1>The requested axis does not exist</h1><p>This error happens when setting a series' <code>xAxis</code> or <code>yAxis</code> property to point to an axis that does not exist.</p>"},19:{title:"Too many ticks",text:"<h1>Too many ticks</h1><p>This error happens when applying too many ticks to an axis, specifically when adding more ticks than the axis pixel length.</p><p>With default value this won't happen, but there are edge cases, for example when setting axis categories and <code>xAxis.labels.step</code> in combination with a long data range, when the axis is instructed to create a great number of ticks.</p>"},
20:{title:"Can't add object point configuration to a long data series",text:"<h1>Can't add object point configuration to a long data series</h1><p>In Highstock, when trying to add a point using the object literal configuration syntax, it will only work when the number of data points is below the series' <a href=\"https://api.highcharts.com/highstock#plotOptions.series.turboThreshold\">turboThreshold</a>. Instead of the object syntax, use the Array syntax.</p>"},21:{title:"Can't find Proj4js library",
text:'<h1>Can\'t find Proj4js library</h1><p>Using latitude/longitude functionality in Highmaps requires the <a href="http://proj4js.org">Proj4js</a> library to be loaded.</p>'},22:{title:"Map does not support latitude/longitude",text:'<h1>Map does not support latitude/longitude</h1><p>The loaded map does not support latitude/longitude functionality. This is only supported with maps from the <a href="https://code.highcharts.com/mapdata">official Highmaps map collection</a> from version 1.1.0 onwards. If you are using a custom map, consider using the <a href="https://proj4js.org">Proj4js</a> library to convert between projections.</p>'},
23:{title:"Unsupported color format used for color interpolation",text:"<h1>Unsupported color format used for color interpolation</h1><p>Highcharts supports three color formats primarily: hex (<code>#FFFFFF</code>), rgb (<code>rgba(255,255,255)</code>) and rgba (<code>rgba(255,255,255,1)</code>). If any other format, like 3-digit colors (<code>#FFF</code>), named colors (<code>white</code>) or gradient structures are used in for example a heatmap, Highcharts will fail to interpolate and will instead use the end-color with no interpolation applied.</p><p>We've chosen to preserve this limitation in order to keep the weight of the implementation at a minimum.</p>"},
24:{title:"Cannot run Point.update on a grouped point",text:"<h1>Cannot run Point.update on a grouped point</h1><p>Running <code>Point.update</code> in Highstock when a point is grouped by data grouping is not supported.</p><p>This is not supported because when data grouping is enabled, there won't be any references to the raw points, which is required by the <code>Point.update</code> function.</p>"},25:{title:"Can't find Moment.js library",text:'<h1>Can\'t find Moment.js library</h1><p>Using the global.timezone option requires the <a href="https://momentjs.com/">Moment.js</a> library to be loaded.</p>'},
26:{title:"WebGL not supported, and no fallback module included",text:"<h1>WebGL not supported, and no fallback module included</h1><p>This happens when the browser doesn't support WebGL,<b>and</b> the canvas fallback module (<code>boost-canvas.js</code>) hasn't been included OR if the fallback module was included<b>after</b> the boost module.</p><p>If a fallback is required, make sure to include <code>boost-canvas.js</code>, and that it's included before <code>boost.js</code>.</p><p>Please note that the fallback module is not intended as a fully-featured one. Rather, it's a minimal implementation of the WebGL counterpart.</p>"},
27:{title:"This browser does not support SVG",text:"<h1>This browser does not support SVG</h1><p>This happens in old IE when the <code>oldie.js</code> module isn't loaded.</p><p>If compatibility with IE versions 6, 7 and 8 is required, add the module after loading <code>highcharts.js</code>. In a website context, it's a good idea to load it in a conditional comment to avoid traffic overhead and dead code in modern browsers: </p><pre>&lt;!--[if lt IE 9]&gt;\n &lt;script src='https://code.highcharts.com/modules/oldie.js'&gt;&lt;/script&gt;\n&lt;![endif]--&gt;</pre>"},
28:{title:"Fallback to export server disabled",text:'<h1>Fallback to export server disabled</h1><p>This happens when the offline export module encounters a chart that it can\'t export successfully, and the fallback to the online export server is disabled. The offline exporting module will fail for certain browsers, and certain features (e.g. <a href="https://api.highcharts.com/highcharts/exporting.allowHTML">exporting.allowHTML</a> ), depending on the type of image exporting to. For a compatibility overview, see <a href="https://www.highcharts.com/docs/export-module/client-side-export">Client Side Export</a>.</p><p>For very complex charts, it\'s possible that exporting fail in browsers that don\'t support Blob objects, due to data URL length limits. It\'s always recommended to define the <a href="https://api.highcharts.com/highcharts/exporting.error">exporting.error</a> callback when disabling the fallback, so that details can be provided to the end-user if offline export isn\'t working for them.</p>'},
29:{title:"Browser does not support WebAudio",text:"<h1>Browser does not support WebAudio</h1><p>This happens when you attempt to use the sonification module on a chart in a browser or environment that does not support the WebAudio API. This API is supported on all modern browsers, including Microsoft Edge, Google Chrome and Mozilla Firefox.</p>"},30:{title:"Invalid instrument",text:"<h1>Invalid instrument</h1><p>This happens when you try to use a sonification instrument that is not valid. If you are using a predefined instrument, make sure your spelling is correct.</p>"},
31:{title:"Non-unique point or node id",text:"<h1>Non-unique point or node id</h1><p>This error occurs when using the same <code>id</code> for two or more points or nodes.</p>"},32:{title:"Deprecated function or property",text:'<h1>Deprecated function or property</h1><p>This error occurs when using a deprecated function or property. Consult the <a href="https://api.highcharts.com/">API documentation</a> for alternatives, if no replacement is mentioned by the error itself.</p>'},meta:{files:"errors/10/readme.md errors/10/enduser.md errors/11/readme.md errors/12/readme.md errors/13/readme.md errors/14/readme.md errors/15/readme.md errors/16/readme.md errors/17/readme.md errors/18/readme.md errors/19/readme.md errors/20/readme.md errors/21/readme.md errors/22/readme.md errors/23/readme.md errors/24/readme.md errors/25/readme.md errors/26/readme.md errors/27/readme.md errors/28/readme.md errors/29/readme.md errors/30/readme.md errors/31/readme.md errors/32/readme.md".split(" ")}}});
b(a,"Extensions/Debugger.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,b){var c=b.addEvent,f=b.isNumber;b=b.setOptions;b({chart:{displayErrors:!0}});c(a.Chart,"displayError",function(b){var d=b.code,e=this.options.chart;b=this.renderer;this.errorElements&&this.errorElements.forEach(function(a){a&&a.destroy()});if(e&&e.displayErrors&&b){this.errorElements=[];d=f(d)?"Highcharts error #"+d+": "+a.errorMessages[d].text:d;e=this.chartWidth;var c=this.chartHeight;d=d.replace(/<h1>(.*)<\/h1>/g,
'<br><span style="font-size: 24px">$1</span><br>').replace(/<\/p>/g,"</p><br>");this.errorElements[0]=b.rect(2,2,e-4,c-4).attr({"stroke-width":4,stroke:"#ff0000",zIndex:3}).add();this.errorElements[1]=b.label(d,0,0,"rect",void 0,void 0,void 0,void 0,"debugger").css({color:"#ffffff",width:e-16+"px",padding:0}).attr({fill:"rgba(255, 0, 0, 0.9)",width:e,padding:8,zIndex:10}).add();this.errorElements[1].attr({y:c-this.errorElements[1].getBBox().height})}});c(a.Chart,"beforeRedraw",function(){var a=this.errorElements;
a&&a.length&&a.forEach(function(a){a.destroy()});this.errorElements=null})});b(a,"masters/modules/debugger.src.js",[],function(){})});
//# sourceMappingURL=debugger.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"debugger.js.map","lineCount":29,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,6BAAP,CAAsC,CAAC,YAAD,CAAtC,CAAsD,QAAS,CAACE,CAAD,CAAa,CACxEL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAHiE,CAA5E,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC,QAAS,CAACD,CAAD,CAAa,CAEpBE,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAkBC,CAAlB,CAAsB,CACrCH,CAAAI,eAAA,CAAmBH,CAAnB,CAAL,GACID,CAAA,CAAIC,CAAJ,CADJ,CACgBE,CAAAE,MAAA,CAAS,IAAT,CAAeH,CAAf,CADhB,CAD0C,CAD1CI,CAAAA,CAAWT,CAAA,CAAaA,CAAAS,SAAb,CAAmC,EAMlDP,EAAA,CAAgBO,CAAhB,CAA0B,mBAA1B,CAA+C,CAACA,CAAA,CAAS,iBAAT,CAAD,CAA/C,CAA8E,QAAS,CAACC,CAAD,CAAI,CAcvFA,CAAAC,cAAA,CAAkB,CACd,GAAM,CACF,MAAS,yDADP;AAEF,KAAQ,m2BAFN;AAGF,QAAW,y2BAHT,CADQ;AAMd,GAAM,CACF,MAAS,mCADP,CAEF,KAAQ,ySAFN,CANQ,CAUd,GAAM,CACF,MAAS,8EADP,CAEF,KAAQ,+mBAFN,CAVQ;AAcd,GAAM,CACF,MAAS,yBADP,CAEF,KAAQ,yWAFN,CAdQ,CAkBd,GAAM,CACF,MAAS,mDADP,CAEF,KAAQ,ylBAFN,CAlBQ;AAsBd,GAAM,CACF,MAAS,sCADP,CAEF,KAAQ,iSAFN,CAtBQ,CA0Bd,GAAM,CACF,MAAS,wCADP,CAEF,KAAQ,mgBAFN,CA1BQ;AA8Bd,GAAM,CACF,MAAS,0CADP,CAEF,KAAQ,saAFN,CA9BQ,CAkCd,GAAM,CACF,MAAS,mCADP;AAEF,KAAQ,uLAFN,CAlCQ,CAsCd,GAAM,CACF,MAAS,gBADP,CAEF,KAAQ,mZAFN,CAtCQ;AA0Cd,GAAM,CACF,MAAS,4DADP,CAEF,KAAQ,oYAFN,CA1CQ,CA8Cd,GAAM,CACF,MAAS,4BADP;AAEF,KAAQ,2KAFN,CA9CQ,CAkDd,GAAM,CACF,MAAS,yCADP,CAEF,KAAQ,uZAFN,CAlDQ;AAsDd,GAAM,CACF,MAAS,uDADP,CAEF,KAAQ,slBAFN,CAtDQ;AA0Dd,GAAM,CACF,MAAS,4CADP,CAEF,KAAQ,sVAFN,CA1DQ,CA8Dd,GAAM,CACF,MAAS,8BADP,CAEF,KAAQ,gKAFN,CA9DQ;AAkEd,GAAM,CACF,MAAS,sDADP,CAEF,KAAQ,qjBAFN,CAlEQ;AAsEd,GAAM,CACF,MAAS,mCADP,CAEF,KAAQ,0gBAFN,CAtEQ;AA0Ed,GAAM,CACF,MAAS,oCADP,CAEF,KAAQ,o8BAFN,CA1EQ;AA8Ed,GAAM,CACF,MAAS,mCADP,CAEF,KAAQ,ySAFN,CA9EQ,CAkFd,GAAM,CACF,MAAS,oBADP,CAEF,KAAQ,+LAFN,CAlFQ;AAsFd,GAAM,CACF,MAAS,6BADP,CAEF,KAAQ,mIAFN,CAtFQ,CA0Fd,GAAM,CACF,MAAS,iCADP,CAEF,KAAQ,8PAFN,CA1FQ,CA8Fd,KAAQ,CACJ,MAAS,keAAA,MAAA,CAAA,GAAA,CADL,CA9FM,CAdqE,CAA3F,CA2IAT;CAAA,CAAgBO,CAAhB,CAA0B,wBAA1B,CAAoD,CAACA,CAAA,CAAS,iBAAT,CAAD,CAA8BA,CAAA,CAAS,mBAAT,CAA9B,CAApD,CAAkH,QAAS,CAACC,CAAD,CAAIE,CAAJ,CAAO,CAAA,IAU1HC,EAAWD,CAAAC,SAV+G,CAW1HC,EAAWF,CAAAE,SACXC,EAAAA,CAAaH,CAAAG,WACjBA,EAAA,CAAW,CAIPC,MAAO,CAWHC,cAAe,CAAA,CAXZ,CAJA,CAAX,CAmBAJ,EAAA,CAASH,CAAAQ,MAAT,CAAkB,cAAlB,CAAkC,QAAS,CAACC,CAAD,CAAI,CAAA,IAEvCC,EAAOD,CAAAC,KAFgC,CAIvCC,EAHQL,IAGEK,QAAAL,MACVM,EAAAA,CAJQN,IAIGM,SAJHN,KAORO,cAAJ,EAPYP,IAQPO,cAADC,QAAA,CAA8B,QAAS,CAACC,CAAD,CAAK,CACpCA,CAAJ,EACIA,CAAAC,QAAA,EAFoC,CAA5C,CAMJ,IAAIL,CAAJ,EAAeA,CAAAJ,cAAf,EAAwCK,CAAxC,CAAkD,CAdtCN,IAeRO,cAAA,CAAsB,EACtBI,EAAA,CAAMb,CAAA,CAASM,CAAT,CAAA,CACD,oBADC,CACsBA,CADtB,CAC6B,IAD7B,CAEEV,CAAAC,cAAA,CAAgBS,CAAhB,CAAAQ,KAFF,CAGFR,CACJS,EAAA,CApBQb,IAoBKa,WACb,KAAAC,EArBQd,IAqBMc,YAEdH,EAAA,CAAMA,CAAAI,QAAA,CACO,iBADP;AAC0B,iDAD1B,CAAAA,QAAA,CAEO,QAFP,CAEiB,UAFjB,CAvBEf,KA2BRO,cAAA,CAAoB,CAApB,CAAA,CAAyBD,CAAAU,KAAA,CAAc,CAAd,CAAiB,CAAjB,CAAoBH,CAApB,CAAiC,CAAjC,CAAoCC,CAApC,CAAkD,CAAlD,CAAAG,KAAA,CAA0D,CAC/E,eAAgB,CAD+D,CAE/EC,OAAQ,SAFuE,CAG/EC,OAAQ,CAHuE,CAA1D,CAAAC,IAAA,EA3BjBpB,KAiCRO,cAAA,CAAoB,CAApB,CAAA,CAAyBD,CAAAe,MAAA,CAAeV,CAAf,CAAoB,CAApB,CAAuB,CAAvB,CAA0B,MAA1B,CAAkC,IAAK,EAAvC,CAA0C,IAAK,EAA/C,CAAkD,IAAK,EAAvD,CAA0D,IAAK,EAA/D,CAAkE,UAAlE,CAAAW,IAAA,CAAkF,CACvGC,MAAO,SADgG,CAEvGC,MAAQX,CAARW,CAAqB,EAArBA,CAA2B,IAF4E,CAGvGC,QAAS,CAH8F,CAAlF,CAAAR,KAAA,CAIjB,CACJS,KAAM,sBADF,CAEJF,MAAOX,CAFH,CAGJY,QAAS,CAHL,CAIJN,OAAQ,EAJJ,CAJiB,CAAAC,IAAA,EAjCjBpB,KA2CRO,cAAA,CAAoB,CAApB,CAAAU,KAAA,CAA4B,CACxBU,EAAGb,CAAHa,CAAiB,IAAApB,cAAA,CAAmB,CAAnB,CAAAqB,QAAA,EAAAC,OADO,CAA5B,CA7B8C,CAfP,CAA/C,CAiDAhC,EAAA,CAASH,CAAAQ,MAAT,CAAkB,cAAlB,CAAkC,QAAS,EAAG,CAC1C,IAAIK,EAAgB,IAAAA,cAChBA;CAAJ,EAAqBA,CAAAuB,OAArB,EACIvB,CAAAC,QAAA,CAAsB,QAAS,CAACC,CAAD,CAAK,CAChCA,CAAAC,QAAA,EADgC,CAApC,CAIJ,KAAAH,cAAA,CAAqB,IAPqB,CAA9C,CAjF8H,CAAlI,CA4FArB,EAAA,CAAgBO,CAAhB,CAA0B,iCAA1B,CAA6D,EAA7D,CAAiE,QAAS,EAAG,EAA7E,CA9OoB,CAbvB;","sources":["debugger.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","H","errorMessages","U","addEvent","isNumber","setOptions","chart","displayErrors","Chart","e","code","options","renderer","errorElements","forEach","el","destroy","msg","text","chartWidth","chartHeight","replace","rect","attr","stroke","zIndex","add","label","css","color","width","padding","fill","y","getBBox","height","length"]}
+268
View File
@@ -0,0 +1,268 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Debugger module
*
* (c) 2012-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/debugger', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'error-messages.js', [_modules['Core/Globals.js']], function (H) {
/* eslint-disable */
/* *
* Error information for the debugger module
* (c) 2010-2019 Torstein Honsi
* License: www.highcharts.com/license
*/
// DO NOT EDIT!
// Automatically generated by ./tools/error-messages.js
// Sources can be found in ./errors/*/*.md
H.errorMessages = {
"10": {
"title": "Can't plot zero or subzero values on a logarithmic axis",
"text": "<h1>Can't plot zero or subzero values on a logarithmic axis</h1><p>This error occurs in the following situations: </p><ul><li>If a zero or subzero data value is added to a logarithmic axis</li><li>If the minimum of a logarithimic axis is set to 0 or less</li><li>If the threshold is set to 0 or less</li></ul><p>Note: As of Highcharts 5.0.8 it's possible to bypass this error message by setting <code>Axis.prototype.allowNegativeLog</code> to true, and add custom conversion functions. <a href=\"https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/yaxis/type-log-negative/\">View live demo</a>. It is also possible to use a similar workaround for colorAxis. <a href=\"https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/coloraxis/logarithmic-with-emulate-negative-values/\">View live demo</a>.</p>",
"enduser": "<h1>Can't plot zero or subzero values on a logarithmic axis</h1><p>This error occurs in the following situations:</p><ul><li>If a zero or subzero data value is added to a logarithmic axis</li><li>If the minimum of a logarithimic axis is set to 0 or less</li><li>If the threshold is set to 0 or less</li></ul><p>As of Highcharts 5.0.8 it's possible to bypass this error message by setting <code>Axis.prototype.allowNegativeLog</code> to <code>true</code> and add custom conversion functions. <a href=\"http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/yaxis/type-log-negative/\">\">View Live Demo</a>. It is also possible to use a similar workaround for colorAxis. <a href=\"https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/coloraxis/logarithmic-with-emulate-negative-values/\">View live demo</a>.</p>"
},
"11": {
"title": "Can't link axes of different type",
"text": "<h1>Can't link axes of different type</h1><p>This error occurs when using the <code>linkedTo</code> option to link two axes of different types, for example a logarithmic axis to a linear axis. Highcharts can't link these because the calculation of ticks, extremes, padding etc. is different.</p>"
},
"12": {
"title": "Highcharts expects point configuration to be numbers or arrays in turbo mode",
"text": "<h1>Highcharts expects point configuration to be numbers or arrays in turbo mode</h1><p>This error occurs if the <code>series.data</code> option contains object configurations and the number of points exceeds the turboThreshold. It can be fixed by either setting <code>turboThreshold</code> to a higher value, or changing the point configurations to numbers or arrays.</p><p>In boost mode, turbo mode is always on, which means only array of numbers or two dimensional arrays are allowed.</p><p>See <a href=\"https://api.highcharts.com/highcharts#plotOptions.series.turboThreshold\">plotOptions.series.turboThreshold</a></p>"
},
"13": {
"title": "Rendering div not found",
"text": "<h1>Rendering div not found</h1><p>This error occurs if the <a href=\"https://api.highcharts.com/highcharts#chart.renderTo\">chart.renderTo</a> option is misconfigured so that Highcharts is unable to find the HTML element to render the chart in.</p><p>If using a DOM ID when creating the chart, make sure a node with the same ID exists somewhere in the DOM.</p>"
},
"14": {
"title": "String value sent to series.data, expected Number",
"text": "<h1>String value sent to series.data, expected Number</h1><p>This happens if using a string as a data point, for example in a setup like this: </p><pre>series: [{\n data: [&quot;3&quot;, &quot;5&quot;, &quot;1&quot;, &quot;6&quot;]\n}]</pre><p>Highcharts expects numerical data values.</p><p>The most common reason for this error this is that data is parsed from CSV or from a XML source, and the implementer forgot to run <code>parseFloat</code> on the parsed value.</p><p>Note: For performance reasons internal type casting is not performed, and only the first value is checked (since 2.3).</p>"
},
"15": {
"title": "Highcharts expects data to be sorted",
"text": "<h1>Highcharts expects data to be sorted</h1><p>This happens when creating a line series or a stock chart where the data is not sorted in ascending X order.</p><p>For performance reasons, Highcharts does not sort the data, instead it requires that the implementer pre-sorts the data.</p>"
},
"16": {
"title": "Highcharts already defined in the page",
"text": "<h1>Highcharts already defined in the page</h1><p>This error happens if the <code>Highcharts</code> namespace already exists when loading Highcharts or Highstock.</p><p>This is caused by including Highcharts or Highstock more than once.</p><p>Keep in mind that the <code>Highcharts.Chart</code> constructor and all features of Highcharts are included in Highstock, so if using the <code>Chart</code> and <code>StockChart</code> constructors in combination, only the <code>highstock.js</code> file is required.</p>"
},
"17": {
"title": "The requested series type does not exist",
"text": "<h1>The requested series type does not exist</h1><p>This error happens when setting <code>chart.type</code> or <code>series.type</code> to a series type that isn't defined in Highcharts. A typical reason may be that the module or extension where the series type is defined isn't included.</p><p>For example in order to create an <code>arearange</code> series, the <code>highcharts-more.js</code> file must be loaded.</p>"
},
"18": {
"title": "The requested axis does not exist",
"text": "<h1>The requested axis does not exist</h1><p>This error happens when setting a series' <code>xAxis</code> or <code>yAxis</code> property to point to an axis that does not exist.</p>"
},
"19": {
"title": "Too many ticks",
"text": "<h1>Too many ticks</h1><p>This error happens when applying too many ticks to an axis, specifically when adding more ticks than the axis pixel length.</p><p>With default value this won't happen, but there are edge cases, for example when setting axis categories and <code>xAxis.labels.step</code> in combination with a long data range, when the axis is instructed to create a great number of ticks.</p>"
},
"20": {
"title": "Can't add object point configuration to a long data series",
"text": "<h1>Can't add object point configuration to a long data series</h1><p>In Highstock, when trying to add a point using the object literal configuration syntax, it will only work when the number of data points is below the series' <a href=\"https://api.highcharts.com/highstock#plotOptions.series.turboThreshold\">turboThreshold</a>. Instead of the object syntax, use the Array syntax.</p>"
},
"21": {
"title": "Can't find Proj4js library",
"text": "<h1>Can't find Proj4js library</h1><p>Using latitude/longitude functionality in Highmaps requires the <a href=\"http://proj4js.org\">Proj4js</a> library to be loaded.</p>"
},
"22": {
"title": "Map does not support latitude/longitude",
"text": "<h1>Map does not support latitude/longitude</h1><p>The loaded map does not support latitude/longitude functionality. This is only supported with maps from the <a href=\"https://code.highcharts.com/mapdata\">official Highmaps map collection</a> from version 1.1.0 onwards. If you are using a custom map, consider using the <a href=\"https://proj4js.org\">Proj4js</a> library to convert between projections.</p>"
},
"23": {
"title": "Unsupported color format used for color interpolation",
"text": "<h1>Unsupported color format used for color interpolation</h1><p>Highcharts supports three color formats primarily: hex (<code>#FFFFFF</code>), rgb (<code>rgba(255,255,255)</code>) and rgba (<code>rgba(255,255,255,1)</code>). If any other format, like 3-digit colors (<code>#FFF</code>), named colors (<code>white</code>) or gradient structures are used in for example a heatmap, Highcharts will fail to interpolate and will instead use the end-color with no interpolation applied.</p><p>We've chosen to preserve this limitation in order to keep the weight of the implementation at a minimum.</p>"
},
"24": {
"title": "Cannot run Point.update on a grouped point",
"text": "<h1>Cannot run Point.update on a grouped point</h1><p>Running <code>Point.update</code> in Highstock when a point is grouped by data grouping is not supported.</p><p>This is not supported because when data grouping is enabled, there won't be any references to the raw points, which is required by the <code>Point.update</code> function.</p>"
},
"25": {
"title": "Can't find Moment.js library",
"text": "<h1>Can't find Moment.js library</h1><p>Using the global.timezone option requires the <a href=\"https://momentjs.com/\">Moment.js</a> library to be loaded.</p>"
},
"26": {
"title": "WebGL not supported, and no fallback module included",
"text": "<h1>WebGL not supported, and no fallback module included</h1><p>This happens when the browser doesn't support WebGL,<b>and</b> the canvas fallback module (<code>boost-canvas.js</code>) hasn't been included OR if the fallback module was included<b>after</b> the boost module.</p><p>If a fallback is required, make sure to include <code>boost-canvas.js</code>, and that it's included before <code>boost.js</code>.</p><p>Please note that the fallback module is not intended as a fully-featured one. Rather, it's a minimal implementation of the WebGL counterpart.</p>"
},
"27": {
"title": "This browser does not support SVG",
"text": "<h1>This browser does not support SVG</h1><p>This happens in old IE when the <code>oldie.js</code> module isn't loaded.</p><p>If compatibility with IE versions 6, 7 and 8 is required, add the module after loading <code>highcharts.js</code>. In a website context, it's a good idea to load it in a conditional comment to avoid traffic overhead and dead code in modern browsers: </p><pre>&lt;!--[if lt IE 9]&gt;\n &lt;script src='https://code.highcharts.com/modules/oldie.js'&gt;&lt;/script&gt;\n&lt;![endif]--&gt;</pre>"
},
"28": {
"title": "Fallback to export server disabled",
"text": "<h1>Fallback to export server disabled</h1><p>This happens when the offline export module encounters a chart that it can't export successfully, and the fallback to the online export server is disabled. The offline exporting module will fail for certain browsers, and certain features (e.g. <a href=\"https://api.highcharts.com/highcharts/exporting.allowHTML\">exporting.allowHTML</a> ), depending on the type of image exporting to. For a compatibility overview, see <a href=\"https://www.highcharts.com/docs/export-module/client-side-export\">Client Side Export</a>.</p><p>For very complex charts, it's possible that exporting fail in browsers that don't support Blob objects, due to data URL length limits. It's always recommended to define the <a href=\"https://api.highcharts.com/highcharts/exporting.error\">exporting.error</a> callback when disabling the fallback, so that details can be provided to the end-user if offline export isn't working for them.</p>"
},
"29": {
"title": "Browser does not support WebAudio",
"text": "<h1>Browser does not support WebAudio</h1><p>This happens when you attempt to use the sonification module on a chart in a browser or environment that does not support the WebAudio API. This API is supported on all modern browsers, including Microsoft Edge, Google Chrome and Mozilla Firefox.</p>"
},
"30": {
"title": "Invalid instrument",
"text": "<h1>Invalid instrument</h1><p>This happens when you try to use a sonification instrument that is not valid. If you are using a predefined instrument, make sure your spelling is correct.</p>"
},
"31": {
"title": "Non-unique point or node id",
"text": "<h1>Non-unique point or node id</h1><p>This error occurs when using the same <code>id</code> for two or more points or nodes.</p>"
},
"32": {
"title": "Deprecated function or property",
"text": "<h1>Deprecated function or property</h1><p>This error occurs when using a deprecated function or property. Consult the <a href=\"https://api.highcharts.com/\">API documentation</a> for alternatives, if no replacement is mentioned by the error itself.</p>"
},
"meta": {
"files": [
"errors/10/readme.md",
"errors/10/enduser.md",
"errors/11/readme.md",
"errors/12/readme.md",
"errors/13/readme.md",
"errors/14/readme.md",
"errors/15/readme.md",
"errors/16/readme.md",
"errors/17/readme.md",
"errors/18/readme.md",
"errors/19/readme.md",
"errors/20/readme.md",
"errors/21/readme.md",
"errors/22/readme.md",
"errors/23/readme.md",
"errors/24/readme.md",
"errors/25/readme.md",
"errors/26/readme.md",
"errors/27/readme.md",
"errors/28/readme.md",
"errors/29/readme.md",
"errors/30/readme.md",
"errors/31/readme.md",
"errors/32/readme.md"
]
}
};
});
_registerModule(_modules, 'Extensions/Debugger.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {
/* *
*
* (c) 2010-2020 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var addEvent = U.addEvent,
isNumber = U.isNumber,
setOptions = U.setOptions;
setOptions({
/**
* @optionparent chart
*/
chart: {
/**
* Whether to display errors on the chart. When `false`, the errors will
* be shown only in the console.
*
* @sample highcharts/chart/display-errors/
* Show errors on chart
*
* @since 7.0.0
* @requires modules/debugger
*/
displayErrors: true
}
});
/* eslint-disable no-invalid-this */
addEvent(H.Chart, 'displayError', function (e) {
var chart = this,
code = e.code,
msg,
options = chart.options.chart,
renderer = chart.renderer,
chartWidth,
chartHeight;
if (chart.errorElements) {
(chart.errorElements).forEach(function (el) {
if (el) {
el.destroy();
}
});
}
if (options && options.displayErrors && renderer) {
chart.errorElements = [];
msg = isNumber(code) ?
('Highcharts error #' + code + ': ' +
H.errorMessages[code].text) :
code;
chartWidth = chart.chartWidth;
chartHeight = chart.chartHeight;
// Format msg so SVGRenderer can handle it
msg = msg
.replace(/<h1>(.*)<\/h1>/g, '<br><span style="font-size: 24px">$1</span><br>')
.replace(/<\/p>/g, '</p><br>');
// Render red chart frame.
chart.errorElements[0] = renderer.rect(2, 2, chartWidth - 4, chartHeight - 4).attr({
'stroke-width': 4,
stroke: '#ff0000',
zIndex: 3
}).add();
// Render error message
chart.errorElements[1] = renderer.label(msg, 0, 0, 'rect', void 0, void 0, void 0, void 0, 'debugger').css({
color: '#ffffff',
width: (chartWidth - 16) + 'px',
padding: 0
}).attr({
fill: 'rgba(255, 0, 0, 0.9)',
width: chartWidth,
padding: 8,
zIndex: 10
}).add();
chart.errorElements[1].attr({
y: chartHeight - this.errorElements[1].getBBox().height
});
}
});
addEvent(H.Chart, 'beforeRedraw', function () {
var errorElements = this.errorElements;
if (errorElements && errorElements.length) {
errorElements.forEach(function (el) {
el.destroy();
});
}
this.errorElements = null;
});
});
_registerModule(_modules, 'masters/modules/debugger.src.js', [], function () {
});
}));
+17
View File
@@ -0,0 +1,17 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Dependency wheel module
(c) 2010-2018 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/dependency-wheel",["highcharts","highcharts/modules/sankey"],function(d){a(d);a.Highcharts=d;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function d(a,f,d,m){a.hasOwnProperty(f)||(a[f]=m.apply(null,d))}a=a?a._modules:{};d(a,"Series/DependencyWheelSeries.js",[a["Core/Globals.js"],a["Core/Utilities.js"],a["Mixins/Nodes.js"]],
function(a,d,q){var m=d.animObject;d=d.seriesType;var f=a.seriesTypes.sankey.prototype;d("dependencywheel","sankey",{center:[null,null],curveFactor:.6,startAngle:0},{orderNodes:!1,getCenter:a.seriesTypes.pie.prototype.getCenter,createNodeColumns:function(){var a=[this.createNodeColumn()];this.nodes.forEach(function(c){c.column=0;a[0].push(c)});return a},getNodePadding:function(){return this.options.nodePadding/Math.PI},createNode:function(a){var c=f.createNode.call(this,a);c.index=this.nodes.length-
1;c.getSum=function(){return c.linksFrom.concat(c.linksTo).reduce(function(a,c){return a+c.weight},0)};c.offset=function(a){function h(a){return a.fromNode===c?a.toNode:a.fromNode}var p=0,b,g=c.linksFrom.concat(c.linksTo);g.sort(function(a,c){return h(a).index-h(c).index});for(b=0;b<g.length;b++)if(h(g[b]).index>c.index){g=g.slice(0,b).reverse().concat(g.slice(b).reverse());var n=!0;break}n||g.reverse();for(b=0;b<g.length;b++){if(g[b]===a)return p;p+=g[b].weight}};return c},translate:function(){var d=
this.options,c=2*Math.PI/(this.chart.plotHeight+this.getNodePadding()),n=this.getCenter(),h=(d.startAngle-90)*a.deg2rad;f.translate.call(this);this.nodeColumns[0].forEach(function(a){if(a.sum){var b=a.shapeArgs,g=n[0],p=n[1],f=n[2]/2,k=f-d.nodeWidth,l=h+c*b.y;b=h+c*(b.y+b.height);a.angle=l+(b-l)/2;a.shapeType="arc";a.shapeArgs={x:g,y:p,r:f,innerR:k,start:l,end:b};a.dlBox={x:g+Math.cos((l+b)/2)*(f+k)/2,y:p+Math.sin((l+b)/2)*(f+k)/2,width:1,height:1};a.linksFrom.forEach(function(a){if(a.linkBase){var b,
e=a.linkBase.map(function(e,n){e*=c;var f=Math.cos(h+e)*(k+1),l=Math.sin(h+e)*(k+1),m=d.curveFactor;b=Math.abs(a.linkBase[3-n]*c-e);b>Math.PI&&(b=2*Math.PI-b);b*=k;b<k&&(m*=b/k);return{x:g+f,y:p+l,cpX:g+(1-m)*f,cpY:p+(1-m)*l}});a.shapeArgs={d:[["M",e[0].x,e[0].y],["A",k,k,0,0,1,e[1].x,e[1].y],["C",e[1].cpX,e[1].cpY,e[2].cpX,e[2].cpY,e[2].x,e[2].y],["A",k,k,0,0,1,e[3].x,e[3].y],["C",e[3].cpX,e[3].cpY,e[0].cpX,e[0].cpY,e[0].x,e[0].y]]}}})}})},animate:function(a){if(!a){var c=m(this.options.animation).duration/
2/this.nodes.length;this.nodes.forEach(function(a,h){var d=a.graphic;d&&(d.attr({opacity:0}),setTimeout(function(){d.animate({opacity:1},{duration:c})},c*h))},this);this.points.forEach(function(a){var c=a.graphic;!a.isNode&&c&&c.attr({opacity:0}).animate({opacity:1},this.options.animation)},this)}}},{setState:q.setNodeState,getDataLabelPath:function(a){var c=this.series.chart.renderer,d=this.shapeArgs,h=0>this.angle||this.angle>Math.PI,f=d.start,b=d.end;this.dataLabelPath||(this.dataLabelPath=c.arc({open:!0}).add(a));
this.dataLabelPath.attr({x:d.x,y:d.y,r:d.r+(this.dataLabel.options.distance||0),start:h?f:b,end:h?b:f,clockwise:+h});return this.dataLabelPath},isValid:function(){return!0}});""});d(a,"masters/modules/dependency-wheel.src.js",[],function(){})});
//# sourceMappingURL=dependency-wheel.js.map
File diff suppressed because one or more lines are too long
+393
View File
@@ -0,0 +1,393 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Dependency wheel module
*
* (c) 2010-2018 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/dependency-wheel', ['highcharts', 'highcharts/modules/sankey'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Series/DependencyWheelSeries.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js'], _modules['Mixins/Nodes.js']], function (H, U, NodesMixin) {
/* *
*
* Dependency wheel module
*
* (c) 2018-2020 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var animObject = U.animObject,
seriesType = U.seriesType;
var base = H.seriesTypes.sankey.prototype;
/**
* @private
* @class
* @name Highcharts.seriesTypes.dependencywheel
*
* @augments Highcharts.seriesTypes.sankey
*/
seriesType('dependencywheel', 'sankey',
/**
* A dependency wheel chart is a type of flow diagram, where all nodes are
* laid out in a circle, and the flow between the are drawn as link bands.
*
* @sample highcharts/demo/dependency-wheel/
* Dependency wheel
*
* @extends plotOptions.sankey
* @exclude dataSorting
* @since 7.1.0
* @product highcharts
* @requires modules/dependencywheel
* @optionparent plotOptions.dependencywheel
*/
{
/**
* The center of the wheel relative to the plot area. Can be
* percentages or pixel values. The default behaviour is to
* center the wheel inside the plot area.
*
* @type {Array<number|string|null>}
* @default [null, null]
* @product highcharts
*/
center: [null, null],
curveFactor: 0.6,
/**
* The start angle of the dependency wheel, in degrees where 0 is up.
*/
startAngle: 0
}, {
orderNodes: false,
getCenter: H.seriesTypes.pie.prototype.getCenter,
/* eslint-disable valid-jsdoc */
/**
* Dependency wheel has only one column, it runs along the perimeter.
* @private
*/
createNodeColumns: function () {
var columns = [this.createNodeColumn()];
this.nodes.forEach(function (node) {
node.column = 0;
columns[0].push(node);
});
return columns;
},
/**
* Translate from vertical pixels to perimeter.
* @private
*/
getNodePadding: function () {
return this.options.nodePadding / Math.PI;
},
createNode: function (id) {
var node = base.createNode.call(this,
id);
node.index = this.nodes.length - 1;
/**
* Return the sum of incoming and outgoing links.
* @private
*/
node.getSum = function () {
return node.linksFrom
.concat(node.linksTo)
.reduce(function (acc, link) {
return acc + link.weight;
}, 0);
};
/**
* Get the offset in weight values of a point/link.
* @private
*/
node.offset = function (point) {
var offset = 0,
i,
links = node.linksFrom.concat(node.linksTo),
sliced;
/**
* @private
*/
function otherNode(link) {
if (link.fromNode === node) {
return link.toNode;
}
return link.fromNode;
}
// Sort and slice the links to avoid links going out of each
// node crossing each other.
links.sort(function (a, b) {
return otherNode(a).index - otherNode(b).index;
});
for (i = 0; i < links.length; i++) {
if (otherNode(links[i]).index > node.index) {
links = links.slice(0, i).reverse().concat(links.slice(i).reverse());
sliced = true;
break;
}
}
if (!sliced) {
links.reverse();
}
for (i = 0; i < links.length; i++) {
if (links[i] === point) {
return offset;
}
offset += links[i].weight;
}
};
return node;
},
/**
* @private
* @todo Override the refactored sankey translateLink and translateNode
* functions instead of the whole translate function.
*/
translate: function () {
var options = this.options,
factor = 2 * Math.PI /
(this.chart.plotHeight + this.getNodePadding()),
center = this.getCenter(),
startAngle = (options.startAngle - 90) * H.deg2rad;
base.translate.call(this);
this.nodeColumns[0].forEach(function (node) {
// Don't render the nodes if sum is 0 #12453
if (node.sum) {
var shapeArgs = node.shapeArgs,
centerX = center[0],
centerY = center[1],
r = center[2] / 2,
innerR = r - options.nodeWidth,
start = startAngle + factor * shapeArgs.y,
end = startAngle +
factor * (shapeArgs.y + shapeArgs.height);
// Middle angle
node.angle = start + (end - start) / 2;
node.shapeType = 'arc';
node.shapeArgs = {
x: centerX,
y: centerY,
r: r,
innerR: innerR,
start: start,
end: end
};
node.dlBox = {
x: centerX + Math.cos((start + end) / 2) * (r + innerR) / 2,
y: centerY + Math.sin((start + end) / 2) * (r + innerR) / 2,
width: 1,
height: 1
};
// Draw the links from this node
node.linksFrom.forEach(function (point) {
if (point.linkBase) {
var distance;
var corners = point.linkBase.map(function (top,
i) {
var angle = factor * top,
x = Math.cos(startAngle + angle) * (innerR + 1),
y = Math.sin(startAngle + angle) * (innerR + 1),
curveFactor = options.curveFactor;
// The distance between the from and to node
// along the perimeter. This affect how curved
// the link is, so that links between neighbours
// don't extend too far towards the center.
distance = Math.abs(point.linkBase[3 - i] * factor - angle);
if (distance > Math.PI) {
distance = 2 * Math.PI - distance;
}
distance = distance * innerR;
if (distance < innerR) {
curveFactor *= (distance / innerR);
}
return {
x: centerX + x,
y: centerY + y,
cpX: centerX + (1 - curveFactor) * x,
cpY: centerY + (1 - curveFactor) * y
};
});
point.shapeArgs = {
d: [[
'M',
corners[0].x, corners[0].y
], [
'A',
innerR, innerR,
0,
0,
1,
corners[1].x, corners[1].y
], [
'C',
corners[1].cpX, corners[1].cpY,
corners[2].cpX, corners[2].cpY,
corners[2].x, corners[2].y
], [
'A',
innerR, innerR,
0,
0,
1,
corners[3].x, corners[3].y
], [
'C',
corners[3].cpX, corners[3].cpY,
corners[0].cpX, corners[0].cpY,
corners[0].x, corners[0].y
]]
};
}
});
}
});
},
animate: function (init) {
if (!init) {
var duration = animObject(this.options.animation).duration,
step = (duration / 2) / this.nodes.length;
this.nodes.forEach(function (point, i) {
var graphic = point.graphic;
if (graphic) {
graphic.attr({ opacity: 0 });
setTimeout(function () {
graphic.animate({ opacity: 1 }, { duration: step });
}, step * i);
}
}, this);
this.points.forEach(function (point) {
var graphic = point.graphic;
if (!point.isNode && graphic) {
graphic.attr({ opacity: 0 })
.animate({
opacity: 1
}, this.options.animation);
}
}, this);
}
}
/* eslint-enable valid-jsdoc */
},
// Point class
{
setState: NodesMixin.setNodeState,
/* eslint-disable valid-jsdoc */
/**
* Return a text path that the data label uses.
* @private
*/
getDataLabelPath: function (label) {
var renderer = this.series.chart.renderer,
shapeArgs = this.shapeArgs,
upperHalf = this.angle < 0 || this.angle > Math.PI,
start = shapeArgs.start,
end = shapeArgs.end;
if (!this.dataLabelPath) {
this.dataLabelPath = renderer
.arc({ open: true })
// Add it inside the data label group so it gets destroyed
// with the label
.add(label);
}
this.dataLabelPath.attr({
x: shapeArgs.x,
y: shapeArgs.y,
r: (shapeArgs.r +
(this.dataLabel.options.distance || 0)),
start: (upperHalf ? start : end),
end: (upperHalf ? end : start),
clockwise: +upperHalf
});
return this.dataLabelPath;
},
isValid: function () {
// No null points here
return true;
}
/* eslint-enable valid-jsdoc */
});
/**
* A `dependencywheel` series. If the [type](#series.dependencywheel.type)
* option is not specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.dependencywheel
* @exclude dataSorting
* @product highcharts
* @requires modules/dependencywheel
* @apioption series.dependencywheel
*/
/**
* A collection of options for the individual nodes. The nodes in a dependency
* diagram are auto-generated instances of `Highcharts.Point`, but options can
* be applied here and linked by the `id`.
*
* @extends series.sankey.nodes
* @type {Array<*>}
* @product highcharts
* @excluding offset
* @apioption series.dependencywheel.nodes
*/
/**
* An array of data points for the series. For the `dependencywheel` series
* type, points can be given in the following way:
*
* An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of data
* points exceeds the series' [turboThreshold](#series.area.turboThreshold),
* this option is not available.
*
* ```js
* data: [{
* from: 'Category1',
* to: 'Category2',
* weight: 2
* }, {
* from: 'Category1',
* to: 'Category3',
* weight: 5
* }]
* ```
*
* @type {Array<*>}
* @extends series.sankey.data
* @product highcharts
* @excluding outgoing, dataLabels
* @apioption series.dependencywheel.data
*/
/**
* Individual data label for each node. The options are the same as
* the ones for [series.dependencywheel.dataLabels](#series.dependencywheel.dataLabels).
*
* @apioption series.dependencywheel.nodes.dataLabels
*/
''; // adds doclets above to the transpiled file
});
_registerModule(_modules, 'masters/modules/dependency-wheel.src.js', [], function () {
});
}));
+14
View File
@@ -0,0 +1,14 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Dot plot series type for Highcharts
(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/dotplot",["highcharts"],function(d){a(d);a.Highcharts=d;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function d(a,c,d,p){a.hasOwnProperty(c)||(a[c]=p.apply(null,d))}a=a?a._modules:{};d(a,"Series/DotplotSeries.js",[a["Core/Renderer/SVG/SVGRenderer.js"],a["Core/Utilities.js"]],function(a,c){var d=c.extend,p=c.objectEach,
t=c.pick;c=c.seriesType;c("dotplot","column",{itemPadding:.2,marker:{symbol:"circle",states:{hover:{},select:{}}}},{markerAttribs:void 0,drawPoints:function(){var a=this,c=a.chart.renderer,k=this.options.marker,l=this.yAxis.transA*a.options.itemPadding,m=this.borderWidth%2?.5:1;this.points.forEach(function(b){var e;var f=b.marker||{};var u=f.symbol||k.symbol,x=t(f.radius,k.radius),v="rect"!==u;b.graphics=e=b.graphics||{};var n=b.pointAttr?b.pointAttr[b.selected?"selected":""]||a.pointAttr[""]:a.pointAttribs(b,
b.selected&&"select");delete n.r;a.chart.styledMode&&(delete n.stroke,delete n["stroke-width"]);if(null!==b.y){b.graphic||(b.graphic=c.g("point").add(a.group));var h=b.y;var w=t(b.stackY,b.y);var q=Math.min(b.pointWidth,a.yAxis.transA-l);for(f=w;f>w-b.y;f--){var g=b.barX+(v?b.pointWidth/2-q/2:0);var r=a.yAxis.toPixels(f,!0)+l/2;a.options.crisp&&(g=Math.round(g)-m,r=Math.round(r)+m);g={x:g,y:r,width:Math.round(v?q:b.pointWidth),height:Math.round(q),r:x};e[h]?e[h].animate(g):e[h]=c.symbol(u).attr(d(g,
n)).add(b.graphic);e[h].isActive=!0;h--}}p(e,function(a,b){a.isActive?a.isActive=!1:(a.destroy(),delete a[b])})})}});a.prototype.symbols.rect=function(c,d,k,l,m){return a.prototype.symbols.callout(c,d,k,l,m)}});d(a,"masters/modules/dotplot.src.js",[],function(){})});
//# sourceMappingURL=dotplot.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"dotplot.js.map","lineCount":13,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,4BAAP,CAAqC,CAAC,YAAD,CAArC,CAAqD,QAAS,CAACE,CAAD,CAAa,CACvEL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAHgE,CAA3E,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC,QAAS,CAACD,CAAD,CAAa,CAEpBE,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAkBC,CAAlB,CAAsB,CACrCH,CAAAI,eAAA,CAAmBH,CAAnB,CAAL,GACID,CAAA,CAAIC,CAAJ,CADJ,CACgBE,CAAAE,MAAA,CAAS,IAAT,CAAeH,CAAf,CADhB,CAD0C,CAD1CI,CAAAA,CAAWT,CAAA,CAAaA,CAAAS,SAAb,CAAmC,EAMlDP,EAAA,CAAgBO,CAAhB,CAA0B,yBAA1B,CAAqD,CAACA,CAAA,CAAS,kCAAT,CAAD,CAA+CA,CAAA,CAAS,mBAAT,CAA/C,CAArD,CAAoI,QAAS,CAACC,CAAD,CAAcC,CAAd,CAAiB,CAAA,IAmBtJC,EAASD,CAAAC,OAnB6I,CAoBtJC,EAAaF,CAAAE,WApByI;AAqBtJC,EAAOH,CAAAG,KACPC,EAAAA,CAAaJ,CAAAI,WAQjBA,EAAA,CAAW,SAAX,CAAsB,QAAtB,CAAgC,CAC5BC,YAAa,EADe,CAE5BC,OAAQ,CACJC,OAAQ,QADJ,CAEJC,OAAQ,CACJC,MAAO,EADH,CAEJC,OAAQ,EAFJ,CAFJ,CAFoB,CAAhC,CASG,CACCC,cAAe,IAAK,EADrB,CAECC,WAAYA,QAAS,EAAG,CAAA,IAChBC,EAAS,IADO,CAEhBC,EAAWD,CAAAE,MAAAD,SAFK,CAGhBE,EAAsB,IAAAC,QAAAX,OAHN,CAIhBY,EAAwB,IAAAC,MAAAC,OAAxBF,CACIL,CAAAI,QAAAZ,YALY,CAOhBgB,EADc,IAAAC,YACN,CAAc,CAAd,CAAkB,EAAlB,CAAwB,CACpC,KAAAC,OAAAC,QAAA,CAAoB,QAAS,CAACC,CAAD,CAAQ,CAAA,IAG7BC,CAGAC,KAAAA,EAAqBF,CAAAnB,OAArBqB,EAAqC,EANR,KAO7BpB,EAAUoB,CAAApB,OAAVA,EACIS,CAAAT,OARyB,CAS7BqB,EAASzB,CAAA,CAAKwB,CAAAC,OAAL,CACTZ,CAAAY,OADS,CAToB,CAa7BC,EAAsB,MAAtBA,GAAWtB,CAGfkB,EAAAC,SAAA,CAAiBA,CAAjB,CAA4BD,CAAAC,SAA5B,EAA8C,EAC9C,KAAAI,EAAYL,CAAAK,UAAA,CACPL,CAAAK,UAAA,CAAgBL,CAAAM,SAAA,CAAiB,UAAjB,CAA8B,EAA9C,CADO,EAEJlB,CAAAiB,UAAA,CAAiB,EAAjB,CAFI,CAGRjB,CAAAmB,aAAA,CAAoBP,CAApB;AAA2BA,CAAAM,SAA3B,EAA6C,QAA7C,CACJ,QAAOD,CAAAG,EACHpB,EAAAE,MAAAmB,WAAJ,GACI,OAAOJ,CAAAK,OACP,CAAA,OAAOL,CAAA,CAAU,cAAV,CAFX,CAIA,IAAgB,IAAhB,GAAIL,CAAAW,EAAJ,CAAsB,CACbX,CAAAY,QAAL,GACIZ,CAAAY,QADJ,CACoBvB,CAAAwB,EAAA,CAAW,OAAX,CAAAC,IAAA,CAAwB1B,CAAA2B,MAAxB,CADpB,CAGA,KAAAC,EAAQhB,CAAAW,EACR,KAAAM,EAAOvC,CAAA,CAAKsB,CAAAkB,OAAL,CAAmBlB,CAAAW,EAAnB,CACP,KAAAQ,EAAOC,IAAAC,IAAA,CAASrB,CAAAsB,WAAT,CAA2BlC,CAAAM,MAAAC,OAA3B,CAAiDF,CAAjD,CACP,KAAK8B,CAAL,CAAYN,CAAZ,CAAkBM,CAAlB,CAAyBN,CAAzB,CAAgCjB,CAAAW,EAAhC,CAAyCY,CAAA,EAAzC,CAAiD,CAC7C,IAAAC,EAAIxB,CAAAyB,KAAJD,EAAkBpB,CAAA,CACdJ,CAAAsB,WADc,CACK,CADL,CACSH,CADT,CACgB,CADhB,CAEd,CAFJK,CAGA,KAAAb,EAAIvB,CAAAM,MAAAgC,SAAA,CAAsBH,CAAtB,CAA4B,CAAA,CAA5B,CAAJZ,CACIlB,CADJkB,CAC4B,CACxBvB,EAAAI,QAAAI,MAAJ,GACI4B,CACA,CADIJ,IAAAO,MAAA,CAAWH,CAAX,CACJ,CADoB5B,CACpB,CAAAe,CAAA,CAAIS,IAAAO,MAAA,CAAWhB,CAAX,CAAJ,CAAoBf,CAFxB,CAIAgC,EAAA,CAAO,CACHJ,EAAGA,CADA,CAEHb,EAAGA,CAFA,CAGHkB,MAAOT,IAAAO,MAAA,CAAWvB,CAAA,CAAWe,CAAX,CAAkBnB,CAAAsB,WAA7B,CAHJ,CAIHQ,OAAQV,IAAAO,MAAA,CAAWR,CAAX,CAJL,CAKHX,EAAGL,CALA,CAOHF,EAAA,CAASe,CAAT,CAAJ,CACIf,CAAA,CAASe,CAAT,CAAAe,QAAA,CAAwBH,CAAxB,CADJ,CAII3B,CAAA,CAASe,CAAT,CAJJ,CAIsB3B,CAAAP,OAAA,CAAgBA,CAAhB,CAAA8C,KAAA,CACRpD,CAAA,CAAOoD,CAAP;AAAavB,CAAb,CADQ,CAAAS,IAAA,CAETd,CAAAY,QAFS,CAItBX,EAAA,CAASe,CAAT,CAAAgB,SAAA,CAA2B,CAAA,CAC3BhB,EAAA,EA1B6C,CAP/B,CAoCtBvC,CAAA,CAAWwB,CAAX,CAAqB,QAAS,CAACW,CAAD,CAAUqB,CAAV,CAAe,CACpCrB,CAAAoB,SAAL,CAKIpB,CAAAoB,SALJ,CAKuB,CAAA,CALvB,EACIpB,CAAAsB,QAAA,EACA,CAAA,OAAOtB,CAAA,CAAQqB,CAAR,CAFX,CADyC,CAA7C,CA9DiC,CAArC,CARoB,CAFzB,CATH,CA6FA3D,EAAA6D,UAAAC,QAAAC,KAAA,CAAqCC,QAAS,CAACd,CAAD,CAAIb,CAAJ,CAAO4B,CAAP,CAAUC,CAAV,CAAahD,CAAb,CAAsB,CAChE,MAAOlB,EAAA6D,UAAAC,QAAAK,QAAA,CAAsCjB,CAAtC,CAAyCb,CAAzC,CAA4C4B,CAA5C,CAA+CC,CAA/C,CAAkDhD,CAAlD,CADyD,CA3HsF,CAA9J,CAgIA1B,EAAA,CAAgBO,CAAhB,CAA0B,gCAA1B,CAA4D,EAA5D,CAAgE,QAAS,EAAG,EAA5E,CAvIoB,CAbvB;","sources":["dotplot.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","SVGRenderer","U","extend","objectEach","pick","seriesType","itemPadding","marker","symbol","states","hover","select","markerAttribs","drawPoints","series","renderer","chart","seriesMarkerOptions","options","itemPaddingTranslated","yAxis","transA","crisp","borderWidth","points","forEach","point","graphics","pointMarkerOptions","radius","isSquare","pointAttr","selected","pointAttribs","r","styledMode","stroke","y","graphic","g","add","group","itemY","yTop","stackY","size","Math","min","pointWidth","yPos","x","barX","toPixels","round","attr","width","height","animate","isActive","key","destroy","prototype","symbols","rect","SVGRenderer.prototype.symbols.rect","w","h","callout"]}
+163
View File
@@ -0,0 +1,163 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Dot plot series type for Highcharts
*
* (c) 2010-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/dotplot', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Series/DotplotSeries.js', [_modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (SVGRenderer, U) {
/* *
*
* (c) 2009-2020 Torstein Honsi
*
* Dot plot series type for Highcharts
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
/**
* @private
* @todo
* - Check update, remove etc.
* - Custom icons like persons, carts etc. Either as images, font icons or
* Highcharts symbols.
*/
var extend = U.extend,
objectEach = U.objectEach,
pick = U.pick,
seriesType = U.seriesType;
/**
* @private
* @class
* @name Highcharts.seriesTypes.dotplot
*
* @augments Highcharts.Series
*/
seriesType('dotplot', 'column', {
itemPadding: 0.2,
marker: {
symbol: 'circle',
states: {
hover: {},
select: {}
}
}
}, {
markerAttribs: void 0,
drawPoints: function () {
var series = this,
renderer = series.chart.renderer,
seriesMarkerOptions = this.options.marker,
itemPaddingTranslated = this.yAxis.transA *
series.options.itemPadding,
borderWidth = this.borderWidth,
crisp = borderWidth % 2 ? 0.5 : 1;
this.points.forEach(function (point) {
var yPos,
attr,
graphics,
itemY,
pointAttr,
pointMarkerOptions = point.marker || {},
symbol = (pointMarkerOptions.symbol ||
seriesMarkerOptions.symbol),
radius = pick(pointMarkerOptions.radius,
seriesMarkerOptions.radius),
size,
yTop,
isSquare = symbol !== 'rect',
x,
y;
point.graphics = graphics = point.graphics || {};
pointAttr = point.pointAttr ?
(point.pointAttr[point.selected ? 'selected' : ''] ||
series.pointAttr['']) :
series.pointAttribs(point, point.selected && 'select');
delete pointAttr.r;
if (series.chart.styledMode) {
delete pointAttr.stroke;
delete pointAttr['stroke-width'];
}
if (point.y !== null) {
if (!point.graphic) {
point.graphic = renderer.g('point').add(series.group);
}
itemY = point.y;
yTop = pick(point.stackY, point.y);
size = Math.min(point.pointWidth, series.yAxis.transA - itemPaddingTranslated);
for (yPos = yTop; yPos > yTop - point.y; yPos--) {
x = point.barX + (isSquare ?
point.pointWidth / 2 - size / 2 :
0);
y = series.yAxis.toPixels(yPos, true) +
itemPaddingTranslated / 2;
if (series.options.crisp) {
x = Math.round(x) - crisp;
y = Math.round(y) + crisp;
}
attr = {
x: x,
y: y,
width: Math.round(isSquare ? size : point.pointWidth),
height: Math.round(size),
r: radius
};
if (graphics[itemY]) {
graphics[itemY].animate(attr);
}
else {
graphics[itemY] = renderer.symbol(symbol)
.attr(extend(attr, pointAttr))
.add(point.graphic);
}
graphics[itemY].isActive = true;
itemY--;
}
}
objectEach(graphics, function (graphic, key) {
if (!graphic.isActive) {
graphic.destroy();
delete graphic[key];
}
else {
graphic.isActive = false;
}
});
});
}
});
SVGRenderer.prototype.symbols.rect = function (x, y, w, h, options) {
return SVGRenderer.prototype.symbols.callout(x, y, w, h, options);
};
});
_registerModule(_modules, 'masters/modules/dotplot.src.js', [], function () {
});
}));
+20
View File
@@ -0,0 +1,20 @@
/*
Highstock JS v8.2.0 (2020-08-20)
Drag-panes module
(c) 2010-2019 Highsoft AS
Author: Kacper Madej
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/drag-panes",["highcharts","highcharts/modules/stock"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,m,b,d){a.hasOwnProperty(m)||(a[m]=d.apply(null,b))}a=a?a._modules:{};b(a,"Extensions/DragPanes.js",[a["Core/Globals.js"],a["Core/Axis/Axis.js"],a["Core/Pointer.js"],a["Core/Utilities.js"]],
function(a,b,u,d){var m=a.hasTouch,f=d.addEvent,r=d.clamp,x=d.isNumber,y=d.merge,z=d.objectEach,v=d.relativeLength;d=d.wrap;var w=function(){function a(c){this.options=this.lastPos=this.controlLine=this.axis=void 0;this.init(c)}a.prototype.init=function(c,a){this.axis=c;this.options=c.options.resize;this.render();a||this.addMouseEvents()};a.prototype.render=function(){var c=this.axis,a=c.chart,e=this.options,b=e.x||0,d=e.y,k=r(c.top+c.height+d,a.plotTop,a.plotTop+a.plotHeight),l={};a.styledMode||
(l={cursor:e.cursor,stroke:e.lineColor,"stroke-width":e.lineWidth,dashstyle:e.lineDashStyle});this.lastPos=k-d;this.controlLine||(this.controlLine=a.renderer.path().addClass("highcharts-axis-resizer"));this.controlLine.add(c.axisGroup);e=a.styledMode?this.controlLine.strokeWidth():e.lineWidth;l.d=a.renderer.crispLine([["M",c.left+b,k],["L",c.left+c.width+b,k]],e);this.controlLine.attr(l)};a.prototype.addMouseEvents=function(){var c=this,a=c.controlLine.element,e=c.axis.chart.container,b=[],d,k,l;
c.mouseMoveHandler=d=function(a){c.onMouseMove(a)};c.mouseUpHandler=k=function(a){c.onMouseUp(a)};c.mouseDownHandler=l=function(a){c.onMouseDown(a)};b.push(f(e,"mousemove",d),f(e.ownerDocument,"mouseup",k),f(a,"mousedown",l));m&&b.push(f(e,"touchmove",d),f(e.ownerDocument,"touchend",k),f(a,"touchstart",l));c.eventsToUnbind=b};a.prototype.onMouseMove=function(a){a.touches&&0===a.touches[0].pageX||!this.grabbed||(this.hasDragged=!0,this.updateAxes(this.axis.chart.pointer.normalize(a).chartY-this.options.y))};
a.prototype.onMouseUp=function(a){this.hasDragged&&this.updateAxes(this.axis.chart.pointer.normalize(a).chartY-this.options.y);this.grabbed=this.hasDragged=this.axis.chart.activeResizer=null};a.prototype.onMouseDown=function(a){this.axis.chart.pointer.reset(!1,0);this.grabbed=this.axis.chart.activeResizer=!0};a.prototype.updateAxes=function(a){var c=this,e=c.axis.chart,b=c.options.controlledAxis,d=0===b.next.length?[e.yAxis.indexOf(c.axis)+1]:b.next;b=[c.axis].concat(b.prev);var k=[],l=!1,p=e.plotTop,
f=e.plotHeight,m=p+f;a=r(a,p,m);var q=a-c.lastPos;1>q*q||([b,d].forEach(function(b,d){b.forEach(function(b,h){var g=(b=x(b)?e.yAxis[b]:d||h?e.get(b):b)&&b.options;if(g&&"navigator-y-axis"!==g.id){h=b.top;var t=Math.round(v(g.minLength,f));var n=Math.round(v(g.maxLength,f));d?(q=a-c.lastPos,g=Math.round(r(b.len-q,t,n)),h=b.top+q,h+g>m&&(n=m-g-h,a+=n,h+=n),h<p&&(h=p,h+g>m&&(g=f)),g===t&&(l=!0),k.push({axis:b,options:{top:100*(h-p)/f+"%",height:100*g/f+"%"}})):(g=Math.round(r(a-h,t,n)),g===n&&(l=!0),
a=h+g,k.push({axis:b,options:{height:100*g/f+"%"}}))}})}),l||(k.forEach(function(a){a.axis.update(a.options,!1)}),e.redraw(!1)))};a.prototype.destroy=function(){var a=this;delete a.axis.resizer;this.eventsToUnbind&&this.eventsToUnbind.forEach(function(a){a()});a.controlLine.destroy();z(a,function(b,c){a[c]=null})};a.resizerOptions={minLength:"10%",maxLength:"100%",resize:{controlledAxis:{next:[],prev:[]},enabled:!1,cursor:"ns-resize",lineColor:"#cccccc",lineDashStyle:"Solid",lineWidth:4,x:0,y:0}};
return a}();b.keepProps.push("resizer");f(b,"afterRender",function(){var b=this.resizer,c=this.options.resize;c&&(c=!1!==c.enabled,b?c?b.init(this,!0):b.destroy():c&&(this.resizer=new a.AxisResizer(this)))});f(b,"destroy",function(a){!a.keepEvents&&this.resizer&&this.resizer.destroy()});d(u.prototype,"runPointActions",function(a){this.chart.activeResizer||a.apply(this,Array.prototype.slice.call(arguments,1))});d(u.prototype,"drag",function(a){this.chart.activeResizer||a.apply(this,Array.prototype.slice.call(arguments,
1))});y(!0,b.defaultYAxisOptions,w.resizerOptions);a.AxisResizer=w;return a.AxisResizer});b(a,"masters/modules/drag-panes.src.js",[],function(){})});
//# sourceMappingURL=drag-panes.js.map
File diff suppressed because one or more lines are too long
+581
View File
@@ -0,0 +1,581 @@
/**
* @license Highstock JS v8.2.0 (2020-08-20)
*
* Drag-panes module
*
* (c) 2010-2019 Highsoft AS
* Author: Kacper Madej
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/drag-panes', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Extensions/DragPanes.js', [_modules['Core/Globals.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js']], function (H, Axis, Pointer, U) {
/* *
*
* Plugin for resizing axes / panes in a chart.
*
* (c) 2010-2017 Highsoft AS
*
* Author: Kacper Madej
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var hasTouch = H.hasTouch;
var addEvent = U.addEvent,
clamp = U.clamp,
isNumber = U.isNumber,
merge = U.merge,
objectEach = U.objectEach,
relativeLength = U.relativeLength,
wrap = U.wrap;
/* eslint-disable no-invalid-this, valid-jsdoc */
/**
* The AxisResizer class.
*
* @private
* @class
* @name Highcharts.AxisResizer
*
* @param {Highcharts.Axis} axis
* Main axis for the AxisResizer.
*/
var AxisResizer = /** @class */ (function () {
function AxisResizer(axis) {
/* eslint-enable no-invalid-this */
this.axis = void 0;
this.controlLine = void 0;
this.lastPos = void 0;
this.options = void 0;
this.init(axis);
}
/**
* Initialize the AxisResizer object.
*
* @function Highcharts.AxisResizer#init
*
* @param {Highcharts.Axis} axis
* Main axis for the AxisResizer.
*/
AxisResizer.prototype.init = function (axis, update) {
this.axis = axis;
this.options = axis.options.resize;
this.render();
if (!update) {
// Add mouse events.
this.addMouseEvents();
}
};
/**
* Render the AxisResizer
*
* @function Highcharts.AxisResizer#render
*/
AxisResizer.prototype.render = function () {
var resizer = this,
axis = resizer.axis,
chart = axis.chart,
options = resizer.options,
x = options.x || 0,
y = options.y,
// Normalize control line position according to the plot area
pos = clamp(axis.top + axis.height + y,
chart.plotTop,
chart.plotTop + chart.plotHeight),
attr = {},
lineWidth;
if (!chart.styledMode) {
attr = {
cursor: options.cursor,
stroke: options.lineColor,
'stroke-width': options.lineWidth,
dashstyle: options.lineDashStyle
};
}
// Register current position for future reference.
resizer.lastPos = pos - y;
if (!resizer.controlLine) {
resizer.controlLine = chart.renderer.path()
.addClass('highcharts-axis-resizer');
}
// Add to axisGroup after axis update, because the group is recreated
// Do .add() before path is calculated because strokeWidth() needs it.
resizer.controlLine.add(axis.axisGroup);
lineWidth = chart.styledMode ?
resizer.controlLine.strokeWidth() :
options.lineWidth;
attr.d = chart.renderer.crispLine([
['M', axis.left + x, pos],
['L', axis.left + axis.width + x, pos]
], lineWidth);
resizer.controlLine.attr(attr);
};
/**
* Set up the mouse and touch events for the control line.
*
* @function Highcharts.AxisResizer#addMouseEvents
*/
AxisResizer.prototype.addMouseEvents = function () {
var resizer = this,
ctrlLineElem = resizer.controlLine.element,
container = resizer.axis.chart.container,
eventsToUnbind = [],
mouseMoveHandler,
mouseUpHandler,
mouseDownHandler;
// Create mouse events' handlers.
// Make them as separate functions to enable wrapping them:
resizer.mouseMoveHandler = mouseMoveHandler = function (e) {
resizer.onMouseMove(e);
};
resizer.mouseUpHandler = mouseUpHandler = function (e) {
resizer.onMouseUp(e);
};
resizer.mouseDownHandler = mouseDownHandler = function (e) {
resizer.onMouseDown(e);
};
// Add mouse move and mouseup events. These are bind to doc/container,
// because resizer.grabbed flag is stored in mousedown events.
eventsToUnbind.push(addEvent(container, 'mousemove', mouseMoveHandler), addEvent(container.ownerDocument, 'mouseup', mouseUpHandler), addEvent(ctrlLineElem, 'mousedown', mouseDownHandler));
// Touch events.
if (hasTouch) {
eventsToUnbind.push(addEvent(container, 'touchmove', mouseMoveHandler), addEvent(container.ownerDocument, 'touchend', mouseUpHandler), addEvent(ctrlLineElem, 'touchstart', mouseDownHandler));
}
resizer.eventsToUnbind = eventsToUnbind;
};
/**
* Mouse move event based on x/y mouse position.
*
* @function Highcharts.AxisResizer#onMouseMove
*
* @param {Highcharts.PointerEventObject} e
* Mouse event.
*/
AxisResizer.prototype.onMouseMove = function (e) {
/*
* In iOS, a mousemove event with e.pageX === 0 is fired when holding
* the finger down in the center of the scrollbar. This should
* be ignored. Borrowed from Navigator.
*/
if (!e.touches || e.touches[0].pageX !== 0) {
// Drag the control line
if (this.grabbed) {
this.hasDragged = true;
this.updateAxes(this.axis.chart.pointer.normalize(e).chartY -
this.options.y);
}
}
};
/**
* Mouse up event based on x/y mouse position.
*
* @function Highcharts.AxisResizer#onMouseUp
*
* @param {Highcharts.PointerEventObject} e
* Mouse event.
*/
AxisResizer.prototype.onMouseUp = function (e) {
if (this.hasDragged) {
this.updateAxes(this.axis.chart.pointer.normalize(e).chartY -
this.options.y);
}
// Restore runPointActions.
this.grabbed = this.hasDragged = this.axis.chart.activeResizer =
null;
};
/**
* Mousedown on a control line.
* Will store necessary information for drag&drop.
*
* @function Highcharts.AxisResizer#onMouseDown
*/
AxisResizer.prototype.onMouseDown = function (e) {
// Clear all hover effects.
this.axis.chart.pointer.reset(false, 0);
// Disable runPointActions.
this.grabbed = this.axis.chart.activeResizer = true;
};
/**
* Update all connected axes after a change of control line position
*
* @function Highcharts.AxisResizer#updateAxes
*
* @param {number} chartY
*/
AxisResizer.prototype.updateAxes = function (chartY) {
var resizer = this,
chart = resizer.axis.chart,
axes = resizer.options.controlledAxis,
nextAxes = axes.next.length === 0 ?
[chart.yAxis.indexOf(resizer.axis) + 1] : axes.next,
// Main axis is included in the prev array by default
prevAxes = [resizer.axis].concat(axes.prev),
// prev and next configs
axesConfigs = [],
stopDrag = false,
plotTop = chart.plotTop,
plotHeight = chart.plotHeight,
plotBottom = plotTop + plotHeight,
yDelta,
calculatePercent = function (value) {
return value * 100 / plotHeight + '%';
}, normalize = function (val, min, max) {
return Math.round(clamp(val, min, max));
};
// Normalize chartY to plot area limits
chartY = clamp(chartY, plotTop, plotBottom);
yDelta = chartY - resizer.lastPos;
// Update on changes of at least 1 pixel in the desired direction
if (yDelta * yDelta < 1) {
return;
}
// First gather info how axes should behave
[prevAxes, nextAxes].forEach(function (axesGroup, isNext) {
axesGroup.forEach(function (axisInfo, i) {
// Axes given as array index, axis object or axis id
var axis = isNumber(axisInfo) ?
// If it's a number - it's an index
chart.yAxis[axisInfo] :
(
// If it's first elem. in first group
(!isNext && !i) ?
// then it's an Axis object
axisInfo :
// else it should be an id
chart.get(axisInfo)),
axisOptions = axis && axis.options,
optionsToUpdate = {},
hDelta = 0,
height,
top,
minLength,
maxLength;
// Skip if axis is not found
// or it is navigator's yAxis (#7732)
if (!axisOptions ||
axisOptions.id === 'navigator-y-axis') {
return;
}
top = axis.top;
minLength = Math.round(relativeLength(axisOptions.minLength, plotHeight));
maxLength = Math.round(relativeLength(axisOptions.maxLength, plotHeight));
if (isNext) {
// Try to change height first. yDelta could had changed
yDelta = chartY - resizer.lastPos;
// Normalize height to option limits
height = normalize(axis.len - yDelta, minLength, maxLength);
// Adjust top, so the axis looks like shrinked from top
top = axis.top + yDelta;
// Check for plot area limits
if (top + height > plotBottom) {
hDelta = plotBottom - height - top;
chartY += hDelta;
top += hDelta;
}
// Fit to plot - when overflowing on top
if (top < plotTop) {
top = plotTop;
if (top + height > plotBottom) {
height = plotHeight;
}
}
// If next axis meets min length, stop dragging:
if (height === minLength) {
stopDrag = true;
}
axesConfigs.push({
axis: axis,
options: {
top: calculatePercent(top - plotTop),
height: calculatePercent(height)
}
});
}
else {
// Normalize height to option limits
height = normalize(chartY - top, minLength, maxLength);
// If prev axis meets max length, stop dragging:
if (height === maxLength) {
stopDrag = true;
}
// Check axis size limits
chartY = top + height;
axesConfigs.push({
axis: axis,
options: {
height: calculatePercent(height)
}
});
}
optionsToUpdate.height = height;
});
});
// If we hit the min/maxLength with dragging, don't do anything:
if (!stopDrag) {
// Now update axes:
axesConfigs.forEach(function (config) {
config.axis.update(config.options, false);
});
chart.redraw(false);
}
};
/**
* Destroy AxisResizer. Clear outside references, clear events,
* destroy elements, nullify properties.
*
* @function Highcharts.AxisResizer#destroy
*/
AxisResizer.prototype.destroy = function () {
var resizer = this,
axis = resizer.axis;
// Clear resizer in axis
delete axis.resizer;
// Clear control line events
if (this.eventsToUnbind) {
this.eventsToUnbind.forEach(function (unbind) {
unbind();
});
}
// Destroy AxisResizer elements
resizer.controlLine.destroy();
// Nullify properties
objectEach(resizer, function (val, key) {
resizer[key] = null;
});
};
// Default options for AxisResizer.
AxisResizer.resizerOptions = {
/**
* Minimal size of a resizable axis. Could be set as a percent
* of plot area or pixel size.
*
* @sample {highstock} stock/yaxis/resize-min-max-length
* minLength and maxLength
*
* @type {number|string}
* @product highstock
* @requires modules/drag-panes
* @apioption yAxis.minLength
*/
minLength: '10%',
/**
* Maximal size of a resizable axis. Could be set as a percent
* of plot area or pixel size.
*
* @sample {highstock} stock/yaxis/resize-min-max-length
* minLength and maxLength
*
* @type {number|string}
* @product highstock
* @requires modules/drag-panes
* @apioption yAxis.maxLength
*/
maxLength: '100%',
/**
* Options for axis resizing. It adds a thick line between panes which
* the user can drag in order to resize the panes.
*
* @sample {highstock} stock/demo/candlestick-and-volume
* Axis resizing enabled
*
* @product highstock
* @requires modules/drag-panes
* @optionparent yAxis.resize
*/
resize: {
/**
* Contains two arrays of axes that are controlled by control line
* of the axis.
*
* @requires modules/drag-panes
*/
controlledAxis: {
/**
* Array of axes that should move out of the way of resizing
* being done for the current axis. If not set, the next axis
* will be used.
*
* @sample {highstock} stock/yaxis/multiple-resizers
* Three panes with resizers
* @sample {highstock} stock/yaxis/resize-multiple-axes
* One resizer controlling multiple axes
*
* @type {Array<number|string>}
* @default []
* @requires modules/drag-panes
*/
next: [],
/**
* Array of axes that should move with the current axis
* while resizing.
*
* @sample {highstock} stock/yaxis/multiple-resizers
* Three panes with resizers
* @sample {highstock} stock/yaxis/resize-multiple-axes
* One resizer controlling multiple axes
*
* @type {Array<number|string>}
* @default []
* @requires modules/drag-panes
*/
prev: []
},
/**
* Enable or disable resize by drag for the axis.
*
* @sample {highstock} stock/demo/candlestick-and-volume
* Enabled resizer
*
* @requires modules/drag-panes
*/
enabled: false,
/**
* Cursor style for the control line.
*
* In styled mode use class `highcharts-axis-resizer` instead.
*
* @requires modules/drag-panes
*/
cursor: 'ns-resize',
/**
* Color of the control line.
*
* In styled mode use class `highcharts-axis-resizer` instead.
*
* @sample {highstock} stock/yaxis/styled-resizer
* Styled resizer
*
* @type {Highcharts.ColorString}
* @requires modules/drag-panes
*/
lineColor: '#cccccc',
/**
* Dash style of the control line.
*
* In styled mode use class `highcharts-axis-resizer` instead.
*
* @see For supported options check [dashStyle](#plotOptions.series.dashStyle)
*
* @sample {highstock} stock/yaxis/styled-resizer
* Styled resizer
*
* @requires modules/drag-panes
*/
lineDashStyle: 'Solid',
/**
* Width of the control line.
*
* In styled mode use class `highcharts-axis-resizer` instead.
*
* @sample {highstock} stock/yaxis/styled-resizer
* Styled resizer
*
* @requires modules/drag-panes
*/
lineWidth: 4,
/**
* Horizontal offset of the control line.
*
* @sample {highstock} stock/yaxis/styled-resizer
* Styled resizer
*
* @requires modules/drag-panes
*/
x: 0,
/**
* Vertical offset of the control line.
*
* @sample {highstock} stock/yaxis/styled-resizer
* Styled resizer
*
* @requires modules/drag-panes
*/
y: 0
}
};
return AxisResizer;
}());
// Keep resizer reference on axis update
Axis.keepProps.push('resizer');
/* eslint-disable no-invalid-this */
// Add new AxisResizer, update or remove it
addEvent(Axis, 'afterRender', function () {
var axis = this,
resizer = axis.resizer,
resizerOptions = axis.options.resize,
enabled;
if (resizerOptions) {
enabled = resizerOptions.enabled !== false;
if (resizer) {
// Resizer present and enabled
if (enabled) {
// Update options
resizer.init(axis, true);
// Resizer present, but disabled
}
else {
// Destroy the resizer
resizer.destroy();
}
}
else {
// Resizer not present and enabled
if (enabled) {
// Add new resizer
axis.resizer = new H.AxisResizer(axis);
}
// Resizer not present and disabled, so do nothing
}
}
});
// Clear resizer on axis remove.
addEvent(Axis, 'destroy', function (e) {
if (!e.keepEvents && this.resizer) {
this.resizer.destroy();
}
});
// Prevent any hover effects while dragging a control line of AxisResizer.
wrap(Pointer.prototype, 'runPointActions', function (proceed) {
if (!this.chart.activeResizer) {
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
}
});
// Prevent default drag action detection while dragging a control line of
// AxisResizer. (#7563)
wrap(Pointer.prototype, 'drag', function (proceed) {
if (!this.chart.activeResizer) {
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
}
});
merge(true, Axis.defaultYAxisOptions, AxisResizer.resizerOptions);
H.AxisResizer = AxisResizer;
return H.AxisResizer;
});
_registerModule(_modules, 'masters/modules/drag-panes.src.js', [], function () {
});
}));
+40
View File
@@ -0,0 +1,40 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
(c) 2009-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/draggable-points",["highcharts"],function(r){e(r);e.Highcharts=r;return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){function r(e,q,l,r){e.hasOwnProperty(q)||(e[q]=r.apply(null,l))}e=e?e._modules:{};r(e,"Extensions/DraggablePoints.js",[e["Core/Globals.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(e,q,l){function r(a){return{left:"right",
right:"left",top:"bottom",bottom:"top"}[a]}function K(a){var b=["draggableX","draggableY"],c;m(a.dragDropProps,function(a){a.optionName&&b.push(a.optionName)});for(c=b.length;c--;)if(a.options.dragDrop[b[c]])return!0}function L(a){var b=a.series?a.series.length:0;if(a.hasCartesianSeries&&!a.polar)for(;b--;)if(a.series[b].options.dragDrop&&K(a.series[b]))return!0}function M(a){var b=a.series,c=b.options.dragDrop||{};a=a.options&&a.options.dragDrop;var d,f;m(b.dragDropProps,function(a){"x"===a.axis&&
a.move?d=!0:"y"===a.axis&&a.move&&(f=!0)});return(c.draggableX&&d||c.draggableY&&f)&&!(a&&!1===a.draggableX&&!1===a.draggableY)&&b.yAxis&&b.xAxis}function w(a,b){return"undefined"===typeof a.chartX||"undefined"===typeof a.chartY?b.pointer.normalize(a):a}function x(a,b,c,d){var f=b.map(function(b){return t(a,b,c,d)});return function(){f.forEach(function(a){a()})}}function N(a,b,c){var d=b.dragDropData.origin;b=d.chartX;d=d.chartY;var f=a.chartX;a=a.chartY;return Math.sqrt((f-b)*(f-b)+(a-d)*(a-d))>
c}function O(a,b,c){var d={chartX:a.chartX,chartY:a.chartY,guideBox:c&&{x:c.attr("x"),y:c.attr("y"),width:c.attr("width"),height:c.attr("height")},points:{}};b.forEach(function(b){var c={};m(b.series.dragDropProps,function(d,f){d=b.series[d.axis+"Axis"];c[f]=b[f];c[f+"Offset"]=d.toPixels(b[f])-(d.horiz?a.chartX:a.chartY)});c.point=b;d.points[b.id]=c});return d}function P(a){var b=a.series,c=[],d=b.options.dragDrop.groupBy;b.isSeriesBoosting?b.options.data.forEach(function(a,d){c.push((new b.pointClass).init(b,
a));c[c.length-1].index=d}):c=b.points;return a.options[d]?c.filter(function(b){return b.options[d]===a.options[d]}):[a]}function D(a,b){var c=P(b),d=b.series,f=d.chart,n;v(d.options.dragDrop&&d.options.dragDrop.liveRedraw,!0)||(f.dragGuideBox=n=d.getGuideBox(c),f.setGuideBoxState("default",d.options.dragDrop.guideBox).add(d.group));f.dragDropData={origin:O(a,c,n),point:b,groupedPoints:c,isDragging:!0}}function Q(a,b){var c=a.point,d=p(c.series.options.dragDrop,c.options.dragDrop),f={},n=a.updateProp,
B={};m(c.series.dragDropProps,function(a,b){if(!n||n===b&&a.resize&&(!a.optionName||!1!==d[a.optionName]))if(n||a.move&&("x"===a.axis&&d.draggableX||"y"===a.axis&&d.draggableY))f[b]=a});(n?[c]:a.groupedPoints).forEach(function(c){B[c.id]={point:c,newValues:c.getDropValues(a.origin,b,f)}});return B}function E(a,b){var c=a.dragDropData.newPoints;b=!1===b?!1:p({duration:400},a.options.chart.animation);a.isDragDropAnimating=!0;m(c,function(a){a.point.update(a.newValues,!1)});a.redraw(b);setTimeout(function(){delete a.isDragDropAnimating;
a.hoverPoint&&!a.dragHandles&&a.hoverPoint.showDragHandles()},b.duration)}function F(a){var b=a.series&&a.series.chart,c=b&&b.dragDropData;!b||!b.dragHandles||c&&(c.isDragging&&c.draggedPastSensitivity||c.isHoveringHandle===a.id)||b.hideDragHandles()}function G(a){var b=0,c;for(c in a)Object.hasOwnProperty.call(a,c)&&b++;return b}function H(a){for(var b in a)if(Object.hasOwnProperty.call(a,b))return a[b]}function R(a,b){if(!b.zoomOrPanKeyPressed(a)){var c=b.dragDropData;var d=0;if(c&&c.isDragging){var f=
c.point;d=f.series.options.dragDrop;a.preventDefault();c.draggedPastSensitivity||(c.draggedPastSensitivity=N(a,b,v(f.options.dragDrop&&f.options.dragDrop.dragSensitivity,d&&d.dragSensitivity,2)));c.draggedPastSensitivity&&(c.newPoints=Q(c,a),b=c.newPoints,d=G(b),b=1===d?H(b):null,f.firePointEvent("drag",{origin:c.origin,newPoints:c.newPoints,newPoint:b&&b.newValues,newPointId:b&&b.point.id,numNewPoints:d,chartX:a.chartX,chartY:a.chartY},function(){var b=f.series,c=b.chart,d=c.dragDropData,e=p(b.options.dragDrop,
f.options.dragDrop),g=e.draggableX,k=e.draggableY;b=d.origin;var h=a.chartX-b.chartX,y=a.chartY-b.chartY,u=h;d=d.updateProp;c.inverted&&(h=-y,y=-u);if(v(e.liveRedraw,!0))E(c,!1),f.showDragHandles();else if(d){g=h;c=y;u=f.series;k=u.chart;d=k.dragDropData;e=u.dragDropProps[d.updateProp];var l=d.newPoints[f.id].newValues;var q="function"===typeof e.resizeSide?e.resizeSide(l,f):e.resizeSide;e.beforeResize&&e.beforeResize(k.dragGuideBox,l,f);k=k.dragGuideBox;u="x"===e.axis&&u.xAxis.reversed||"y"===e.axis&&
u.yAxis.reversed?r(q):q;g="x"===e.axis?g-(d.origin.prevdX||0):0;c="y"===e.axis?c-(d.origin.prevdY||0):0;switch(u){case "left":var m={x:k.attr("x")+g,width:Math.max(1,k.attr("width")-g)};break;case "right":m={width:Math.max(1,k.attr("width")+g)};break;case "top":m={y:k.attr("y")+c,height:Math.max(1,k.attr("height")-c)};break;case "bottom":m={height:Math.max(1,k.attr("height")+c)}}k.attr(m)}else c.dragGuideBox.translate(g?h:0,k?y:0);b.prevdX=h;b.prevdY=y}))}}}function A(a,b){var c=b.dragDropData;if(c&&
c.isDragging&&c.draggedPastSensitivity){var d=c.point,f=c.newPoints,e=G(f),g=1===e?H(f):null;b.dragHandles&&b.hideDragHandles();a.preventDefault();b.cancelClick=!0;d.firePointEvent("drop",{origin:c.origin,chartX:a.chartX,chartY:a.chartY,newPoints:f,numNewPoints:e,newPoint:g&&g.newValues,newPointId:g&&g.point.id},function(){E(b)})}delete b.dragDropData;b.dragGuideBox&&(b.dragGuideBox.destroy(),delete b.dragGuideBox)}function S(a){var b=a.container,c=e.doc;L(a)&&(x(b,["mousedown","touchstart"],function(b){b=
w(b,a);var c=a.hoverPoint,d=p(c&&c.series.options.dragDrop,c&&c.options.dragDrop),e=d.draggableX||!1;d=d.draggableY||!1;a.cancelClick=!1;!e&&!d||a.zoomOrPanKeyPressed(b)||a.hasDraggedAnnotation||(a.dragDropData&&a.dragDropData.isDragging?A(b,a):c&&M(c)&&(a.mouseIsDown=!1,D(b,c),c.firePointEvent("dragStart",b)))}),x(b,["mousemove","touchmove"],function(b){R(w(b,a),a)}),t(b,"mouseleave",function(b){A(w(b,a),a)}),a.unbindDragDropMouseUp=x(c,["mouseup","touchend"],function(b){A(w(b,a),a)}),a.hasAddedDragDropEvents=
!0,t(a,"destroy",function(){a.unbindDragDropMouseUp&&a.unbindDragDropMouseUp()}))}var t=l.addEvent,T=l.clamp,p=l.merge,m=l.objectEach,v=l.pick;"";var g=e.seriesTypes;l=function(a){a=a.shapeArgs||a.graphic.getBBox();var b=a.r||0,c=a.height/2;return[["M",0,b],["L",0,c-5],["A",1,1,0,0,0,0,c+5],["A",1,1,0,0,0,0,c-5],["M",0,c+5],["L",0,a.height-b]]};var z=g.line.prototype.dragDropProps={x:{axis:"x",move:!0},y:{axis:"y",move:!0}};g.flags&&(g.flags.prototype.dragDropProps=z);var h=g.column.prototype.dragDropProps=
{x:{axis:"x",move:!0},y:{axis:"y",move:!1,resize:!0,beforeResize:function(a,b,c){var d=c.series.translatedThreshold,f=a.attr("y");b.y>=c.series.options.threshold?(b=a.attr("height"),a.attr({height:Math.max(0,Math.round(b+(d?d-(f+b):0)))})):a.attr({y:Math.round(f+(d?d-f:0))})},resizeSide:function(a,b){var c=b.series.chart.dragHandles;a=a.y>=(b.series.options.threshold||0)?"top":"bottom";b=r(a);c[b]&&(c[b].destroy(),delete c[b]);return a},handlePositioner:function(a){var b=a.shapeArgs||a.graphic.getBBox();
return{x:b.x,y:a.y>=(a.series.options.threshold||0)?b.y:b.y+b.height}},handleFormatter:function(a){var b=a.shapeArgs||{};a=b.r||0;b=b.width||0;var c=b/2;return[["M",a,0],["L",c-5,0],["A",1,1,0,0,0,c+5,0],["A",1,1,0,0,0,c-5,0],["M",c+5,0],["L",b-a,0]]}}};g.bullet&&(g.bullet.prototype.dragDropProps={x:h.x,y:h.y,target:{optionName:"draggableTarget",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(a){var b=a.targetGraphic.getBBox();return{x:a.barX,y:b.y+b.height/2}},handleFormatter:h.y.handleFormatter}});
g.columnrange&&(g.columnrange.prototype.dragDropProps={x:{axis:"x",move:!0},low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(a){a=a.shapeArgs||a.graphic.getBBox();return{x:a.x,y:a.y+a.height}},handleFormatter:h.y.handleFormatter,propValidate:function(a,b){return a<=b.high}},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(a){a=a.shapeArgs||a.graphic.getBBox();return{x:a.x,y:a.y}},handleFormatter:h.y.handleFormatter,
propValidate:function(a,b){return a>=b.low}}});g.boxplot&&(g.boxplot.prototype.dragDropProps={x:h.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.lowPlot}},handleFormatter:h.y.handleFormatter,propValidate:function(a,b){return a<=b.q1}},q1:{optionName:"draggableQ1",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.q1Plot}},handleFormatter:h.y.handleFormatter,
propValidate:function(a,b){return a<=b.median&&a>=b.low}},median:{axis:"y",move:!0},q3:{optionName:"draggableQ3",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.q3Plot}},handleFormatter:h.y.handleFormatter,propValidate:function(a,b){return a<=b.high&&a>=b.median}},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.highPlot}},handleFormatter:h.y.handleFormatter,propValidate:function(a,
b){return a>=b.q3}}});g.ohlc&&(g.ohlc.prototype.dragDropProps={x:h.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.plotLow}},handleFormatter:h.y.handleFormatter,propValidate:function(a,b){return a<=b.open&&a<=b.close}},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.plotHigh}},handleFormatter:h.y.handleFormatter,propValidate:function(a,
b){return a>=b.open&&a>=b.close}},open:{optionName:"draggableOpen",axis:"y",move:!0,resize:!0,resizeSide:function(a){return a.open>=a.close?"top":"bottom"},handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.plotOpen}},handleFormatter:h.y.handleFormatter,propValidate:function(a,b){return a<=b.high&&a>=b.low}},close:{optionName:"draggableClose",axis:"y",move:!0,resize:!0,resizeSide:function(a){return a.open>=a.close?"bottom":"top"},handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.plotClose}},
handleFormatter:h.y.handleFormatter,propValidate:function(a,b){return a<=b.high&&a>=b.low}}});if(g.arearange){z=g.columnrange.prototype.dragDropProps;var I=function(a){a=a.graphic?a.graphic.getBBox().width/2+1:4;return[["M",0-a,0],["a",a,a,0,1,0,2*a,0],["a",a,a,0,1,0,-2*a,0]]};g.arearange.prototype.dragDropProps={x:z.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(a){return(a=a.lowerGraphic&&a.lowerGraphic.getBBox())?{x:a.x+a.width/2,y:a.y+
a.height/2}:{x:-999,y:-999}},handleFormatter:I,propValidate:z.low.propValidate},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(a){return(a=a.upperGraphic&&a.upperGraphic.getBBox())?{x:a.x+a.width/2,y:a.y+a.height/2}:{x:-999,y:-999}},handleFormatter:I,propValidate:z.high.propValidate}}}g.waterfall&&(g.waterfall.prototype.dragDropProps={x:h.x,y:p(h.y,{handleFormatter:function(a){return a.isSum||a.isIntermediateSum?null:h.y.handleFormatter(a)}})});
if(g.xrange){var J=function(a,b){var c=a.series,d=c.xAxis,f=c.yAxis,e=c.chart.inverted;b=d.toPixels(a[b],!0);var g=f.toPixels(a.y,!0);a=c.columnMetrics?c.columnMetrics.offset:-a.shapeArgs.height/2;e&&(b=d.len-b,g=f.len-g);return{x:Math.round(b),y:Math.round(g+a)}};l=g.xrange.prototype.dragDropProps={y:{axis:"y",move:!0},x:{optionName:"draggableX1",axis:"x",move:!0,resize:!0,resizeSide:"left",handlePositioner:function(a){return J(a,"x")},handleFormatter:l,propValidate:function(a,b){return a<=b.x2}},
x2:{optionName:"draggableX2",axis:"x",move:!0,resize:!0,resizeSide:"right",handlePositioner:function(a){return J(a,"x2")},handleFormatter:l,propValidate:function(a,b){return a>=b.x}}};g.gantt&&(g.gantt.prototype.dragDropProps={y:l.y,start:p(l.x,{optionName:"draggableStart",validateIndividualDrag:function(a){return!a.milestone}}),end:p(l.x2,{optionName:"draggableEnd",validateIndividualDrag:function(a){return!a.milestone}})})}"gauge pie sunburst wordcloud sankey histogram pareto vector windbarb treemap bellcurve sma map mapline".split(" ").forEach(function(a){g[a]&&
(g[a].prototype.dragDropProps=null)});var U={"default":{className:"highcharts-drag-box-default",lineWidth:1,lineColor:"#888",color:"rgba(0, 0, 0, 0.1)",cursor:"move",zIndex:900}},V={className:"highcharts-drag-handle",color:"#fff",lineColor:"rgba(0, 0, 0, 0.6)",lineWidth:1,zIndex:901};e.Chart.prototype.setGuideBoxState=function(a,b){var c=this.dragGuideBox;b=p(U,b);a=p(b["default"],b[a]);return c.attr({className:a.className,stroke:a.lineColor,strokeWidth:a.lineWidth,fill:a.color,cursor:a.cursor,zIndex:a.zIndex}).css({pointerEvents:"none"})};
q.prototype.getDropValues=function(a,b,c){var d=this,f=d.series,e=p(f.options.dragDrop,d.options.dragDrop),g={},C=a.points[d.id],h;for(h in c)if(Object.hasOwnProperty.call(c,h)){if("undefined"!==typeof l){var l=!1;break}l=!0}m(c,function(a,c){var h=C[c],n=f[a.axis+"Axis"];n=n.toValue((n.horiz?b.chartX:b.chartY)+C[c+"Offset"]);var k=a.axis.toUpperCase(),m=f[k.toLowerCase()+"Axis"].categories?1:0;m=v(e["dragPrecision"+k],m);var p=v(e["dragMin"+k],-Infinity);k=v(e["dragMax"+k],Infinity);m&&(n=Math.round(n/
m)*m);n=T(n,p,k);l&&a.propValidate&&!a.propValidate(n,d)||"undefined"===typeof h||(g[c]=n)});return g};e.Series.prototype.getGuideBox=function(a){var b=this.chart,c=Infinity,d=-Infinity,f=Infinity,e=-Infinity,g;a.forEach(function(a){(a=a.graphic&&a.graphic.getBBox()||a.shapeArgs)&&(a.width||a.height||a.x||a.y)&&(g=!0,c=Math.min(a.x,c),d=Math.max(a.x+a.width,d),f=Math.min(a.y,f),e=Math.max(a.y+a.height,e))});return g?b.renderer.rect(c,f,d-c,e-f):b.renderer.g()};q.prototype.showDragHandles=function(){var a=
this,b=a.series,c=b.chart,d=c.renderer,f=p(b.options.dragDrop,a.options.dragDrop);m(b.dragDropProps,function(e,g){var h=p(V,e.handleOptions,f.dragHandle),l={className:h.className,"stroke-width":h.lineWidth,fill:h.color,stroke:h.lineColor},m=h.pathFormatter||e.handleFormatter,k=e.handlePositioner,n=e.validateIndividualDrag?e.validateIndividualDrag(a):!0;e.resize&&n&&e.resizeSide&&m&&(f["draggable"+e.axis.toUpperCase()]||f[e.optionName])&&!1!==f[e.optionName]&&(c.dragHandles||(c.dragHandles={group:d.g("drag-drop-handles").add(b.markerGroup||
b.group)}),c.dragHandles.point=a.id,k=k(a),l.d=m=m(a),!m||0>k.x||0>k.y||(l.cursor=h.cursor||"x"===e.axis!==!!c.inverted?"ew-resize":"ns-resize",(h=c.dragHandles[e.optionName])||(h=c.dragHandles[e.optionName]=d.path().add(c.dragHandles.group)),h.translate(k.x,k.y).attr(l),x(h.element,["touchstart","mousedown"],function(b){b=w(b,c);var d=a.series.chart;d.zoomOrPanKeyPressed(b)||(d.mouseIsDown=!1,D(b,a),d.dragDropData.updateProp=b.updateProp=g,a.firePointEvent("dragStart",b),b.stopPropagation(),b.preventDefault())}),
t(c.dragHandles.group.element,"mouseover",function(){c.dragDropData=c.dragDropData||{};c.dragDropData.isHoveringHandle=a.id}),x(c.dragHandles.group.element,["touchend","mouseout"],function(){var b=a.series.chart;b.dragDropData&&a.id===b.dragDropData.isHoveringHandle&&delete b.dragDropData.isHoveringHandle;b.hoverPoint||F(a)})))})};e.Chart.prototype.hideDragHandles=function(){this.dragHandles&&(m(this.dragHandles,function(a,b){"group"!==b&&a.destroy&&a.destroy()}),this.dragHandles.group&&this.dragHandles.group.destroy&&
this.dragHandles.group.destroy(),delete this.dragHandles)};t(q,"mouseOver",function(){var a=this;setTimeout(function(){var b=a.series,c=b&&b.chart,d=c&&c.dragDropData,e=c&&c.is3d&&c.is3d();!c||d&&d.isDragging&&d.draggedPastSensitivity||c.isDragDropAnimating||!b.options.dragDrop||e||(c.dragHandles&&c.hideDragHandles(),a.showDragHandles())},12)});t(q,"mouseOut",function(){var a=this;setTimeout(function(){a.series&&F(a)},10)});t(q,"remove",function(){var a=this.series.chart,b=a.dragHandles;b&&b.point===
this.id&&a.hideDragHandles()});e.Chart.prototype.zoomOrPanKeyPressed=function(a){var b=this.userOptions.chart||{},c=b.panKey&&b.panKey+"Key";return a[b.zoomKey&&b.zoomKey+"Key"]||a[c]};t(e.Chart,"render",function(){this.hasAddedDragDropEvents||S(this)})});r(e,"masters/modules/draggable-points.src.js",[],function(){})});
//# sourceMappingURL=draggable-points.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+31
View File
@@ -0,0 +1,31 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Highcharts Drilldown module
Author: Torstein Honsi
License: www.highcharts.com/license
*/
(function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/drilldown",["highcharts"],function(m){c(m);c.Highcharts=m;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function m(c,m,p,t){c.hasOwnProperty(m)||(c[m]=t.apply(null,p))}c=c?c._modules:{};m(c,"Extensions/Drilldown.js",[c["Core/Chart/Chart.js"],c["Core/Color.js"],c["Core/Globals.js"],c["Core/Options.js"],c["Core/Series/Point.js"],
c["Core/Renderer/SVG/SVGRenderer.js"],c["Core/Axis/Tick.js"],c["Core/Utilities.js"]],function(c,m,p,t,y,E,A,k){t=t.defaultOptions;var n=k.addEvent,F=k.removeEvent,B=k.animObject,u=k.extend,x=k.fireEvent,G=k.format,v=k.merge,C=k.objectEach,w=k.pick,H=k.syncTimeout,I=p.noop,q=p.seriesTypes;k=q.pie;q=q.column;var D=1;u(t.lang,{drillUpText:"\u25c1 Back to {series.name}"});t.drilldown={activeAxisLabelStyle:{cursor:"pointer",color:"#003399",fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",
color:"#003399",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}}};E.prototype.Element.prototype.fadeIn=function(a){this.attr({opacity:.1,visibility:"inherit"}).animate({opacity:w(this.newOpacity,1)},a||{duration:250})};c.prototype.addSeriesAsDrilldown=function(a,b){this.addSingleSeriesAsDrilldown(a,b);this.applyDrilldown()};c.prototype.addSingleSeriesAsDrilldown=function(a,b){var d=a.series,f=d.xAxis,e=d.yAxis,g=[],r=[],h;var l=
this.styledMode?{colorIndex:w(a.colorIndex,d.colorIndex)}:{color:a.color||d.color};this.drilldownLevels||(this.drilldownLevels=[]);var c=d.options._levelNumber||0;(h=this.drilldownLevels[this.drilldownLevels.length-1])&&h.levelNumber!==c&&(h=void 0);b=u(u({_ddSeriesId:D++},l),b);var k=d.points.indexOf(a);d.chart.series.forEach(function(a){a.xAxis!==f||a.isDrilling||(a.options._ddSeriesId=a.options._ddSeriesId||D++,a.options._colorIndex=a.userOptions._colorIndex,a.options._levelNumber=a.options._levelNumber||
c,h?(g=h.levelSeries,r=h.levelSeriesOptions):(g.push(a),a.purgedOptions=v({_ddSeriesId:a.options._ddSeriesId,_levelNumber:a.options._levelNumber,selected:a.options.selected},a.userOptions),r.push(a.purgedOptions)))});a=u({levelNumber:c,seriesOptions:d.options,seriesPurgedOptions:d.purgedOptions,levelSeriesOptions:r,levelSeries:g,shapeArgs:a.shapeArgs,bBox:a.graphic?a.graphic.getBBox():{},color:a.isNull?(new m(l.color)).setOpacity(0).get():l.color,lowerSeriesOptions:b,pointOptions:d.options.data[k],
pointIndex:k,oldExtremes:{xMin:f&&f.userMin,xMax:f&&f.userMax,yMin:e&&e.userMin,yMax:e&&e.userMax},resetZoomButton:this.resetZoomButton},l);this.drilldownLevels.push(a);f&&f.names&&(f.names.length=0);b=a.lowerSeries=this.addSeries(b,!1);b.options._levelNumber=c+1;f&&(f.oldPos=f.pos,f.userMin=f.userMax=null,e.userMin=e.userMax=null);d.type===b.type&&(b.animate=b.animateDrilldown||I,b.options.animation=!0)};c.prototype.applyDrilldown=function(){var a=this.drilldownLevels;if(a&&0<a.length){var b=a[a.length-
1].levelNumber;this.drilldownLevels.forEach(function(a){a.levelNumber===b&&a.levelSeries.forEach(function(a){a.options&&a.options._levelNumber===b&&a.remove(!1)})})}this.resetZoomButton&&(this.resetZoomButton.hide(),delete this.resetZoomButton);this.pointer.reset();this.redraw();this.showDrillUpButton();x(this,"afterDrilldown")};c.prototype.getDrilldownBackText=function(){var a=this.drilldownLevels;if(a&&0<a.length)return a=a[a.length-1],a.series=a.seriesOptions,G(this.options.lang.drillUpText,a)};
c.prototype.showDrillUpButton=function(){var a=this,b=this.getDrilldownBackText(),d=a.options.drilldown.drillUpButton,f;if(this.drillUpButton)this.drillUpButton.attr({text:b}).align();else{var e=(f=d.theme)&&f.states;this.drillUpButton=this.renderer.button(b,null,null,function(){a.drillUp()},f,e&&e.hover,e&&e.select).addClass("highcharts-drillup-button").attr({align:d.position.align,zIndex:7}).add().align(d.position,!1,d.relativeTo||"plotBox")}};c.prototype.drillUp=function(){if(this.drilldownLevels&&
0!==this.drilldownLevels.length){for(var a=this,b=a.drilldownLevels,d=b[b.length-1].levelNumber,f=b.length,e=a.series,g,c,h,l,k=function(b){e.forEach(function(a){a.options._ddSeriesId===b._ddSeriesId&&(d=a)});var d=d||a.addSeries(b,!1);d.type===h.type&&d.animateDrillupTo&&(d.animate=d.animateDrillupTo);b===c.seriesPurgedOptions&&(l=d)};f--;)if(c=b[f],c.levelNumber===d){b.pop();h=c.lowerSeries;if(!h.chart)for(g=e.length;g--;)if(e[g].options.id===c.lowerSeriesOptions.id&&e[g].options._levelNumber===
d+1){h=e[g];break}h.xData=[];c.levelSeriesOptions.forEach(k);x(a,"drillup",{seriesOptions:c.seriesPurgedOptions||c.seriesOptions});l.type===h.type&&(l.drilldownLevel=c,l.options.animation=a.options.drilldown.animation,h.animateDrillupFrom&&h.chart&&h.animateDrillupFrom(c));l.options._levelNumber=d;h.remove(!1);l.xAxis&&(g=c.oldExtremes,l.xAxis.setExtremes(g.xMin,g.xMax,!1),l.yAxis.setExtremes(g.yMin,g.yMax,!1));c.resetZoomButton&&(a.resetZoomButton=c.resetZoomButton,a.resetZoomButton.show())}this.redraw();
0===this.drilldownLevels.length?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align();this.ddDupes.length=[];x(a,"drillupall")}};n(c,"afterInit",function(){var a=this;a.drilldown={update:function(b,d){v(!0,a.options.drilldown,b);w(d,!0)&&a.redraw()}}});n(c,"beforeShowResetZoom",function(){if(this.drillUpButton)return!1});n(c,"render",function(){(this.xAxis||[]).forEach(function(a){a.ddPoints={};a.series.forEach(function(b){var d,f=b.xData||
[],e=b.points;for(d=0;d<f.length;d++){var c=b.options.data[d];"number"!==typeof c&&(c=b.pointClass.prototype.optionsToObject.call({series:b},c),c.drilldown&&(a.ddPoints[f[d]]||(a.ddPoints[f[d]]=[]),a.ddPoints[f[d]].push(e?e[d]:!0)))}});C(a.ticks,A.prototype.drillable)})});q.prototype.animateDrillupTo=function(a){if(!a){var b=this,d=b.drilldownLevel;this.points.forEach(function(a){var b=a.dataLabel;a.graphic&&a.graphic.hide();b&&(b.hidden="hidden"===b.attr("visibility"),b.hidden||(b.hide(),a.connector&&
a.connector.hide()))});H(function(){b.points&&b.points.forEach(function(a,b){b=b===(d&&d.pointIndex)?"show":"fadeIn";var c="show"===b?!0:void 0,f=a.dataLabel;if(a.graphic)a.graphic[b](c);f&&!f.hidden&&(f.fadeIn(),a.connector&&a.connector.fadeIn())})},Math.max(this.chart.options.drilldown.animation.duration-50,0));delete this.animate}};q.prototype.animateDrilldown=function(a){var b=this,d=this.chart,c=d.drilldownLevels,e,g=B(d.options.drilldown.animation),r=this.xAxis,h=d.styledMode;a||(c.forEach(function(a){b.options._ddSeriesId===
a.lowerSeriesOptions._ddSeriesId&&(e=a.shapeArgs,h||(e.fill=a.color))}),e.x+=w(r.oldPos,r.pos)-r.pos,this.points.forEach(function(a){var d=a.shapeArgs;h||(d.fill=a.color);a.graphic&&a.graphic.attr(e).animate(u(a.shapeArgs,{fill:a.color||b.color}),g);a.dataLabel&&a.dataLabel.fadeIn(g)}),delete this.animate)};q.prototype.animateDrillupFrom=function(a){var b=B(this.chart.options.drilldown.animation),d=this.group,c=d!==this.chart.columnGroup,e=this;e.trackerGroups.forEach(function(a){if(e[a])e[a].on("mouseover")});
c&&delete this.group;this.points.forEach(function(f){var g=f.graphic,h=a.shapeArgs,l=function(){g.destroy();d&&c&&(d=d.destroy())};g&&h&&(delete f.graphic,e.chart.styledMode||(h.fill=a.color),b.duration?g.animate(h,v(b,{complete:l})):(g.attr(h),l()))})};k&&u(k.prototype,{animateDrillupTo:q.prototype.animateDrillupTo,animateDrillupFrom:q.prototype.animateDrillupFrom,animateDrilldown:function(a){var b=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],d=this.chart.options.drilldown.animation;
this.is("item")&&(d.duration=0);if(this.center){var c=b.shapeArgs,e=c.start,g=(c.end-e)/this.points.length,k=this.chart.styledMode;a||(this.points.forEach(function(a,f){var h=a.shapeArgs;k||(c.fill=b.color,h.fill=a.color);if(a.graphic)a.graphic.attr(v(c,{start:e+f*g,end:e+(f+1)*g}))[d?"animate":"attr"](h,d)}),delete this.animate)}}});y.prototype.doDrilldown=function(a,b,d){var c=this.series.chart,e=c.options.drilldown,g=(e.series||[]).length;c.ddDupes||(c.ddDupes=[]);for(;g--&&!k;)if(e.series[g].id===
this.drilldown&&-1===c.ddDupes.indexOf(this.drilldown)){var k=e.series[g];c.ddDupes.push(this.drilldown)}x(c,"drilldown",{point:this,seriesOptions:k,category:b,originalEvent:d,points:"undefined"!==typeof b&&this.series.xAxis.getDDPoints(b).slice(0)},function(b){var d=b.point.series&&b.point.series.chart,c=b.seriesOptions;d&&c&&(a?d.addSingleSeriesAsDrilldown(b.point,c):d.addSeriesAsDrilldown(b.point,c))})};p.Axis.prototype.drilldownCategory=function(a,b){C(this.getDDPoints(a),function(d){d&&d.series&&
d.series.visible&&d.doDrilldown&&d.doDrilldown(!0,a,b)});this.chart.applyDrilldown()};p.Axis.prototype.getDDPoints=function(a){return this.ddPoints&&this.ddPoints[a]};A.prototype.drillable=function(){var a=this.pos,b=this.label,d=this.axis,c="xAxis"===d.coll&&d.getDDPoints,e=c&&d.getDDPoints(a),g=d.chart.styledMode;c&&(b&&e&&e.length?(b.drillable=!0,b.basicStyles||g||(b.basicStyles=v(b.styles)),b.addClass("highcharts-drilldown-axis-label"),b.removeOnDrillableClick&&F(b.element,"click"),b.removeOnDrillableClick=
n(b.element,"click",function(b){b.preventDefault();d.drilldownCategory(a,b)}),g||b.css(d.chart.options.drilldown.activeAxisLabelStyle)):b&&b.drillable&&b.removeOnDrillableClick&&(g||(b.styles={},b.css(b.basicStyles)),b.removeOnDrillableClick(),b.removeClass("highcharts-drilldown-axis-label")))};n(y,"afterInit",function(){var a=this,b=a.series;a.drilldown&&n(a,"click",function(c){b.xAxis&&!1===b.chart.options.drilldown.allowPointDrilldown?b.xAxis.drilldownCategory(a.x,c):a.doDrilldown(void 0,void 0,
c)});return a});n(p.Series,"afterDrawDataLabels",function(){var a=this.chart.options.drilldown.activeDataLabelStyle,b=this.chart.renderer,c=this.chart.styledMode;this.points.forEach(function(d){var e=d.options.dataLabels,f=w(d.dlOptions,e&&e.style,{});d.drilldown&&d.dataLabel&&("contrast"!==a.color||c||(f.color=b.getContrast(d.color||this.color)),e&&e.color&&(f.color=e.color),d.dataLabel.addClass("highcharts-drilldown-data-label"),c||d.dataLabel.css(a).css(f))},this)});var z=function(a,b,c,f){a[c?
"addClass":"removeClass"]("highcharts-drilldown-point");f||a.css({cursor:b})};n(p.Series,"afterDrawTracker",function(){var a=this.chart.styledMode;this.points.forEach(function(b){b.drilldown&&b.graphic&&z(b.graphic,"pointer",!0,a)})});n(y,"afterSetState",function(){var a=this.series.chart.styledMode;this.drilldown&&this.series.halo&&"hover"===this.state?z(this.series.halo,"pointer",!0,a):this.series.halo&&z(this.series.halo,"auto",!1,a)})});m(c,"masters/modules/drilldown.src.js",[],function(){})});
//# sourceMappingURL=drilldown.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+27
View File
@@ -0,0 +1,27 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
(c) 2009-2019 Sebastian Bochan, Rafal Sebestjanski
License: www.highcharts.com/license
*/
(function(d){"object"===typeof module&&module.exports?(d["default"]=d,module.exports=d):"function"===typeof define&&define.amd?define("highcharts/modules/dumbbell",["highcharts"],function(t){d(t);d.Highcharts=t;return d}):d("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(d){function t(d,r,m,x){d.hasOwnProperty(r)||(d[r]=x.apply(null,m))}d=d?d._modules:{};t(d,"Series/AreaRangeSeries.js",[d["Core/Globals.js"],d["Core/Series/Point.js"],d["Core/Utilities.js"]],function(d,r,m){var x=m.defined,
n=m.extend,t=m.isArray,y=m.isNumber,v=m.pick;m=m.seriesType;var w=d.seriesTypes,u=d.Series.prototype,a=r.prototype;m("arearange","area",{lineWidth:1,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:!0,dataLabels:{align:void 0,verticalAlign:void 0,xLow:0,xHigh:0,yLow:0,yHigh:0}},{pointArrayMap:["low","high"],pointValKey:"low",deferTranslatePolar:!0,toYData:function(a){return[a.low,a.high]},
highToXY:function(a){var c=this.chart,b=this.xAxis.postTranslate(a.rectPlotX,this.yAxis.len-a.plotHigh);a.plotHighX=b.x-c.plotLeft;a.plotHigh=b.y-c.plotTop;a.plotLowX=a.plotX},translate:function(){var a=this,c=a.yAxis,b=!!a.modifyValue;w.area.prototype.translate.apply(a);a.points.forEach(function(g){var k=g.high,e=g.plotY;g.isNull?g.plotY=null:(g.plotLow=e,g.plotHigh=c.translate(b?a.modifyValue(k,g):k,0,1,0,1),b&&(g.yBottom=g.plotHigh))});this.chart.polar&&this.points.forEach(function(b){a.highToXY(b);
b.tooltipPos=[(b.plotHighX+b.plotLowX)/2,(b.plotHigh+b.plotLow)/2]})},getGraphPath:function(a){var c=[],b=[],g,f=w.area.prototype.getGraphPath;var e=this.options;var d=this.chart.polar,p=d&&!1!==e.connectEnds,q=e.connectNulls,l=e.step;a=a||this.points;for(g=a.length;g--;){var h=a[g];var n=d?{plotX:h.rectPlotX,plotY:h.yBottom,doCurve:!1}:{plotX:h.plotX,plotY:h.plotY,doCurve:!1};h.isNull||p||q||a[g+1]&&!a[g+1].isNull||b.push(n);var m={polarPlotY:h.polarPlotY,rectPlotX:h.rectPlotX,yBottom:h.yBottom,
plotX:v(h.plotHighX,h.plotX),plotY:h.plotHigh,isNull:h.isNull};b.push(m);c.push(m);h.isNull||p||q||a[g-1]&&!a[g-1].isNull||b.push(n)}a=f.call(this,a);l&&(!0===l&&(l="left"),e.step={left:"right",center:"center",right:"left"}[l]);c=f.call(this,c);b=f.call(this,b);e.step=l;e=[].concat(a,c);!this.chart.polar&&b[0]&&"M"===b[0][0]&&(b[0]=["L",b[0][1],b[0][2]]);this.graphPath=e;this.areaPath=a.concat(b);e.isArea=!0;e.xMap=a.xMap;this.areaPath.xMap=a.xMap;return e},drawDataLabels:function(){var a=this.points,
c=a.length,b,d=[],f=this.options.dataLabels,e,m=this.chart.inverted;if(t(f))if(1<f.length){var p=f[0];var q=f[1]}else p=f[0],q={enabled:!1};else p=n({},f),p.x=f.xHigh,p.y=f.yHigh,q=n({},f),q.x=f.xLow,q.y=f.yLow;if(p.enabled||this._hasPointLabels){for(b=c;b--;)if(e=a[b]){var l=p.inside?e.plotHigh<e.plotLow:e.plotHigh>e.plotLow;e.y=e.high;e._plotY=e.plotY;e.plotY=e.plotHigh;d[b]=e.dataLabel;e.dataLabel=e.dataLabelUpper;e.below=l;m?p.align||(p.align=l?"right":"left"):p.verticalAlign||(p.verticalAlign=
l?"top":"bottom")}this.options.dataLabels=p;u.drawDataLabels&&u.drawDataLabels.apply(this,arguments);for(b=c;b--;)if(e=a[b])e.dataLabelUpper=e.dataLabel,e.dataLabel=d[b],delete e.dataLabels,e.y=e.low,e.plotY=e._plotY}if(q.enabled||this._hasPointLabels){for(b=c;b--;)if(e=a[b])l=q.inside?e.plotHigh<e.plotLow:e.plotHigh>e.plotLow,e.below=!l,m?q.align||(q.align=l?"left":"right"):q.verticalAlign||(q.verticalAlign=l?"bottom":"top");this.options.dataLabels=q;u.drawDataLabels&&u.drawDataLabels.apply(this,
arguments)}if(p.enabled)for(b=c;b--;)if(e=a[b])e.dataLabels=[e.dataLabelUpper,e.dataLabel].filter(function(a){return!!a});this.options.dataLabels=f},alignDataLabel:function(){w.column.prototype.alignDataLabel.apply(this,arguments)},drawPoints:function(){var a=this.points.length,c;u.drawPoints.apply(this,arguments);for(c=0;c<a;){var b=this.points[c];b.origProps={plotY:b.plotY,plotX:b.plotX,isInside:b.isInside,negative:b.negative,zone:b.zone,y:b.y};b.lowerGraphic=b.graphic;b.graphic=b.upperGraphic;
b.plotY=b.plotHigh;x(b.plotHighX)&&(b.plotX=b.plotHighX);b.y=b.high;b.negative=b.high<(this.options.threshold||0);b.zone=this.zones.length&&b.getZone();this.chart.polar||(b.isInside=b.isTopInside="undefined"!==typeof b.plotY&&0<=b.plotY&&b.plotY<=this.yAxis.len&&0<=b.plotX&&b.plotX<=this.xAxis.len);c++}u.drawPoints.apply(this,arguments);for(c=0;c<a;)b=this.points[c],b.upperGraphic=b.graphic,b.graphic=b.lowerGraphic,n(b,b.origProps),delete b.origProps,c++},setStackedPoints:d.noop},{setState:function(){var g=
this.state,c=this.series,b=c.chart.polar;x(this.plotHigh)||(this.plotHigh=c.yAxis.toPixels(this.high,!0));x(this.plotLow)||(this.plotLow=this.plotY=c.yAxis.toPixels(this.low,!0));c.stateMarkerGraphic&&(c.lowerStateMarkerGraphic=c.stateMarkerGraphic,c.stateMarkerGraphic=c.upperStateMarkerGraphic);this.graphic=this.upperGraphic;this.plotY=this.plotHigh;b&&(this.plotX=this.plotHighX);a.setState.apply(this,arguments);this.state=g;this.plotY=this.plotLow;this.graphic=this.lowerGraphic;b&&(this.plotX=this.plotLowX);
c.stateMarkerGraphic&&(c.upperStateMarkerGraphic=c.stateMarkerGraphic,c.stateMarkerGraphic=c.lowerStateMarkerGraphic,c.lowerStateMarkerGraphic=void 0);a.setState.apply(this,arguments)},haloPath:function(){var g=this.series.chart.polar,c=[];this.plotY=this.plotLow;g&&(this.plotX=this.plotLowX);this.isInside&&(c=a.haloPath.apply(this,arguments));this.plotY=this.plotHigh;g&&(this.plotX=this.plotHighX);this.isTopInside&&(c=c.concat(a.haloPath.apply(this,arguments)));return c},destroyElements:function(){["lowerGraphic",
"upperGraphic"].forEach(function(a){this[a]&&(this[a]=this[a].destroy())},this);this.graphic=null;return a.destroyElements.apply(this,arguments)},isValid:function(){return y(this.low)&&y(this.high)}});""});t(d,"Series/DumbbellSeries.js",[d["Core/Globals.js"],d["Core/Utilities.js"]],function(d,r){var m=d.SVGRenderer,t=r.extend,n=r.pick;r=r.seriesType;var z=d.seriesTypes,y=d.Series.prototype,v=z.arearange.prototype,w=z.column.prototype,u=v.pointClass.prototype;r("dumbbell","arearange",{trackByArea:!1,
fillColor:"none",lineWidth:0,pointRange:1,connectorWidth:1,stickyTracking:!1,groupPadding:.2,crisp:!1,pointPadding:.1,lowColor:"#333333",states:{hover:{lineWidthPlus:0,connectorWidthPlus:1,halo:!1}}},{trackerGroups:["group","markerGroup","dataLabelsGroup"],drawTracker:d.TrackerMixin.drawTrackerPoint,drawGraph:d.noop,crispCol:w.crispCol,getConnectorAttribs:function(a){var g=this.chart,c=a.options,b=this.options,d=this.xAxis,f=this.yAxis,e=n(c.connectorWidth,b.connectorWidth),r=n(c.connectorColor,b.connectorColor,
c.color,a.zone?a.zone.color:void 0,a.color),p=n(b.states&&b.states.hover&&b.states.hover.connectorWidthPlus,1),q=n(c.dashStyle,b.dashStyle),l=n(a.plotLow,a.plotY),h=f.toPixels(b.threshold||0,!0);h=n(a.plotHigh,g.inverted?f.len-h:h);a.state&&(e+=p);0>l?l=0:l>=f.len&&(l=f.len);0>h?h=0:h>=f.len&&(h=f.len);if(0>a.plotX||a.plotX>d.len)e=0;a.upperGraphic&&(d={y:a.y,zone:a.zone},a.y=a.high,a.zone=a.zone?a.getZone():void 0,r=n(c.connectorColor,b.connectorColor,c.color,a.zone?a.zone.color:void 0,a.color),
t(a,d));a={d:m.prototype.crispLine([["M",a.plotX,l],["L",a.plotX,h]],e,"ceil")};g.styledMode||(a.stroke=r,a["stroke-width"]=e,q&&(a.dashstyle=q));return a},drawConnector:function(a){var d=n(this.options.animationLimit,250);d=a.connector&&this.chart.pointCount<d?"animate":"attr";a.connector||(a.connector=this.chart.renderer.path().addClass("highcharts-lollipop-stem").attr({zIndex:-1}).add(this.markerGroup));a.connector[d](this.getConnectorAttribs(a))},getColumnMetrics:function(){var a=w.getColumnMetrics.apply(this,
arguments);a.offset+=a.width/2;return a},translatePoint:v.translate,setShapeArgs:z.columnrange.prototype.translate,translate:function(){this.setShapeArgs.apply(this);this.translatePoint.apply(this,arguments);this.points.forEach(function(a){var d=a.shapeArgs,c=a.pointWidth;a.plotX=d.x;d.x=a.plotX-c/2;a.tooltipPos=null});this.columnMetrics.offset-=this.columnMetrics.width/2},seriesDrawPoints:v.drawPoints,drawPoints:function(){var a=this.chart,d=this.points.length,c=this.lowColor=this.options.lowColor,
b=0;for(this.seriesDrawPoints.apply(this,arguments);b<d;){var k=this.points[b];this.drawConnector(k);k.upperGraphic&&(k.upperGraphic.element.point=k,k.upperGraphic.addClass("highcharts-lollipop-high"));k.connector.element.point=k;if(k.lowerGraphic){var f=k.zone&&k.zone.color;f=n(k.options.lowColor,c,k.options.color,f,k.color,this.color);a.styledMode||k.lowerGraphic.attr({fill:f});k.lowerGraphic.addClass("highcharts-lollipop-low")}b++}},markerAttribs:function(){var a=v.markerAttribs.apply(this,arguments);
a.x=Math.floor(a.x);a.y=Math.floor(a.y);return a},pointAttribs:function(a,d){var c=y.pointAttribs.apply(this,arguments);"hover"===d&&delete c.fill;return c}},{destroyElements:u.destroyElements,isValid:u.isValid,pointSetState:u.setState,setState:function(){var a=this.series,d=a.chart,c=a.options.marker,b=this.options,k=n(b.lowColor,a.options.lowColor,b.color,this.zone&&this.zone.color,this.color,a.color),f="attr";this.pointSetState.apply(this,arguments);this.state||(f="animate",this.lowerGraphic&&
!d.styledMode&&(this.lowerGraphic.attr({fill:k}),this.upperGraphic&&(d={y:this.y,zone:this.zone},this.y=this.high,this.zone=this.zone?this.getZone():void 0,c=n(this.marker?this.marker.fillColor:void 0,c?c.fillColor:void 0,b.color,this.zone?this.zone.color:void 0,this.color),this.upperGraphic.attr({fill:c}),t(this,d))));this.connector[f](a.getConnectorAttribs(this))}});""});t(d,"masters/modules/dumbbell.src.js",[],function(){})});
//# sourceMappingURL=dumbbell.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+30
View File
@@ -0,0 +1,30 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
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,d,e,c){a.hasOwnProperty(d)||(a[d]=c.apply(null,e))}a=a?a._modules:{};g(a,"Extensions/DownloadURL.js",[a["Core/Globals.js"]],function(a){var d=a.win,e=d.navigator,c=d.document,
g=d.URL||d.webkitURL||d,u=/Edge\/\d+/.test(e.userAgent),v=a.dataURLtoBlob=function(f){if((f=f.match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3<f.length&&d.atob&&d.ArrayBuffer&&d.Uint8Array&&d.Blob&&g.createObjectURL){var a=d.atob(f[3]),c=new d.ArrayBuffer(a.length);c=new d.Uint8Array(c);for(var e=0;e<c.length;++e)c[e]=a.charCodeAt(e);f=new d.Blob([c],{type:f[1]});return g.createObjectURL(f)}};a=a.downloadURL=function(a,p){var f=c.createElement("a");if("string"===typeof a||a instanceof String||
!e.msSaveOrOpenBlob){a=""+a;if(u||2E6<a.length)if(a=v(a)||"",!a)throw Error("Failed to convert to blob");if("undefined"!==typeof f.download)f.href=a,f.download=p,c.body.appendChild(f),f.click(),c.body.removeChild(f);else try{var g=d.open(a,"chart");if("undefined"===typeof g||null===g)throw Error("Failed to open window");}catch(E){d.location.href=a}}else e.msSaveOrOpenBlob(a,p)};return{dataURLtoBlob:v,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,d,e,c,g){function u(a,d){var b=p.navigator,f=-1<b.userAgent.indexOf("WebKit")&&0>b.userAgent.indexOf("Chrome"),c=p.URL||p.webkitURL||p;try{if(b.msSaveOrOpenBlob&&p.MSBlobBuilder){var q=new p.MSBlobBuilder;q.append(a);return q.getBlob("image/svg+xml")}if(!f)return c.createObjectURL(new p.Blob(["\ufeff"+a],{type:d}))}catch(M){}}var v=e.doc,f=e.seriesTypes,p=e.win;e=c.addEvent;var I=c.defined,J=c.extend,E=c.find,D=
c.fireEvent,K=c.getOptions,L=c.isNumber,w=c.pick;c=c.setOptions;var F=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:"Descargar en CSV",downloadXLS:"Descargar en XLS",exportData:{annotationHeader:"Annotations",categoryHeader:"Categoria",categoryDatetimeHeader:"DateTime"},viewData:"Ver tabla de datos",
hideData:"Ocultar tabla de datos"}});e(d,"render",function(){this.options&&this.options.exporting&&this.options.exporting.showTable&&!this.options.chart.forExport&&!this.dataTableDiv&&this.viewData()});d.prototype.setUpKeyToAxis=function(){f.arearange&&(f.arearange.prototype.keyToAxis={low:"y",high:"y"});f.gantt&&(f.gantt.prototype.keyToAxis={start:"x",end:"x"})};d.prototype.getDataRows=function(b){var d=this.hasParallelCoordinates,f=this.time,c=this.options.exporting&&this.options.exporting.csv||{},e=this.xAxis,
q={},g=[],p=[],n=[],r;var t=this.options.lang.exportData;var A=t.categoryHeader,x=t.categoryDatetimeHeader,G=function(l,d,f){if(c.columnHeaderFormatter){var h=c.columnHeaderFormatter(l,d,f);if(!1!==h)return h}return l?l instanceof a?l.options.title&&l.options.title.text||(l.dateTime?x:A):b?{columnTitle:1<f?d:l.name,topLevelColumnTitle:l.name}:l.name+(1<f?" ("+d+")":""):A},H=function(l,a,b){var d={},f={};a.forEach(function(a){var c=(l.keyToAxis&&l.keyToAxis[a]||a)+"Axis";c=L(b)?l.chart[c][b]:l[c];
d[a]=c&&c.categories||[];f[a]=c&&c.dateTime});return{categoryMap:d,dateTimeValueAxisMap:f}},y=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 z=0;this.setUpKeyToAxis();this.series.forEach(function(a){var x=a.xAxis,l=a.options.keys||y(a,x),g=l.length,m=!a.requireSorting&&
{},C=e.indexOf(x),A=H(a,l),k;if(!1!==a.options.includeInDataExport&&!a.options.isInternal&&!1!==a.visible){E(h,function(a){return a[0]===C})||h.push([C,z]);for(k=0;k<g;)r=G(a,l[k],l.length),n.push(r.columnTitle||r),b&&p.push(r.topLevelColumnTitle||r),k++;var t={chart:a.chart,autoIncrement:a.autoIncrement,options:a.options,pointArrayMap:a.pointArrayMap};a.options.data.forEach(function(b,h){d&&(A=H(a,l,h));var y={series:t};a.pointClass.prototype.applyOptions.apply(y,[b]);b=y.x;var e=a.data[h]&&a.data[h].name;
k=0;if(!x||"name"===a.exportKey||!d&&x&&x.hasNames&&e)b=e;m&&(m[b]&&(b+="|"+h),m[b]=!0);q[b]||(q[b]=[],q[b].xValues=[]);q[b].x=y.x;q[b].name=e;for(q[b].xValues[C]=y.x;k<g;)h=l[k],e=y[h],q[b][z+k]=w(A.categoryMap[h][e],A.dateTimeValueAxisMap[h]?f.dateFormat(c.dateFormat,e):null,e),k++});z+=k}});for(m in q)Object.hasOwnProperty.call(q,m)&&g.push(q[m]);var m=b?[p,n]:[n];for(z=h.length;z--;){var u=h[z][0];var v=h[z][1];var B=e[u];g.sort(function(a,b){return a.xValues[u]-b.xValues[u]});t=G(B);m[0].splice(v,
0,t);b&&m[1]&&m[1].splice(v,0,t);g.forEach(function(a){var b=a.name;B&&!I(b)&&(B.dateTime?(a.x instanceof Date&&(a.x=a.x.getTime()),b=f.dateFormat(c.dateFormat,a.x)):b=B.categories?w(B.names[a.x],B.categories[a.x],a.x):a.x);a.splice(v,0,b)})}m=m.concat(g);D(this,"exportData",{dataRows:m});return m};d.prototype.getCSV=function(a){var b="",d=this.getDataRows(),c=this.options.exporting.csv,f=w(c.decimalPoint,","!==c.itemDelimiter&&a?(1.1).toLocaleString()[1]:"."),e=w(c.itemDelimiter,","===f?";":","),
g=c.lineDelimiter;d.forEach(function(a,c){for(var k,q=a.length;q--;)k=a[q],"string"===typeof k&&(k='"'+k+'"'),"number"===typeof k&&"."!==f&&(k=k.toString().replace(".",f)),a[q]=k;b+=a.join(e);c<d.length-1&&(b+=g)});return b};d.prototype.getTable=function(a){var b='<table class="table table-responsive table-striped text-center" id="highcharts-data-table-'+this.index+'">',c=this.options,d=a?(1.1).toLocaleString()[1]:".",f=w(c.exporting.useMultiLevelHeaders,!0);a=this.getDataRows(f);var e=0,g=f?a.shift():null,p=a.shift(),n=function(a,b,c,f){var e=w(f,"");
b="text"+(b?" "+b:"");"number"===typeof e?(e=e.toString(),","===d&&(e=e.replace(".",d)),b="number"):f||(b="empty");return"<"+a+(c?" "+c:"")+' class="'+b+'">'+e+"</"+a+">"};!1!==c.exporting.tableCaption&&(b+='<caption class="highcharts-table-caption">'+w(c.exporting.tableCaption,c.title.text?c.title.text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):"Chart")+"</caption>");for(var r=0,t=a.length;r<t;++r)a[r].length>
e&&(e=a[r].length);b+=function(a,b,d){var e="<thead>",g=0;d=d||b&&b.length;var h,k=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<d;++g){h=a[g];var m=a[g+1];h===m?++k:k?(e+=n("th","highcharts-table-topheading",'scope="col" colspan="'+(k+1)+'"',h),k=0):(h===b[g]?c.exporting.useRowspanHeaders?(m=2,delete b[g]):(m=1,b[g]=""):m=1,e+=n("th","highcharts-table-topheading",'scope="col"'+(1<m?' valign="top" rowspan="'+m+'"':""),
h))}e+="</tr>"}if(b){e+="<tr>";g=0;for(d=b.length;g<d;++g)"undefined"!==typeof b[g]&&(e+=n("th",null,'scope="col"',b[g]));e+="</tr>"}return e+"</thead>"}(g,p,Math.max(e,p.length));b+="<tbody>";a.forEach(function(a){b+="<tr>";for(var c=0;c<e;c++)b+=n(c?"td":"th",null,c?"":'scope="row"',a[c]);b+="</tr>"});b+="</tbody></table>";a={html:b};D(this,"afterGetTable",a);return a.html};d.prototype.downloadCSV=function(){var a=this.getCSV(!0);F(u(a,"text/csv")||"data:text/csv,\ufeff"+encodeURIComponent(a),this.getFilename()+
".csv")};d.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>";F(u(a,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+p.btoa(unescape(encodeURIComponent(a))),this.getFilename()+".xls")};d.prototype.viewData=function(){this.dataTableDiv||(this.dataTableDiv=v.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)};d.prototype.hideData=function(){this.dataTableDiv&&"block"===this.dataTableDiv.style.display&&(this.dataTableDiv.style.display="none");this.isDataTableVisible=!1};d.prototype.toggleDataTable=function(){var a,c=this.exportDivElements,d=null===(a=null===n||void 0===n?void 0:n.buttons)||void 0===a?void 0:a.contextButton.menuItems;a=this.options.lang;this.isDataTableVisible?
this.hideData():this.viewData();(null===n||void 0===n?0:n.menuItemDefinitions)&&(null===a||void 0===a?0:a.viewData)&&a.hideData&&d&&c&&c.length&&(c[d.indexOf("viewData")].innerHTML=this.isDataTableVisible?a.hideData:a.viewData)};var n=K().exporting;n&&(J(n.menuItemDefinitions,{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.toggleDataTable()}}}),
n.buttons&&n.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
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+43
View File
@@ -0,0 +1,43 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Exporting module
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/exporting",["highcharts"],function(p){c(p);c.Highcharts=p;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function p(c,l,h,k){c.hasOwnProperty(l)||(c[l]=k.apply(null,h))}c=c?c._modules:{};p(c,"Extensions/FullScreen.js",[c["Core/Chart/Chart.js"],c["Core/Globals.js"],c["Core/Utilities.js"]],function(c,l,h){var k=h.addEvent;
h=function(){function c(e){this.chart=e;this.isOpen=!1;e=e.renderTo;this.browserProps||("function"===typeof e.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:e.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:e.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",
requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:e.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}c.prototype.close=function(){var e=this.chart;if(this.isOpen&&this.browserProps&&e.container.ownerDocument instanceof Document)e.container.ownerDocument[this.browserProps.exitFullscreen]();this.unbindFullscreenEvent&&this.unbindFullscreenEvent();this.isOpen=!1;
this.setButtonText()};c.prototype.open=function(){var e=this,c=e.chart;if(e.browserProps){e.unbindFullscreenEvent=k(c.container.ownerDocument,e.browserProps.fullscreenChange,function(){e.isOpen?(e.isOpen=!1,e.close()):(e.isOpen=!0,e.setButtonText())});var h=c.renderTo[e.browserProps.requestFullscreen]();if(h)h["catch"](function(){alert("Full screen is not supported inside a frame.")});k(c,"destroy",e.unbindFullscreenEvent)}};c.prototype.setButtonText=function(){var e,c=this.chart,h=c.exportDivElements,
k=c.options.exporting,l=null===(e=null===k||void 0===k?void 0:k.buttons)||void 0===e?void 0:e.contextButton.menuItems;e=c.options.lang;(null===k||void 0===k?0:k.menuItemDefinitions)&&(null===e||void 0===e?0:e.exitFullscreen)&&e.viewFullscreen&&l&&h&&h.length&&(h[l.indexOf("viewFullscreen")].innerHTML=this.isOpen?e.exitFullscreen:k.menuItemDefinitions.viewFullscreen.text||e.viewFullscreen)};c.prototype.toggle=function(){this.isOpen?this.close():this.open()};return c}();l.Fullscreen=h;k(c,"beforeRender",
function(){this.fullscreen=new l.Fullscreen(this)});return l.Fullscreen});p(c,"Mixins/Navigation.js",[],function(){return{initUpdate:function(c){c.navigation||(c.navigation={updates:[],update:function(c,h){this.updates.forEach(function(k){k.update.call(k.context,c,h)})}})},addUpdate:function(c,l){l.navigation||this.initUpdate(l);l.navigation.updates.push({update:c,context:l})}}});p(c,"Extensions/Exporting.js",[c["Core/Chart/Chart.js"],c["Mixins/Navigation.js"],c["Core/Globals.js"],c["Core/Options.js"],
c["Core/Renderer/SVG/SVGRenderer.js"],c["Core/Utilities.js"]],function(c,l,h,k,p,e){var x=h.doc,H=h.isTouchDevice,z=h.win;k=k.defaultOptions;var t=e.addEvent,u=e.css,y=e.createElement,D=e.discardElement,w=e.extend,I=e.find,B=e.fireEvent,J=e.isObject,n=e.merge,E=e.objectEach,q=e.pick,K=e.removeEvent,L=e.uniqueKey,F=z.navigator.userAgent,G=h.Renderer.prototype.symbols,M=/Edge\/|Trident\/|MSIE /.test(F),N=/firefox/i.test(F);w(k.lang,{viewFullscreen:"Ver en pantalla completa",exitFullscreen:"Exit from full screen",
printChart:"Imprimir gráfica",downloadPNG:"Descargar imagen en PNG",downloadJPEG:"Descargar imagen en JPEG",downloadPDF:"Descargar documento en PDF",downloadSVG:"Descargar imagen en vector SVG",contextButtonTitle:"Chart context menu"});k.navigation||(k.navigation={});n(!0,k.navigation,{buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}});n(!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"})}}}};h.post=function(a,b,f){var d=y("form",n({method:"post",action:a,enctype:"multipart/form-data"},f),{display:"none"},x.body);E(b,function(a,b){y("input",{type:"hidden",name:b,value:a},null,d)});d.submit();D(d)};h.isSafari&&h.win.matchMedia("print").addListener(function(a){h.printingChart&&(a.matches?h.printingChart.beforePrint():h.printingChart.afterPrint())});w(c.prototype,{sanitizeSVG:function(a,b){var f=a.indexOf("</svg>")+6,d=a.substr(f);
a=a.substr(0,f);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,f=n(this.options,a);f.plotOptions=n(this.userOptions.plotOptions,
a&&a.plotOptions);f.time=n(this.userOptions.time,a&&a.time);var d=y("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},x.body);var c=this.renderTo.style.width;var e=this.renderTo.style.height;c=f.exporting.sourceWidth||f.chart.width||/px$/.test(c)&&parseInt(c,10)||(f.isGantt?800:600);e=f.exporting.sourceHeight||f.chart.height||/px$/.test(e)&&parseInt(e,10)||400;w(f.chart,{animation:!1,renderTo:d,forExport:!0,renderer:"SVGRenderer",width:c,height:e});
f.exporting.enabled=!1;delete f.data;f.series=[];this.series.forEach(function(a){b=n(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});b.isInternal||f.series.push(b)});this.axes.forEach(function(a){a.userOptions.internalKey||(a.userOptions.internalKey=L())});var k=new h.Chart(f,this.callback);a&&["xAxis","yAxis","series"].forEach(function(b){var d={};a[b]&&(d[b]=a[b],k.update(d))});this.axes.forEach(function(a){var b=I(k.axes,function(b){return b.options.internalKey===
a.userOptions.internalKey}),d=a.getExtremes(),f=d.userMin;d=d.userMax;b&&("undefined"!==typeof f&&f!==b.min||"undefined"!==typeof d&&d!==b.max)&&b.setExtremes(f,d,!0,!1)});c=k.getChartHTML();B(this,"getSVG",{chartCopy:k});c=this.sanitizeSVG(c,f);f=null;k.destroy();D(d);return c},getSVGForExport:function(a,b){var f=this.options.exporting;return this.getSVG(n({chart:{borderRadius:0}},f.chartOptions,b,{exporting:{sourceWidth:a&&a.sourceWidth||f.sourceWidth,sourceHeight:a&&a.sourceHeight||f.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=n(this.options.exporting,a);h.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=x.body,b=this.options.exporting.printMaxWidth,f={childNodes:a.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0;this.pointer.reset(null,0);B(this,"beforePrint");b&&this.chartWidth>b&&(f.resetParams=[this.options.chart.width,
void 0,!1],this.setSize(b,void 0,!1));[].forEach.call(f.childNodes,function(a,b){1===a.nodeType&&(f.origDisplay[b]=a.style.display,a.style.display="none")});this.moveContainers(a);this.printReverseInfo=f},afterPrint:function(){if(this.printReverseInfo){var a=this.printReverseInfo.childNodes,b=this.printReverseInfo.origDisplay,f=this.printReverseInfo.resetParams;this.moveContainers(this.renderTo);[].forEach.call(a,function(a,f){1===a.nodeType&&(a.style.display=b[f]||"")});this.isPrinting=!1;f&&this.setSize.apply(this,
f);delete this.printReverseInfo;delete h.printingChart;B(this,"afterPrint")}},print:function(){var a=this;a.isPrinting||(h.printingChart=a,h.isSafari||a.beforePrint(),setTimeout(function(){z.focus();z.print();h.isSafari||setTimeout(function(){a.afterPrint()},1E3)},1))},contextMenu:function(a,b,f,d,c,h,k){var g=this,C=g.options.navigation,l=g.chartWidth,A=g.chartHeight,r="cache-"+a,m=g[r],v=Math.max(c,h);if(!m){g.exportContextMenu=g[r]=m=y("div",{className:a},{position:"absolute",zIndex:1E3,padding:v+
"px",pointerEvents:"auto"},g.fixedDiv||g.container);var n=y("ul",{className:"highcharts-menu"},{listStyle:"none",margin:0,padding:0},m);g.styledMode||u(n,w({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},C.menuStyle));m.hideMenu=function(){u(m,{display:"none"});k&&k.setState(0);g.openMenu=!1;u(g.renderTo,{overflow:"hidden"});e.clearTimeout(m.hideTimer);B(g,"exportMenuHidden")};g.exportEvents.push(t(m,"mouseleave",function(){m.hideTimer=z.setTimeout(m.hideMenu,
500)}),t(m,"mouseenter",function(){e.clearTimeout(m.hideTimer)}),t(x,"mouseup",function(b){g.pointer.inClass(b.target,a)||m.hideMenu()}),t(m,"click",function(){g.openMenu&&m.hideMenu()}));b.forEach(function(a){"string"===typeof a&&(a=g.options.exporting.menuItemDefinitions[a]);if(J(a,!0)){if(a.separator)var b=y("hr",null,null,n);else b=y("li",{className:"highcharts-menu-item",onclick:function(b){b&&b.stopPropagation();m.hideMenu();a.onclick&&a.onclick.apply(g,arguments)},innerHTML:a.text||g.options.lang[a.textKey]},
null,n),g.styledMode||(b.onmouseover=function(){u(this,C.menuItemHoverStyle)},b.onmouseout=function(){u(this,C.menuItemStyle)},u(b,w({cursor:"pointer"},C.menuItemStyle)));g.exportDivElements.push(b)}});g.exportDivElements.push(n,m);g.exportMenuWidth=m.offsetWidth;g.exportMenuHeight=m.offsetHeight}b={display:"block"};f+g.exportMenuWidth>l?b.right=l-f-c-v+"px":b.left=f-v+"px";d+h+g.exportMenuHeight>A&&"top"!==k.alignOptions.verticalAlign?b.bottom=A-d-v+"px":b.top=d+h-v+"px";u(m,b);u(g.renderTo,{overflow:""});
g.openMenu=!0;B(g,"exportMenuShown")},addButton:function(a){var b=this,f=b.renderer,d=n(b.options.navigation.buttonOptions,a),c=d.onclick,e=d.menuItems,h=d.symbolSize||12;b.btnCount||(b.btnCount=0);b.exportDivElements||(b.exportDivElements=[],b.exportSVGElements=[]);if(!1!==d.enabled){var g=d.theme,k=g.states,l=k&&k.hover;k=k&&k.select;var A;b.styledMode||(g.fill=q(g.fill,"#ffffff"),g.stroke=q(g.stroke,"none"));delete g.states;c?A=function(a){a&&a.stopPropagation();c.call(b,a)}:e&&(A=function(a){a&&
a.stopPropagation();b.contextMenu(r.menuClassName,e,r.translateX,r.translateY,r.width,r.height,r);r.setState(2)});d.text&&d.symbol?g.paddingLeft=q(g.paddingLeft,25):d.text||w(g,{width:d.width,height:d.height,padding:0});b.styledMode||(g["stroke-linecap"]="round",g.fill=q(g.fill,"#ffffff"),g.stroke=q(g.stroke,"none"));var r=f.button(d.text,0,0,A,g,l,k).addClass(a.className).attr({title:q(b.options.lang[d._titleKey||d.titleKey],"")});r.menuClassName=a.menuClassName||"highcharts-menu-"+b.btnCount++;
if(d.symbol){var m=f.symbol(d.symbol,d.symbolX-h/2,d.symbolY-h/2,h,h,{width:h,height:h}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(r);b.styledMode||m.attr({stroke:d.symbolStroke,fill:d.symbolFill,"stroke-width":d.symbolStrokeWidth||1})}r.add(b.exportingGroup).align(w(d,{width:r.width,x:q(d.x,b.buttonOffset)}),!0,"spacingBox");b.buttonOffset+=(r.width+d.buttonSpacing)*("right"===d.align?-1:1);b.exportSVGElements.push(r,m)}},destroyExport:function(a){var b=a?a.target:this;a=b.exportSVGElements;
var f=b.exportDivElements,d=b.exportEvents,c;a&&(a.forEach(function(a,d){a&&(a.onclick=a.ontouchstart=null,c="cache-"+a.menuClassName,b[c]&&delete b[c],b.exportSVGElements[d]=a.destroy())}),a.length=0);b.exportingGroup&&(b.exportingGroup.destroy(),delete b.exportingGroup);f&&(f.forEach(function(a,d){e.clearTimeout(a.hideTimer);K(a,"mouseleave");b.exportDivElements[d]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null;D(a)}),f.length=0);d&&(d.forEach(function(a){a()}),d.length=0)}});p.prototype.inlineToAttributes=
"fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");p.prototype.inlineBlacklist=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/];p.prototype.unstyledElements=["clipPath","defs","desc"];c.prototype.inlineStyles=function(){function a(a){return a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()})}function b(c){function f(b,f){v=u=!1;if(h){for(q=h.length;q--&&!u;)u=h[q].test(f);
v=!u}"transform"===f&&"none"===b&&(v=!0);for(q=e.length;q--&&!v;)v=e[q].test(f)||"function"===typeof b;v||y[f]===b&&"svg"!==c.nodeName||g[c.nodeName][f]===b||(d&&-1===d.indexOf(f)?m+=a(f)+":"+b+";":b&&c.setAttribute(a(f),b))}var m="",v,u,q;if(1===c.nodeType&&-1===k.indexOf(c.nodeName)){var t=z.getComputedStyle(c,null);var y="svg"===c.nodeName?{}:z.getComputedStyle(c.parentNode,null);if(!g[c.nodeName]){l=p.getElementsByTagName("svg")[0];var w=p.createElementNS(c.namespaceURI,c.nodeName);l.appendChild(w);
g[c.nodeName]=n(z.getComputedStyle(w,null));"text"===c.nodeName&&delete g.text.fill;l.removeChild(w)}if(N||M)for(var x in t)f(t[x],x);else E(t,f);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,h=c.inlineWhitelist,k=c.unstyledElements,g={},l;c=x.createElement("iframe");u(c,{width:"1px",height:"1px",
visibility:"hidden"});x.body.appendChild(c);var p=c.contentWindow.document;p.open();p.write('<svg xmlns="http://www.w3.org/2000/svg"></svg>');p.close();b(this.container.querySelector("svg"));l.parentNode.removeChild(l)};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))};c.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);t(a,"destroy",a.destroyExport)};t(c,"init",function(){var a=this;a.exporting={update:function(b,c){a.isDirtyExporting=!0;n(!0,a.options.exporting,b);q(c,!0)&&a.redraw()}};
l.addUpdate(function(b,c){a.isDirtyExporting=!0;n(!0,a.options.navigation,b);q(c,!0)&&a.redraw()},a)});c.prototype.callbacks.push(function(a){a.renderExporting();t(a,"redraw",a.renderExporting)})});p(c,"masters/modules/exporting.src.js",[],function(){})});
//# sourceMappingURL=exporting.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+17
View File
@@ -0,0 +1,17 @@
/*
Highstock JS v8.2.0 (2020-08-20)
Advanced Highstock tools
(c) 2010-2019 Highsoft AS
Author: 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/full-screen",["highcharts"],function(c){a(c);a.Highcharts=c;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function c(a,g,c,d){a.hasOwnProperty(g)||(a[g]=d.apply(null,c))}a=a?a._modules:{};c(a,"Extensions/FullScreen.js",[a["Core/Chart/Chart.js"],a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,c,f){var d=f.addEvent;
f=function(){function a(b){this.chart=b;this.isOpen=!1;b=b.renderTo;this.browserProps||("function"===typeof b.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:b.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:b.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",
requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:b.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}a.prototype.close=function(){var b=this.chart;if(this.isOpen&&this.browserProps&&b.container.ownerDocument instanceof Document)b.container.ownerDocument[this.browserProps.exitFullscreen]();this.unbindFullscreenEvent&&this.unbindFullscreenEvent();this.isOpen=!1;
this.setButtonText()};a.prototype.open=function(){var b=this,a=b.chart;if(b.browserProps){b.unbindFullscreenEvent=d(a.container.ownerDocument,b.browserProps.fullscreenChange,function(){b.isOpen?(b.isOpen=!1,b.close()):(b.isOpen=!0,b.setButtonText())});var c=a.renderTo[b.browserProps.requestFullscreen]();if(c)c["catch"](function(){alert("Full screen is not supported inside a frame.")});d(a,"destroy",b.unbindFullscreenEvent)}};a.prototype.setButtonText=function(){var b,a=this.chart,c=a.exportDivElements,
e=a.options.exporting,d=null===(b=null===e||void 0===e?void 0:e.buttons)||void 0===b?void 0:b.contextButton.menuItems;b=a.options.lang;(null===e||void 0===e?0:e.menuItemDefinitions)&&(null===b||void 0===b?0:b.exitFullscreen)&&b.viewFullscreen&&d&&c&&c.length&&(c[d.indexOf("viewFullscreen")].innerHTML=this.isOpen?b.exitFullscreen:e.menuItemDefinitions.viewFullscreen.text||b.viewFullscreen)};a.prototype.toggle=function(){this.isOpen?this.close():this.open()};return a}();c.Fullscreen=f;d(a,"beforeRender",
function(){this.fullscreen=new c.Fullscreen(this)});return c.Fullscreen});c(a,"masters/modules/full-screen.src.js",[],function(){})});
//# sourceMappingURL=full-screen.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"full-screen.js.map","lineCount":16,"mappings":"A;;;;;;;;;;AAWC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,gCAAP,CAAyC,CAAC,YAAD,CAAzC,CAAyD,QAAS,CAACE,CAAD,CAAa,CAC3EL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAHoE,CAA/E,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC,QAAS,CAACD,CAAD,CAAa,CAEpBE,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAkBC,CAAlB,CAAsB,CACrCH,CAAAI,eAAA,CAAmBH,CAAnB,CAAL,GACID,CAAA,CAAIC,CAAJ,CADJ,CACgBE,CAAAE,MAAA,CAAS,IAAT,CAAeH,CAAf,CADhB,CAD0C,CAD1CI,CAAAA,CAAWT,CAAA,CAAaA,CAAAS,SAAb,CAAmC,EAMlDP,EAAA,CAAgBO,CAAhB,CAA0B,0BAA1B,CAAsD,CAACA,CAAA,CAAS,qBAAT,CAAD,CAAkCA,CAAA,CAAS,iBAAT,CAAlC,CAA+DA,CAAA,CAAS,mBAAT,CAA/D,CAAtD,CAAqJ,QAAS,CAACC,CAAD,CAAQC,CAAR,CAAWC,CAAX,CAAc,CAQxK,IAAIC,EAAWD,CAAAC,SAkBXC;CAAAA,CAA4B,QAAS,EAAG,CAMpCA,QAASA,EAAU,CAACC,CAAD,CAAQ,CAMvB,IAAAA,MAAA,CAAaA,CASjB,KAAAC,OAAA,CAAc,CAAA,CACVC,EAAAA,CAAYF,CAAAG,SAEX,KAAAC,aAAL,GAC+C,UAA3C,GAAI,MAAOF,EAAAG,kBAAX,CACI,IAAAD,aADJ,CACwB,CAChBE,iBAAkB,kBADF,CAEhBD,kBAAmB,mBAFH,CAGhBE,eAAgB,gBAHA,CADxB,CAOSL,CAAAM,qBAAJ,CACD,IAAAJ,aADC,CACmB,CAChBE,iBAAkB,qBADF,CAEhBD,kBAAmB,sBAFH,CAGhBE,eAAgB,qBAHA,CADnB,CAOIL,CAAAO,wBAAJ,CACD,IAAAL,aADC,CACmB,CAChBE,iBAAkB,wBADF;AAEhBD,kBAAmB,yBAFH,CAGhBE,eAAgB,sBAHA,CADnB,CAOIL,CAAAQ,oBAPJ,GAQD,IAAAN,aARC,CAQmB,CAChBE,iBAAkB,oBADF,CAEhBD,kBAAmB,qBAFH,CAGhBE,eAAgB,kBAHA,CARnB,CAfT,CAlB2B,CAgE/BR,CAAAY,UAAAC,MAAA,CAA6BC,QAAS,EAAG,CACrC,IACIb,EADac,IACLd,MAEZ,IAHiBc,IAGbb,OAAJ,EAHiBa,IAIbV,aADJ,EAEIJ,CAAAE,UAAAa,cAFJ,WAE6CC,SAF7C,CAGIhB,CAAAE,UAAAa,cAAA,CANaD,IAMiBV,aAAAG,eAA9B,CAAA,EANaO,KASbG,sBAAJ,EATiBH,IAUbG,sBAAA,EAVaH,KAYjBb,OAAA,CAAoB,CAAA,CAZHa;IAajBI,cAAA,EAdqC,CA4BzCnB,EAAAY,UAAAQ,KAAA,CAA4BC,QAAS,EAAG,CAAA,IAChCN,EAAa,IADmB,CAEhCd,EAAQc,CAAAd,MAEZ,IAAIc,CAAAV,aAAJ,CAA6B,CACzBU,CAAAG,sBAAA,CAAmCnB,CAAA,CAASE,CAAAE,UAAAa,cAAT,CACnCD,CAAAV,aAAAE,iBADmC,CACO,QAAS,EAAG,CAE9CQ,CAAAb,OAAJ,EACIa,CAAAb,OACA,CADoB,CAAA,CACpB,CAAAa,CAAAF,MAAA,EAFJ,GAKIE,CAAAb,OACA,CADoB,CAAA,CACpB,CAAAa,CAAAI,cAAA,EANJ,CAFkD,CADnB,CAYnC,KAAIG,EAAUrB,CAAAG,SAAA,CAAeW,CAAAV,aAAAC,kBAAf,CAAA,EACd,IAAIgB,CAAJ,CAEIA,CAAA,CAAQ,OAAR,CAAA,CAAiB,QAAS,EAAG,CACzBC,KAAA,CACA,8CADA,CADyB,CAA7B,CAKJxB,EAAA,CAASE,CAAT,CAAgB,SAAhB,CAA2Bc,CAAAG,sBAA3B,CArByB,CAJO,CAuCxClB,EAAAY,UAAAO,cAAA,CAAqCK,QAAS,EAAG,CAC7C,IAAIC,CAAJ,CACIxB,EAAQ,IAAAA,MADZ,CAEIyB,EAAoBzB,CAAAyB,kBAFxB;AAGIC,EAAmB1B,CAAA2B,QAAAC,UAHvB,CAIIC,EAAoH,IAAxG,IAACL,CAAD,CAA2B,IAArB,GAAAE,CAAA,EAAkD,IAAK,EAAvD,GAA6BA,CAA7B,CAA2D,IAAK,EAAhE,CAAoEA,CAAAI,QAA1E,GAAuH,IAAK,EAA5H,GAAgHN,CAAhH,CAAgI,IAAK,EAArI,CAAyIA,CAAAO,cAAAF,UACrJG,EAAAA,CAAOhC,CAAA2B,QAAAK,KACX,EAA0B,IAArB,GAAAN,CAAA,EAAkD,IAAK,EAAvD,GAA6BA,CAA7B,CAA2D,CAA3D,CAAoEA,CAAAO,oBAAzE,IAA4H,IAAT,GAAAD,CAAA,EAA0B,IAAK,EAA/B,GAAiBA,CAAjB,CAAmC,CAAnC,CAA4CA,CAAAzB,eAA/J,GACIyB,CAAAE,eADJ,EAEIL,CAFJ,EAGIJ,CAHJ,EAIIA,CAAAU,OAJJ,GAKIV,CAAA,CAAkBI,CAAAO,QAAA,CAAkB,gBAAlB,CAAlB,CAAAC,UALJ,CAMsB,IAAApC,OAAD,CAEc+B,CAAAzB,eAFd,CACZmB,CAAAO,oBAAAC,eAAAI,KADY,EAETN,CAAAE,eARZ,CAP6C,CAgCjDnC,EAAAY,UAAA4B,OAAA,CAA8BC,QAAS,EAAG,CACrB1B,IACZb,OAAL,CADiBa,IAKbF,MAAA,EAJJ,CADiBE,IAEbK,KAAA,EAHkC,CAS1C,OAAOpB,EAlLiC,CAAZ,EAoLhCH,EAAAG,WAAA,CAAeA,CAEfD,EAAA,CAASH,CAAT,CAAgB,cAAhB;AAAgC,QAAS,EAAG,CAMxC,IAAAmB,WAAA,CAAkB,IAAIlB,CAAAG,WAAJ,CAAiB,IAAjB,CANsB,CAA5C,CASA,OAAOH,EAAAG,WAzNiK,CAA5K,CA2NAZ,EAAA,CAAgBO,CAAhB,CAA0B,oCAA1B,CAAgE,EAAhE,CAAoE,QAAS,EAAG,EAAhF,CAlOoB,CAbvB;","sources":["full-screen.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","Chart","H","U","addEvent","Fullscreen","chart","isOpen","container","renderTo","browserProps","requestFullscreen","fullscreenChange","exitFullscreen","mozRequestFullScreen","webkitRequestFullScreen","msRequestFullscreen","prototype","close","Fullscreen.prototype.close","fullscreen","ownerDocument","Document","unbindFullscreenEvent","setButtonText","open","Fullscreen.prototype.open","promise","alert","Fullscreen.prototype.setButtonText","_a","exportDivElements","exportingOptions","options","exporting","menuItems","buttons","contextButton","lang","menuItemDefinitions","viewFullscreen","length","indexOf","innerHTML","text","toggle","Fullscreen.prototype.toggle"]}
+255
View File
@@ -0,0 +1,255 @@
/**
* @license Highstock JS v8.2.0 (2020-08-20)
*
* Advanced Highstock tools
*
* (c) 2010-2019 Highsoft AS
* Author: Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/full-screen', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Extensions/FullScreen.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (Chart, H, U) {
/* *
* (c) 2009-2020 Rafal Sebestjanski
*
* Full screen for Highcharts
*
* License: www.highcharts.com/license
*/
var addEvent = U.addEvent;
/**
* The module allows user to enable display chart in full screen mode.
* Used in StockTools too.
* Based on default solutions in browsers.
*
*/
/* eslint-disable no-invalid-this, valid-jsdoc */
/**
* Handles displaying chart's container in the fullscreen mode.
*
* **Note**: Fullscreen is not supported on iPhone due to iOS limitations.
*
* @class
* @name Highcharts.Fullscreen
* @hideconstructor
* @requires modules/full-screen
*/
var Fullscreen = /** @class */ (function () {
/* *
*
* Constructors
*
* */
function Fullscreen(chart) {
/**
* Chart managed by the fullscreen controller.
* @name Highcharts.Fullscreen#chart
* @type {Highcharts.Chart}
*/
this.chart = chart;
/**
* The flag is set to `true` when the chart is displayed in
* the fullscreen mode.
*
* @name Highcharts.Fullscreen#isOpen
* @type {boolean|undefined}
* @since 8.0.1
*/
this.isOpen = false;
var container = chart.renderTo;
// Hold event and methods available only for a current browser.
if (!this.browserProps) {
if (typeof container.requestFullscreen === 'function') {
this.browserProps = {
fullscreenChange: 'fullscreenchange',
requestFullscreen: 'requestFullscreen',
exitFullscreen: 'exitFullscreen'
};
}
else if (container.mozRequestFullScreen) {
this.browserProps = {
fullscreenChange: 'mozfullscreenchange',
requestFullscreen: 'mozRequestFullScreen',
exitFullscreen: 'mozCancelFullScreen'
};
}
else if (container.webkitRequestFullScreen) {
this.browserProps = {
fullscreenChange: 'webkitfullscreenchange',
requestFullscreen: 'webkitRequestFullScreen',
exitFullscreen: 'webkitExitFullscreen'
};
}
else if (container.msRequestFullscreen) {
this.browserProps = {
fullscreenChange: 'MSFullscreenChange',
requestFullscreen: 'msRequestFullscreen',
exitFullscreen: 'msExitFullscreen'
};
}
}
}
/* *
*
* Functions
*
* */
/**
* Stops displaying the chart in fullscreen mode.
* Exporting module required.
*
* @since 8.0.1
*
* @function Highcharts.Fullscreen#close
* @return {void}
* @requires modules/full-screen
*/
Fullscreen.prototype.close = function () {
var fullscreen = this,
chart = fullscreen.chart;
// Don't fire exitFullscreen() when user exited using 'Escape' button.
if (fullscreen.isOpen &&
fullscreen.browserProps &&
chart.container.ownerDocument instanceof Document) {
chart.container.ownerDocument[fullscreen.browserProps.exitFullscreen]();
}
// Unbind event as it's necessary only before exiting from fullscreen.
if (fullscreen.unbindFullscreenEvent) {
fullscreen.unbindFullscreenEvent();
}
fullscreen.isOpen = false;
fullscreen.setButtonText();
};
/**
* Displays the chart in fullscreen mode.
* When fired customly by user before exporting context button is created,
* button's text will not be replaced - it's on the user side.
* Exporting module required.
*
* @since 8.0.1
*
* @function Highcharts.Fullscreen#open
* @return {void}
* @requires modules/full-screen
*/
Fullscreen.prototype.open = function () {
var fullscreen = this,
chart = fullscreen.chart;
// Handle exitFullscreen() method when user clicks 'Escape' button.
if (fullscreen.browserProps) {
fullscreen.unbindFullscreenEvent = addEvent(chart.container.ownerDocument, // chart's document
fullscreen.browserProps.fullscreenChange, function () {
// Handle lack of async of browser's fullScreenChange event.
if (fullscreen.isOpen) {
fullscreen.isOpen = false;
fullscreen.close();
}
else {
fullscreen.isOpen = true;
fullscreen.setButtonText();
}
});
var promise = chart.renderTo[fullscreen.browserProps.requestFullscreen]();
if (promise) {
// No dot notation because of IE8 compatibility
promise['catch'](function () {
alert(// eslint-disable-line no-alert
'Full screen is not supported inside a frame.');
});
}
addEvent(chart, 'destroy', fullscreen.unbindFullscreenEvent);
}
};
/**
* Replaces the exporting context button's text when toogling the
* fullscreen mode.
*
* @private
*
* @since 8.0.1
*
* @requires modules/full-screen
* @return {void}
*/
Fullscreen.prototype.setButtonText = function () {
var _a;
var chart = this.chart,
exportDivElements = chart.exportDivElements,
exportingOptions = chart.options.exporting,
menuItems = (_a = exportingOptions === null || exportingOptions === void 0 ? void 0 : exportingOptions.buttons) === null || _a === void 0 ? void 0 : _a.contextButton.menuItems,
lang = chart.options.lang;
if ((exportingOptions === null || exportingOptions === void 0 ? void 0 : exportingOptions.menuItemDefinitions) && (lang === null || lang === void 0 ? void 0 : lang.exitFullscreen) &&
lang.viewFullscreen &&
menuItems &&
exportDivElements &&
exportDivElements.length) {
exportDivElements[menuItems.indexOf('viewFullscreen')]
.innerHTML = !this.isOpen ?
(exportingOptions.menuItemDefinitions.viewFullscreen.text ||
lang.viewFullscreen) : lang.exitFullscreen;
}
};
/**
* Toggles displaying the chart in fullscreen mode.
* By default, when the exporting module is enabled, a context button with
* a drop down menu in the upper right corner accesses this function.
* Exporting module required.
*
* @since 8.0.1
*
* @sample highcharts/members/chart-togglefullscreen/
* Toggle fullscreen mode from a HTML button
*
* @function Highcharts.Fullscreen#toggle
* @requires modules/full-screen
*/
Fullscreen.prototype.toggle = function () {
var fullscreen = this;
if (!fullscreen.isOpen) {
fullscreen.open();
}
else {
fullscreen.close();
}
};
return Fullscreen;
}());
H.Fullscreen = Fullscreen;
// Initialize fullscreen
addEvent(Chart, 'beforeRender', function () {
/**
* @name Highcharts.Chart#fullscreen
* @type {Highcharts.Fullscreen}
* @requires modules/full-screen
*/
this.fullscreen = new H.Fullscreen(this);
});
return H.Fullscreen;
});
_registerModule(_modules, 'masters/modules/full-screen.src.js', [], function () {
});
}));
+18
View File
@@ -0,0 +1,18 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Highcharts funnel module
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/funnel",["highcharts"],function(e){b(e);b.Highcharts=e;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function e(b,l,n,e){b.hasOwnProperty(l)||(b[l]=e.apply(null,n))}var x=b?b._modules:{};e(x,"Series/FunnelSeries.js",[x["Core/Chart/Chart.js"],x["Core/Globals.js"],x["Core/Utilities.js"]],function(e,l,n){var x=l.noop,
C=l.seriesType,I=l.seriesTypes;l=n.addEvent;var J=n.fireEvent,K=n.isArray,H=n.pick;C("funnel","pie",{animation:!1,center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,size:!0,dataLabels:{connectorWidth:1,verticalAlign:"middle"},states:{select:{color:"#cccccc",borderColor:"#000000"}}},{animate:x,translate:function(){function a(a,c){return/%$/.test(a)?c*parseInt(a,10)/100:parseInt(a,10)}var r=0,c=this,g=c.chart,f=c.options,k=f.reversed,d=f.ignoreHiddenPoint,b=
g.plotWidth;g=g.plotHeight;var e=0,l=f.center,h=a(l[0],b),m=a(l[1],g),n=a(f.width,b),u,v=a(f.height,g),z=a(f.neckWidth,b),G=a(f.neckHeight,g),A=m-v/2+v-G;b=c.data;var D,E,C="left"===f.dataLabels.position?1:0,B,p,F,w,q,y,t;c.getWidthAt=function(a){var c=m-v/2;return a>A||v===G?z:z+(n-z)*(1-(a-c)/(v-G))};c.getX=function(a,d,b){return h+(d?-1:1)*(c.getWidthAt(k?2*m-a:a)/2+b.labelDistance)};c.center=[h,m,v];c.centerX=h;b.forEach(function(a){d&&!1===a.visible||(r+=a.y)});b.forEach(function(a){t=null;E=
r?a.y/r:0;p=m-v/2+e*v;q=p+E*v;u=c.getWidthAt(p);B=h-u/2;F=B+u;u=c.getWidthAt(q);w=h-u/2;y=w+u;p>A?(B=w=h-z/2,F=y=h+z/2):q>A&&(t=q,u=c.getWidthAt(A),w=h-u/2,y=w+u,q=A);k&&(p=2*m-p,q=2*m-q,null!==t&&(t=2*m-t));D=[["M",B,p],["L",F,p],["L",y,q]];null!==t&&D.push(["L",y,t],["L",w,t]);D.push(["L",w,q],["Z"]);a.shapeType="path";a.shapeArgs={d:D};a.percentage=100*E;a.plotX=h;a.plotY=(p+(t||q))/2;a.tooltipPos=[h,a.plotY];a.dlBox={x:w,y:p,topWidth:F-B,bottomWidth:y-w,height:Math.abs(H(t,q)-p),width:NaN};a.slice=
x;a.half=C;d&&!1===a.visible||(e+=E)});J(c,"afterTranslate")},sortByAngle:function(a){a.sort(function(a,c){return a.plotY-c.plotY})},drawDataLabels:function(){var a=this.data,b=this.options.dataLabels.distance,c,g=a.length;for(this.center[2]-=2*b;g--;){var f=a[g];var k=(c=f.half)?1:-1;var d=f.plotY;f.labelDistance=H(f.options.dataLabels&&f.options.dataLabels.distance,b);this.maxLabelDistance=Math.max(f.labelDistance,this.maxLabelDistance||0);var e=this.getX(d,c,f);f.labelPosition={natural:{x:0,y:d},
"final":{},alignment:c?"right":"left",connectorPosition:{breakAt:{x:e+(f.labelDistance-5)*k,y:d},touchingSliceAt:{x:e+f.labelDistance*k,y:d}}}}I[this.options.dataLabels.inside?"column":"pie"].prototype.drawDataLabels.call(this)},alignDataLabel:function(a,e,c,g,f){var k=a.series;g=k.options.reversed;var d=a.dlBox||a.shapeArgs,l=c.align,r=c.verticalAlign,n=((k.options||{}).dataLabels||{}).inside,h=k.center[1];k=k.getWidthAt((g?2*h-a.plotY:a.plotY)-d.height/2+e.height);k="middle"===r?(d.topWidth-d.bottomWidth)/
4:(k-d.bottomWidth)/2;h=d.y;var m=d.x;"middle"===r?h=d.y-d.height/2+e.height/2:"top"===r&&(h=d.y-d.height+e.height+c.padding);if("top"===r&&!g||"bottom"===r&&g||"middle"===r)"right"===l?m=d.x-c.padding+k:"left"===l&&(m=d.x+c.padding-k);g={x:m,y:g?h-d.height:h,width:d.bottomWidth,height:d.height};c.verticalAlign="bottom";n&&!a.visible||b.Series.prototype.alignDataLabel.call(this,a,e,c,g,f);n&&(!a.visible&&a.dataLabel&&(a.dataLabel.placed=!1),a.contrastColor&&e.css({color:a.contrastColor}))}});l(e,
"afterHideAllOverlappingLabels",function(){this.series.forEach(function(a){var b=a.options&&a.options.dataLabels;K(b)&&(b=b[0]);a.is("pie")&&a.placeDataLabels&&b&&!b.inside&&a.placeDataLabels()})});C("pyramid","funnel",{neckWidth:"0%",neckHeight:"0%",reversed:!0});""});e(x,"masters/modules/funnel.src.js",[],function(){})});
//# sourceMappingURL=funnel.js.map
File diff suppressed because one or more lines are too long
+636
View File
@@ -0,0 +1,636 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Highcharts funnel module
*
* (c) 2010-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/funnel', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Series/FunnelSeries.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (Chart, H, U) {
/* *
*
* Highcharts funnel module
*
* (c) 2010-2020 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
/* eslint indent: 0 */
var noop = H.noop,
seriesType = H.seriesType,
seriesTypes = H.seriesTypes;
var addEvent = U.addEvent,
fireEvent = U.fireEvent,
isArray = U.isArray,
pick = U.pick;
/**
* @private
* @class
* @name Highcharts.seriesTypes.funnel
*
* @augments Highcharts.Series
*/
seriesType('funnel', 'pie',
/**
* Funnel charts are a type of chart often used to visualize stages in a
* sales project, where the top are the initial stages with the most
* clients. It requires that the modules/funnel.js file is loaded.
*
* @sample highcharts/demo/funnel/
* Funnel demo
*
* @extends plotOptions.pie
* @excluding innerSize,size,dataSorting
* @product highcharts
* @requires modules/funnel
* @optionparent plotOptions.funnel
*/
{
/**
* Initial animation is by default disabled for the funnel chart.
*/
animation: false,
/**
* The center of the series. By default, it is centered in the middle
* of the plot area, so it fills the plot area height.
*
* @type {Array<number|string>}
* @default ["50%", "50%"]
* @since 3.0
*/
center: ['50%', '50%'],
/**
* The width of the funnel compared to the width of the plot area,
* or the pixel width if it is a number.
*
* @type {number|string}
* @since 3.0
*/
width: '90%',
/**
* The width of the neck, the lower part of the funnel. A number defines
* pixel width, a percentage string defines a percentage of the plot
* area width.
*
* @sample {highcharts} highcharts/demo/funnel/
* Funnel demo
*
* @type {number|string}
* @since 3.0
*/
neckWidth: '30%',
/**
* The height of the funnel or pyramid. If it is a number it defines
* the pixel height, if it is a percentage string it is the percentage
* of the plot area height.
*
* @sample {highcharts} highcharts/demo/funnel/
* Funnel demo
*
* @type {number|string}
* @since 3.0
*/
height: '100%',
/**
* The height of the neck, the lower part of the funnel. A number
* defines pixel width, a percentage string defines a percentage of the
* plot area height.
*
* @type {number|string}
*/
neckHeight: '25%',
/**
* A reversed funnel has the widest area down. A reversed funnel with
* no neck width and neck height is a pyramid.
*
* @since 3.0.10
*/
reversed: false,
/**
* To avoid adapting the data label size in Pie.drawDataLabels.
* @ignore-option
*/
size: true,
dataLabels: {
connectorWidth: 1,
verticalAlign: 'middle'
},
/**
* Options for the series states.
*/
states: {
/**
* @excluding halo, marker, lineWidth, lineWidthPlus
* @apioption plotOptions.funnel.states.hover
*/
/**
* Options for a selected funnel item.
*
* @excluding halo, marker, lineWidth, lineWidthPlus
*/
select: {
/**
* A specific color for the selected point.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
*/
color: '#cccccc',
/**
* A specific border color for the selected point.
*
* @type {Highcharts.ColorString}
*/
borderColor: '#000000'
}
}
},
// Properties
{
animate: noop,
// Overrides the pie translate method
translate: function () {
var sum = 0,
series = this,
chart = series.chart,
options = series.options,
reversed = options.reversed,
ignoreHiddenPoint = options.ignoreHiddenPoint,
plotWidth = chart.plotWidth,
plotHeight = chart.plotHeight,
cumulative = 0, // start at top
center = options.center,
centerX = getLength(center[0],
plotWidth),
centerY = getLength(center[1],
plotHeight),
width = getLength(options.width,
plotWidth),
tempWidth,
height = getLength(options.height,
plotHeight),
neckWidth = getLength(options.neckWidth,
plotWidth),
neckHeight = getLength(options.neckHeight,
plotHeight),
neckY = (centerY - height / 2) + height - neckHeight,
data = series.data,
path,
fraction,
half = (options.dataLabels.position === 'left' ?
1 :
0),
x1,
y1,
x2,
x3,
y3,
x4,
y5;
/**
* Get positions - either an integer or a percentage string must be
* given.
* @private
* @param {number|string|undefined} length
* Length
* @param {number} relativeTo
* Relative factor
* @return {number}
* Relative position
*/
function getLength(length, relativeTo) {
return (/%$/).test(length) ?
relativeTo * parseInt(length, 10) / 100 :
parseInt(length, 10);
}
series.getWidthAt = function (y) {
var top = (centerY - height / 2);
return (y > neckY || height === neckHeight) ?
neckWidth :
neckWidth + (width - neckWidth) *
(1 - (y - top) / (height - neckHeight));
};
series.getX = function (y, half, point) {
return centerX + (half ? -1 : 1) *
((series.getWidthAt(reversed ? 2 * centerY - y : y) / 2) +
point.labelDistance);
};
// Expose
series.center = [centerX, centerY, height];
series.centerX = centerX;
/*
Individual point coordinate naming:
x1,y1 _________________ x2,y1
\ /
\ /
\ /
\ /
\ /
x3,y3 _________ x4,y3
Additional for the base of the neck:
| |
| |
| |
x3,y5 _________ x4,y5
*/
// get the total sum
data.forEach(function (point) {
if (!ignoreHiddenPoint || point.visible !== false) {
sum += point.y;
}
});
data.forEach(function (point) {
// set start and end positions
y5 = null;
fraction = sum ? point.y / sum : 0;
y1 = centerY - height / 2 + cumulative * height;
y3 = y1 + fraction * height;
tempWidth = series.getWidthAt(y1);
x1 = centerX - tempWidth / 2;
x2 = x1 + tempWidth;
tempWidth = series.getWidthAt(y3);
x3 = centerX - tempWidth / 2;
x4 = x3 + tempWidth;
// the entire point is within the neck
if (y1 > neckY) {
x1 = x3 = centerX - neckWidth / 2;
x2 = x4 = centerX + neckWidth / 2;
// the base of the neck
}
else if (y3 > neckY) {
y5 = y3;
tempWidth = series.getWidthAt(neckY);
x3 = centerX - tempWidth / 2;
x4 = x3 + tempWidth;
y3 = neckY;
}
if (reversed) {
y1 = 2 * centerY - y1;
y3 = 2 * centerY - y3;
if (y5 !== null) {
y5 = 2 * centerY - y5;
}
}
// save the path
path = [
['M', x1, y1],
['L', x2, y1],
['L', x4, y3]
];
if (y5 !== null) {
path.push(['L', x4, y5], ['L', x3, y5]);
}
path.push(['L', x3, y3], ['Z']);
// prepare for using shared dr
point.shapeType = 'path';
point.shapeArgs = { d: path };
// for tooltips and data labels
point.percentage = fraction * 100;
point.plotX = centerX;
point.plotY = (y1 + (y5 || y3)) / 2;
// Placement of tooltips and data labels
point.tooltipPos = [
centerX,
point.plotY
];
point.dlBox = {
x: x3,
y: y1,
topWidth: x2 - x1,
bottomWidth: x4 - x3,
height: Math.abs(pick(y5, y3) - y1),
width: NaN
};
// Slice is a noop on funnel points
point.slice = noop;
// Mimicking pie data label placement logic
point.half = half;
if (!ignoreHiddenPoint || point.visible !== false) {
cumulative += fraction;
}
});
fireEvent(series, 'afterTranslate');
},
// Funnel items don't have angles (#2289)
sortByAngle: function (points) {
points.sort(function (a, b) {
return a.plotY - b.plotY;
});
},
// Extend the pie data label method
drawDataLabels: function () {
var series = this,
data = series.data,
labelDistance = series.options.dataLabels.distance,
leftSide,
sign,
point,
i = data.length,
x,
y;
// In the original pie label anticollision logic, the slots are
// distributed from one labelDistance above to one labelDistance
// below the pie. In funnels we don't want this.
series.center[2] -= 2 * labelDistance;
// Set the label position array for each point.
while (i--) {
point = data[i];
leftSide = point.half;
sign = leftSide ? 1 : -1;
y = point.plotY;
point.labelDistance = pick(point.options.dataLabels &&
point.options.dataLabels.distance, labelDistance);
series.maxLabelDistance = Math.max(point.labelDistance, series.maxLabelDistance || 0);
x = series.getX(y, leftSide, point);
// set the anchor point for data labels
point.labelPosition = {
// initial position of the data label - it's utilized for
// finding the final position for the label
natural: {
x: 0,
y: y
},
'final': {
// used for generating connector path -
// initialized later in drawDataLabels function
// x: undefined,
// y: undefined
},
// left - funnel on the left side of the data label
// right - funnel on the right side of the data label
alignment: leftSide ? 'right' : 'left',
connectorPosition: {
breakAt: {
x: x + (point.labelDistance - 5) * sign,
y: y
},
touchingSliceAt: {
x: x + point.labelDistance * sign,
y: y
}
}
};
}
seriesTypes[series.options.dataLabels.inside ? 'column' : 'pie'].prototype.drawDataLabels.call(this);
},
alignDataLabel: function (point, dataLabel, options, alignTo, isNew) {
var series = point.series,
reversed = series.options.reversed,
dlBox = point.dlBox || point.shapeArgs,
align = options.align,
verticalAlign = options.verticalAlign,
inside = ((series.options || {}).dataLabels || {}).inside,
centerY = series.center[1],
pointPlotY = (reversed ?
2 * centerY - point.plotY :
point.plotY),
widthAtLabel = series.getWidthAt(pointPlotY - dlBox.height / 2 +
dataLabel.height),
offset = verticalAlign === 'middle' ?
(dlBox.topWidth - dlBox.bottomWidth) / 4 :
(widthAtLabel - dlBox.bottomWidth) / 2,
y = dlBox.y,
x = dlBox.x;
if (verticalAlign === 'middle') {
y = dlBox.y - dlBox.height / 2 + dataLabel.height / 2;
}
else if (verticalAlign === 'top') {
y = dlBox.y - dlBox.height + dataLabel.height +
options.padding;
}
if (verticalAlign === 'top' && !reversed ||
verticalAlign === 'bottom' && reversed ||
verticalAlign === 'middle') {
if (align === 'right') {
x = dlBox.x - options.padding + offset;
}
else if (align === 'left') {
x = dlBox.x + options.padding - offset;
}
}
alignTo = {
x: x,
y: reversed ? y - dlBox.height : y,
width: dlBox.bottomWidth,
height: dlBox.height
};
options.verticalAlign = 'bottom';
// Call the parent method
if (!inside || point.visible) {
Highcharts.Series.prototype.alignDataLabel.call(this, point, dataLabel, options, alignTo, isNew);
}
if (inside) {
if (!point.visible && point.dataLabel) {
// Avoid animation from top
point.dataLabel.placed = false;
}
// If label is inside and we have contrast, set it:
if (point.contrastColor) {
dataLabel.css({
color: point.contrastColor
});
}
}
}
});
/* eslint-disable no-invalid-this */
addEvent(Chart, 'afterHideAllOverlappingLabels', function () {
this.series.forEach(function (series) {
var dataLabelsOptions = series.options && series.options.dataLabels;
if (isArray(dataLabelsOptions)) {
dataLabelsOptions = dataLabelsOptions[0];
}
if (series.is('pie') &&
series.placeDataLabels &&
dataLabelsOptions &&
!dataLabelsOptions.inside) {
series.placeDataLabels();
}
});
});
/**
* A `funnel` series. If the [type](#series.funnel.type) option is
* not specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.funnel
* @excluding dataParser, dataURL, stack, xAxis, yAxis, dataSorting,
* boostBlending, boostThreshold
* @product highcharts
* @requires modules/funnel
* @apioption series.funnel
*/
/**
* An array of data points for the series. For the `funnel` series type,
* points can be given in the following ways:
*
* 1. An array of numerical values. In this case, the numerical values
* will be interpreted as `y` options. Example:
*
* ```js
* data: [0, 5, 3, 5]
* ```
*
* 2. An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of data
* points exceeds the series' [turboThreshold](#series.funnel.turboThreshold),
* this option is not available.
*
* ```js
* data: [{
* y: 3,
* name: "Point2",
* color: "#00FF00"
* }, {
* y: 1,
* name: "Point1",
* color: "#FF00FF"
* }]
* ```
*
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-arrays/
* Arrays of numeric x and y
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
* Arrays of datetime x and y
* @sample {highcharts} highcharts/series/data-array-of-name-value/
* Arrays of point.name and y
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
*
* @type {Array<number|null|*>}
* @extends series.pie.data
* @excluding sliced
* @product highcharts
* @apioption series.funnel.data
*/
/**
* Pyramid series type.
*
* @private
* @class
* @name Highcharts.seriesTypes.pyramid
*
* @augments Highcharts.Series
*/
seriesType('pyramid', 'funnel',
/**
* A pyramid series is a special type of funnel, without neck and reversed
* by default.
*
* @sample highcharts/demo/pyramid/
* Pyramid chart
*
* @extends plotOptions.funnel
* @product highcharts
* @requires modules/funnel
* @optionparent plotOptions.pyramid
*/
{
/**
* The pyramid neck width is zero by default, as opposed to the funnel,
* which shares the same layout logic.
*
* @since 3.0.10
*/
neckWidth: '0%',
/**
* The pyramid neck width is zero by default, as opposed to the funnel,
* which shares the same layout logic.
*
* @since 3.0.10
*/
neckHeight: '0%',
/**
* The pyramid is reversed by default, as opposed to the funnel, which
* shares the layout engine, and is not reversed.
*
* @since 3.0.10
*/
reversed: true
});
/**
* A `pyramid` series. If the [type](#series.pyramid.type) option is
* not specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.pyramid
* @excluding dataParser, dataURL, stack, xAxis, yAxis, dataSorting,
* boostThreshold, boostBlending
* @product highcharts
* @requires modules/funnel
* @apioption series.pyramid
*/
/**
* An array of data points for the series. For the `pyramid` series
* type, points can be given in the following ways:
*
* 1. An array of numerical values. In this case, the numerical values will be
* interpreted as `y` options. Example:
* ```js
* data: [0, 5, 3, 5]
* ```
*
* 2. An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of
* data points exceeds the series'
* [turboThreshold](#series.pyramid.turboThreshold), this option is not
* available.
* ```js
* data: [{
* y: 9,
* name: "Point2",
* color: "#00FF00"
* }, {
* y: 6,
* name: "Point1",
* color: "#FF00FF"
* }]
* ```
*
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
*
* @type {Array<number|null|*>}
* @extends series.pie.data
* @excluding sliced
* @product highcharts
* @apioption series.pyramid.data
*/
''; // adds doclets above into transpiled file
});
_registerModule(_modules, 'masters/modules/funnel.src.js', [], function () {
});
}));
+26
View File
@@ -0,0 +1,26 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Highcharts funnel module
(c) 2010-2019 Kacper Madej
License: www.highcharts.com/license
*/
(function(d){"object"===typeof module&&module.exports?(d["default"]=d,module.exports=d):"function"===typeof define&&define.amd?define("highcharts/modules/funnel3d",["highcharts","highcharts/highcharts-3d","highcharts/modules/cylinder"],function(y){d(y);d.Highcharts=y;return d}):d("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(d){function y(d,m,k,h){d.hasOwnProperty(m)||(d[m]=h.apply(null,k))}d=d?d._modules:{};y(d,"Series/Funnel3DSeries.js",[d["Core/Globals.js"],d["Extensions/Math3D.js"],
d["Core/Color.js"],d["Core/Utilities.js"]],function(d,m,k,h){var y=m.perspective,l=k.parse,J=h.error,E=h.extend,p=h.merge,C=h.pick,B=h.relativeLength;k=h.seriesType;var H=d.charts,K=d.seriesTypes;m=d.Renderer.prototype;var L=m.cuboidPath;k("funnel3d","column",{center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,gradientForSides:!0,animation:!1,edgeWidth:0,colorByPoint:!0,showInLegend:!1,dataLabels:{align:"right",crop:!1,inside:!1,overflow:"allow"}},{bindAxes:function(){d.Series.prototype.bindAxes.apply(this,
arguments);E(this.xAxis.options,{gridLineWidth:0,lineWidth:0,title:null,tickPositions:[]});E(this.yAxis.options,{gridLineWidth:0,title:null,labels:{enabled:!1}})},translate3dShapes:d.noop,translate:function(){d.Series.prototype.translate.apply(this,arguments);var a=0,b=this.chart,c=this.options,g=c.reversed,u=c.ignoreHiddenPoint,e=b.plotWidth,F=b.plotHeight,f=0,I=c.center,w=B(I[0],e),t=B(I[1],F),p=B(c.width,e),q,v,n=B(c.height,F),m=B(c.neckWidth,e),h=B(c.neckHeight,F),k=t-n/2+n-h;e=this.data;var z,
l,x,A,G,D,r;this.getWidthAt=v=function(b){var a=t-n/2;return b>k||n===h?m:m+(p-m)*(1-(b-a)/(n-h))};this.center=[w,t,n];this.centerX=w;e.forEach(function(b){u&&!1===b.visible||(a+=b.y)});e.forEach(function(e){G=null;z=a?e.y/a:0;x=t-n/2+f*n;A=x+z*n;q=v(x);D=A-x;r={gradientForSides:C(e.options.gradientForSides,c.gradientForSides),x:w,y:x,height:D,width:q,z:1,top:{width:q}};q=v(A);r.bottom={fraction:z,width:q};x>=k?r.isCylinder=!0:A>k&&(G=A,q=v(k),A=k,r.bottom.width=q,r.middle={fraction:D?(k-x)/D:0,width:q});
g&&(r.y=x=t+n/2-(f+z)*n,r.middle&&(r.middle.fraction=1-(D?r.middle.fraction:0)),q=r.width,r.width=r.bottom.width,r.bottom.width=q);e.shapeArgs=E(e.shapeArgs,r);e.percentage=100*z;e.plotX=w;e.plotY=g?t+n/2-(f+z/2)*n:(x+(G||A))/2;l=y([{x:w,y:e.plotY,z:g?-(p-v(e.plotY))/2:-v(e.plotY)/2}],b,!0)[0];e.tooltipPos=[l.x,l.y];e.dlBoxRaw={x:w,width:v(e.plotY),y:x,bottom:r.height,fullWidth:p};u&&!1===e.visible||(f+=z)})},alignDataLabel:function(a,b,c){var g=a.dlBoxRaw,u=this.chart.inverted,e=a.plotY>C(this.translatedThreshold,
this.yAxis.len),d=C(c.inside,!!this.options.stacking),f={x:g.x,y:g.y,height:0};c.align=C(c.align,!u||d?"center":e?"right":"left");c.verticalAlign=C(c.verticalAlign,u||d?"middle":e?"top":"bottom");"top"!==c.verticalAlign&&(f.y+=g.bottom/("bottom"===c.verticalAlign?1:2));f.width=this.getWidthAt(f.y);this.options.reversed&&(f.width=g.fullWidth-f.width);d?f.x-=f.width/2:"left"===c.align?(c.align="right",f.x-=1.5*f.width):"right"===c.align?(c.align="left",f.x+=f.width/2):f.x-=f.width/2;a.dlBox=f;K.column.prototype.alignDataLabel.apply(this,
arguments)}},{shapeType:"funnel3d",hasNewShapeType:d.seriesTypes.column.prototype.pointClass.prototype.hasNewShapeType});k=p(m.elements3d.cuboid,{parts:"top bottom frontUpper backUpper frontLower backLower rightUpper rightLower".split(" "),mainParts:["top","bottom"],sideGroups:["upperGroup","lowerGroup"],sideParts:{upperGroup:["frontUpper","backUpper","rightUpper"],lowerGroup:["frontLower","backLower","rightLower"]},pathType:"funnel3d",opacitySetter:function(a){var b=this,c=b.parts,g=d.charts[b.renderer.chartIndex],
u="group-opacity-"+a+"-"+g.index;b.parts=b.mainParts;b.singleSetterForParts("opacity",a);b.parts=c;g.renderer.filterId||(g.renderer.definition({tagName:"filter",id:u,children:[{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",type:"table",tableValues:"0 "+a}]}]}),b.sideGroups.forEach(function(a){b[a].attr({filter:"url(#"+u+")"})}),b.renderer.styledMode&&(g.renderer.definition({tagName:"style",textContent:".highcharts-"+u+" {filter:url(#"+u+")}"}),b.sideGroups.forEach(function(b){b.addClass("highcharts-"+
u)})));return b},fillSetter:function(a){var b=this,c=l(a),g=c.rgba[3],d={top:l(a).brighten(.1).get(),bottom:l(a).brighten(-.2).get()};1>g?(c.rgba[3]=1,c=c.get("rgb"),b.attr({opacity:g})):c=a;c.linearGradient||c.radialGradient||!b.gradientForSides||(c={linearGradient:{x1:0,x2:1,y1:1,y2:1},stops:[[0,l(a).brighten(-.2).get()],[.5,a],[1,l(a).brighten(-.2).get()]]});c.linearGradient?b.sideGroups.forEach(function(a){var e=b[a].gradientBox,f=c.linearGradient,g=p(c,{linearGradient:{x1:e.x+f.x1*e.width,y1:e.y+
f.y1*e.height,x2:e.x+f.x2*e.width,y2:e.y+f.y2*e.height}});b.sideParts[a].forEach(function(b){d[b]=g})}):(p(!0,d,{frontUpper:c,backUpper:c,rightUpper:c,frontLower:c,backLower:c,rightLower:c}),c.radialGradient&&b.sideGroups.forEach(function(a){var c=b[a].gradientBox,e=c.x+c.width/2,g=c.y+c.height/2,d=Math.min(c.width,c.height);b.sideParts[a].forEach(function(a){b[a].setRadialReference([e,g,d])})}));b.singleSetterForParts("fill",null,d);b.color=b.fill=a;c.linearGradient&&[b.frontLower,b.frontUpper].forEach(function(a){(a=
(a=a.element)&&b.renderer.gradients[a.gradient])&&"userSpaceOnUse"!==a.attr("gradientUnits")&&a.attr({gradientUnits:"userSpaceOnUse"})});return b},adjustForGradient:function(){var a=this,b;a.sideGroups.forEach(function(c){var g={x:Number.MAX_VALUE,y:Number.MAX_VALUE},d={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE};a.sideParts[c].forEach(function(c){b=a[c].getBBox(!0);g={x:Math.min(g.x,b.x),y:Math.min(g.y,b.y)};d={x:Math.max(d.x,b.x+b.width),y:Math.max(d.y,b.y+b.height)}});a[c].gradientBox={x:g.x,width:d.x-
g.x,y:g.y,height:d.y-g.y}})},zIndexSetter:function(){this.finishedOnAdd&&this.adjustForGradient();return this.renderer.Element.prototype.zIndexSetter.apply(this,arguments)},onAdd:function(){this.adjustForGradient();this.finishedOnAdd=!0}});m.elements3d.funnel3d=k;m.funnel3d=function(a){var b=this.element3d("funnel3d",a),c=this.styledMode,d={"stroke-width":1,stroke:"none"};b.upperGroup=this.g("funnel3d-upper-group").attr({zIndex:b.frontUpper.zIndex}).add(b);[b.frontUpper,b.backUpper,b.rightUpper].forEach(function(a){c||
a.attr(d);a.add(b.upperGroup)});b.lowerGroup=this.g("funnel3d-lower-group").attr({zIndex:b.frontLower.zIndex}).add(b);[b.frontLower,b.backLower,b.rightLower].forEach(function(a){c||a.attr(d);a.add(b.lowerGroup)});b.gradientForSides=a.gradientForSides;return b};m.funnel3dPath=function(a){this.getCylinderEnd||J("A required Highcharts module is missing: cylinder.js",!0,H[this.chartIndex]);var b=H[this.chartIndex],c=a.alphaCorrection=90-Math.abs(b.options.chart.options3d.alpha%180-90),d=L.call(this,p(a,
{depth:a.width,width:(a.width+a.bottom.width)/2})),m=d.isTop,e=!d.isFront,k=!!a.middle,f=this.getCylinderEnd(b,p(a,{x:a.x-a.width/2,z:a.z-a.width/2,alphaCorrection:c})),h=a.bottom.width,w=p(a,{width:h,x:a.x-h/2,z:a.z-h/2,alphaCorrection:c}),t=this.getCylinderEnd(b,w,!0),l=h,q=w,v=t,n=t;k&&(l=a.middle.width,q=p(a,{y:a.y+a.middle.fraction*a.height,width:l,x:a.x-l/2,z:a.z-l/2}),v=this.getCylinderEnd(b,q,!1),n=this.getCylinderEnd(b,q,!1));d={top:f,bottom:t,frontUpper:this.getCylinderFront(f,v),zIndexes:{group:d.zIndexes.group,
top:0!==m?0:3,bottom:1!==m?0:3,frontUpper:e?2:1,backUpper:e?1:2,rightUpper:e?2:1}};d.backUpper=this.getCylinderBack(f,v);f=1!==Math.min(l,a.width)/Math.max(l,a.width);d.rightUpper=this.getCylinderFront(this.getCylinderEnd(b,p(a,{x:a.x-a.width/2,z:a.z-a.width/2,alphaCorrection:f?-c:0}),!1),this.getCylinderEnd(b,p(q,{alphaCorrection:f?-c:0}),!k));k&&(f=1!==Math.min(l,h)/Math.max(l,h),p(!0,d,{frontLower:this.getCylinderFront(n,t),backLower:this.getCylinderBack(n,t),rightLower:this.getCylinderFront(this.getCylinderEnd(b,
p(w,{alphaCorrection:f?-c:0}),!0),this.getCylinderEnd(b,p(q,{alphaCorrection:f?-c:0}),!1)),zIndexes:{frontLower:e?2:1,backLower:e?1:2,rightLower:e?1:2}}));return d}});y(d,"masters/modules/funnel3d.src.js",[],function(){})});
//# sourceMappingURL=funnel3d.js.map
File diff suppressed because one or more lines are too long
+809
View File
@@ -0,0 +1,809 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Highcharts funnel module
*
* (c) 2010-2019 Kacper Madej
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/funnel3d', ['highcharts', 'highcharts/highcharts-3d', 'highcharts/modules/cylinder'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Series/Funnel3DSeries.js', [_modules['Core/Globals.js'], _modules['Extensions/Math3D.js'], _modules['Core/Color.js'], _modules['Core/Utilities.js']], function (H, Math3D, Color, U) {
/* *
*
* Highcharts funnel3d series module
*
* (c) 2010-2020 Highsoft AS
*
* Author: Kacper Madej
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var perspective = Math3D.perspective;
var color = Color.parse;
var error = U.error,
extend = U.extend,
merge = U.merge,
pick = U.pick,
relativeLength = U.relativeLength,
seriesType = U.seriesType;
var charts = H.charts,
seriesTypes = H.seriesTypes,
// Use H.Renderer instead of SVGRenderer for VML support.
RendererProto = H.Renderer.prototype,
//
cuboidPath = RendererProto.cuboidPath,
funnel3dMethods;
/**
* The funnel3d series type.
*
* @constructor seriesTypes.funnel3d
* @augments seriesTypes.column
* @requires highcharts-3d
* @requires modules/cylinder
* @requires modules/funnel3d
*/
seriesType('funnel3d', 'column',
/**
* A funnel3d is a 3d version of funnel series type. Funnel charts are
* a type of chart often used to visualize stages in a sales project,
* where the top are the initial stages with the most clients.
*
* It requires that the `highcharts-3d.js`, `cylinder.js` and
* `funnel3d.js` module are loaded.
*
* @sample highcharts/demo/funnel3d/
* Funnel3d
*
* @extends plotOptions.column
* @excluding allAreas, boostThreshold, colorAxis, compare, compareBase,
* dataSorting, boostBlending
* @product highcharts
* @since 7.1.0
* @requires highcharts-3d
* @requires modules/cylinder
* @requires modules/funnel3d
* @optionparent plotOptions.funnel3d
*/
{
/** @ignore-option */
center: ['50%', '50%'],
/**
* The max width of the series compared to the width of the plot area,
* or the pixel width if it is a number.
*
* @type {number|string}
* @sample {highcharts} highcharts/demo/funnel3d/ Funnel3d demo
* @product highcharts
*/
width: '90%',
/**
* The width of the neck, the lower part of the funnel. A number defines
* pixel width, a percentage string defines a percentage of the plot
* area width.
*
* @type {number|string}
* @sample {highcharts} highcharts/demo/funnel3d/ Funnel3d demo
* @product highcharts
*/
neckWidth: '30%',
/**
* The height of the series. If it is a number it defines
* the pixel height, if it is a percentage string it is the percentage
* of the plot area height.
*
* @type {number|string}
* @sample {highcharts} highcharts/demo/funnel3d/ Funnel3d demo
* @product highcharts
*/
height: '100%',
/**
* The height of the neck, the lower part of the funnel. A number
* defines pixel width, a percentage string defines a percentage
* of the plot area height.
*
* @type {number|string}
* @sample {highcharts} highcharts/demo/funnel3d/ Funnel3d demo
* @product highcharts
*/
neckHeight: '25%',
/**
* A reversed funnel has the widest area down. A reversed funnel with
* no neck width and neck height is a pyramid.
*
* @product highcharts
*/
reversed: false,
/**
* By deafult sides fill is set to a gradient through this option being
* set to `true`. Set to `false` to get solid color for the sides.
*
* @product highcharts
*/
gradientForSides: true,
animation: false,
edgeWidth: 0,
colorByPoint: true,
showInLegend: false,
dataLabels: {
align: 'right',
crop: false,
inside: false,
overflow: 'allow'
}
}, {
// Override default axis options with series required options for axes
bindAxes: function () {
H.Series.prototype.bindAxes.apply(this, arguments);
extend(this.xAxis.options, {
gridLineWidth: 0,
lineWidth: 0,
title: null,
tickPositions: []
});
extend(this.yAxis.options, {
gridLineWidth: 0,
title: null,
labels: {
enabled: false
}
});
},
translate3dShapes: H.noop,
translate: function () {
H.Series.prototype.translate.apply(this, arguments);
var sum = 0,
series = this,
chart = series.chart,
options = series.options,
reversed = options.reversed,
ignoreHiddenPoint = options.ignoreHiddenPoint,
plotWidth = chart.plotWidth,
plotHeight = chart.plotHeight,
cumulative = 0, // start at top
center = options.center,
centerX = relativeLength(center[0],
plotWidth),
centerY = relativeLength(center[1],
plotHeight),
width = relativeLength(options.width,
plotWidth),
tempWidth,
getWidthAt,
height = relativeLength(options.height,
plotHeight),
neckWidth = relativeLength(options.neckWidth,
plotWidth),
neckHeight = relativeLength(options.neckHeight,
plotHeight),
neckY = (centerY - height / 2) + height - neckHeight,
data = series.data,
fraction,
tooltipPos,
//
y1,
y3,
y5,
//
h,
shapeArgs;
// Return the width at a specific y coordinate
series.getWidthAt = getWidthAt = function (y) {
var top = (centerY - height / 2);
return (y > neckY || height === neckHeight) ?
neckWidth :
neckWidth + (width - neckWidth) *
(1 - (y - top) / (height - neckHeight));
};
// Expose
series.center = [centerX, centerY, height];
series.centerX = centerX;
/*
* Individual point coordinate naming:
*
* _________centerX,y1________
* \ /
* \ /
* \ /
* \ /
* \ /
* ___centerX,y3___
*
* Additional for the base of the neck:
*
* | |
* | |
* | |
* ___centerX,y5___
*/
// get the total sum
data.forEach(function (point) {
if (!ignoreHiddenPoint || point.visible !== false) {
sum += point.y;
}
});
data.forEach(function (point) {
// set start and end positions
y5 = null;
fraction = sum ? point.y / sum : 0;
y1 = centerY - height / 2 + cumulative * height;
y3 = y1 + fraction * height;
tempWidth = getWidthAt(y1);
h = y3 - y1;
shapeArgs = {
// for fill setter
gradientForSides: pick(point.options.gradientForSides, options.gradientForSides),
x: centerX,
y: y1,
height: h,
width: tempWidth,
z: 1,
top: {
width: tempWidth
}
};
tempWidth = getWidthAt(y3);
shapeArgs.bottom = {
fraction: fraction,
width: tempWidth
};
// the entire point is within the neck
if (y1 >= neckY) {
shapeArgs.isCylinder = true;
}
else if (y3 > neckY) {
// the base of the neck
y5 = y3;
tempWidth = getWidthAt(neckY);
y3 = neckY;
shapeArgs.bottom.width = tempWidth;
shapeArgs.middle = {
fraction: h ? (neckY - y1) / h : 0,
width: tempWidth
};
}
if (reversed) {
shapeArgs.y = y1 = centerY + height / 2 -
(cumulative + fraction) * height;
if (shapeArgs.middle) {
shapeArgs.middle.fraction = 1 -
(h ? shapeArgs.middle.fraction : 0);
}
tempWidth = shapeArgs.width;
shapeArgs.width = shapeArgs.bottom.width;
shapeArgs.bottom.width = tempWidth;
}
point.shapeArgs = extend(point.shapeArgs, shapeArgs);
// for tooltips and data labels context
point.percentage = fraction * 100;
point.plotX = centerX;
if (reversed) {
point.plotY = centerY + height / 2 -
(cumulative + fraction / 2) * height;
}
else {
point.plotY = (y1 + (y5 || y3)) / 2;
}
// Placement of tooltips and data labels in 3D
tooltipPos = perspective([{
x: centerX,
y: point.plotY,
z: reversed ?
-(width - getWidthAt(point.plotY)) / 2 :
-(getWidthAt(point.plotY)) / 2
}], chart, true)[0];
point.tooltipPos = [tooltipPos.x, tooltipPos.y];
// base to be used when alignment options are known
point.dlBoxRaw = {
x: centerX,
width: getWidthAt(point.plotY),
y: y1,
bottom: shapeArgs.height,
fullWidth: width
};
if (!ignoreHiddenPoint || point.visible !== false) {
cumulative += fraction;
}
});
},
alignDataLabel: function (point, dataLabel, options) {
var series = this,
dlBoxRaw = point.dlBoxRaw,
inverted = series.chart.inverted,
below = point.plotY > pick(series.translatedThreshold,
series.yAxis.len),
inside = pick(options.inside, !!series.options.stacking),
dlBox = {
x: dlBoxRaw.x,
y: dlBoxRaw.y,
height: 0
};
options.align = pick(options.align, !inverted || inside ? 'center' : below ? 'right' : 'left');
options.verticalAlign = pick(options.verticalAlign, inverted || inside ? 'middle' : below ? 'top' : 'bottom');
if (options.verticalAlign !== 'top') {
dlBox.y += dlBoxRaw.bottom /
(options.verticalAlign === 'bottom' ? 1 : 2);
}
dlBox.width = series.getWidthAt(dlBox.y);
if (series.options.reversed) {
dlBox.width = dlBoxRaw.fullWidth - dlBox.width;
}
if (inside) {
dlBox.x -= dlBox.width / 2;
}
else {
// swap for inside
if (options.align === 'left') {
options.align = 'right';
dlBox.x -= dlBox.width * 1.5;
}
else if (options.align === 'right') {
options.align = 'left';
dlBox.x += dlBox.width / 2;
}
else {
dlBox.x -= dlBox.width / 2;
}
}
point.dlBox = dlBox;
seriesTypes.column.prototype.alignDataLabel.apply(series, arguments);
}
}, /** @lends seriesTypes.funnel3d.prototype.pointClass.prototype */ {
shapeType: 'funnel3d',
hasNewShapeType: H
.seriesTypes.column.prototype
.pointClass.prototype
.hasNewShapeType
});
/**
* A `funnel3d` series. If the [type](#series.funnel3d.type) option is
* not specified, it is inherited from [chart.type](#chart.type).
*
* @sample {highcharts} highcharts/demo/funnel3d/
* Funnel3d demo
*
* @since 7.1.0
* @extends series.funnel,plotOptions.funnel3d
* @excluding allAreas,boostThreshold,colorAxis,compare,compareBase
* @product highcharts
* @requires highcharts-3d
* @requires modules/cylinder
* @requires modules/funnel3d
* @apioption series.funnel3d
*/
/**
* An array of data points for the series. For the `funnel3d` series
* type, points can be given in the following ways:
*
* 1. An array of numerical values. In this case, the numerical values
* will be interpreted as `y` options. The `x` values will be automatically
* calculated, either starting at 0 and incremented by 1, or from `pointStart`
* and `pointInterval` given in the series options. If the axis has
* categories, these will be used. Example:
*
* ```js
* data: [0, 5, 3, 5]
* ```
*
* 2. An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of data
* points exceeds the series' [turboThreshold](#series.funnel3d.turboThreshold),
* this option is not available.
*
* ```js
* data: [{
* y: 2,
* name: "Point2",
* color: "#00FF00"
* }, {
* y: 4,
* name: "Point1",
* color: "#FF00FF"
* }]
* ```
*
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-arrays/
* Arrays of numeric x and y
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
* Arrays of datetime x and y
* @sample {highcharts} highcharts/series/data-array-of-name-value/
* Arrays of point.name and y
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
*
* @type {Array<number|Array<number>|*>}
* @extends series.column.data
* @product highcharts
* @apioption series.funnel3d.data
*/
/**
* By deafult sides fill is set to a gradient through this option being
* set to `true`. Set to `false` to get solid color for the sides.
*
* @type {boolean}
* @product highcharts
* @apioption series.funnel3d.data.gradientForSides
*/
funnel3dMethods = merge(RendererProto.elements3d.cuboid, {
parts: [
'top', 'bottom',
'frontUpper', 'backUpper',
'frontLower', 'backLower',
'rightUpper', 'rightLower'
],
mainParts: ['top', 'bottom'],
sideGroups: [
'upperGroup', 'lowerGroup'
],
sideParts: {
upperGroup: ['frontUpper', 'backUpper', 'rightUpper'],
lowerGroup: ['frontLower', 'backLower', 'rightLower']
},
pathType: 'funnel3d',
// override opacity and color setters to control opacity
opacitySetter: function (opacity) {
var funnel3d = this,
parts = funnel3d.parts,
chart = H.charts[funnel3d.renderer.chartIndex],
filterId = 'group-opacity-' + opacity + '-' + chart.index;
// use default for top and bottom
funnel3d.parts = funnel3d.mainParts;
funnel3d.singleSetterForParts('opacity', opacity);
// restore
funnel3d.parts = parts;
if (!chart.renderer.filterId) {
chart.renderer.definition({
tagName: 'filter',
id: filterId,
children: [{
tagName: 'feComponentTransfer',
children: [{
tagName: 'feFuncA',
type: 'table',
tableValues: '0 ' + opacity
}]
}]
});
funnel3d.sideGroups.forEach(function (groupName) {
funnel3d[groupName].attr({
filter: 'url(#' + filterId + ')'
});
});
// styled mode
if (funnel3d.renderer.styledMode) {
chart.renderer.definition({
tagName: 'style',
textContent: '.highcharts-' + filterId +
' {filter:url(#' + filterId + ')}'
});
funnel3d.sideGroups.forEach(function (group) {
group.addClass('highcharts-' + filterId);
});
}
}
return funnel3d;
},
fillSetter: function (fill) {
// extract alpha channel to use the opacitySetter
var funnel3d = this,
fillColor = color(fill),
alpha = fillColor.rgba[3],
partsWithColor = {
// standard color for top and bottom
top: color(fill).brighten(0.1).get(),
bottom: color(fill).brighten(-0.2).get()
};
if (alpha < 1) {
fillColor.rgba[3] = 1;
fillColor = fillColor.get('rgb');
// set opacity through the opacitySetter
funnel3d.attr({
opacity: alpha
});
}
else {
// use default for full opacity
fillColor = fill;
}
// add gradient for sides
if (!fillColor.linearGradient &&
!fillColor.radialGradient &&
funnel3d.gradientForSides) {
fillColor = {
linearGradient: { x1: 0, x2: 1, y1: 1, y2: 1 },
stops: [
[0, color(fill).brighten(-0.2).get()],
[0.5, fill],
[1, color(fill).brighten(-0.2).get()]
]
};
}
// gradient support
if (fillColor.linearGradient) {
// color in steps, as each gradient will generate a key
funnel3d.sideGroups.forEach(function (sideGroupName) {
var box = funnel3d[sideGroupName].gradientBox,
gradient = fillColor.linearGradient,
alteredGradient = merge(fillColor, {
linearGradient: {
x1: box.x + gradient.x1 * box.width,
y1: box.y + gradient.y1 * box.height,
x2: box.x + gradient.x2 * box.width,
y2: box.y + gradient.y2 * box.height
}
});
funnel3d.sideParts[sideGroupName].forEach(function (partName) {
partsWithColor[partName] = alteredGradient;
});
});
}
else {
merge(true, partsWithColor, {
frontUpper: fillColor,
backUpper: fillColor,
rightUpper: fillColor,
frontLower: fillColor,
backLower: fillColor,
rightLower: fillColor
});
if (fillColor.radialGradient) {
funnel3d.sideGroups.forEach(function (sideGroupName) {
var gradBox = funnel3d[sideGroupName].gradientBox,
centerX = gradBox.x + gradBox.width / 2,
centerY = gradBox.y + gradBox.height / 2,
diameter = Math.min(gradBox.width,
gradBox.height);
funnel3d.sideParts[sideGroupName].forEach(function (partName) {
funnel3d[partName].setRadialReference([
centerX, centerY, diameter
]);
});
});
}
}
funnel3d.singleSetterForParts('fill', null, partsWithColor);
// fill for animation getter (#6776)
funnel3d.color = funnel3d.fill = fill;
// change gradientUnits to userSpaceOnUse for linearGradient
if (fillColor.linearGradient) {
[funnel3d.frontLower, funnel3d.frontUpper].forEach(function (part) {
var elem = part.element,
grad = elem && funnel3d.renderer.gradients[elem.gradient];
if (grad && grad.attr('gradientUnits') !== 'userSpaceOnUse') {
grad.attr({
gradientUnits: 'userSpaceOnUse'
});
}
});
}
return funnel3d;
},
adjustForGradient: function () {
var funnel3d = this,
bbox;
funnel3d.sideGroups.forEach(function (sideGroupName) {
// use common extremes for groups for matching gradients
var topLeftEdge = {
x: Number.MAX_VALUE,
y: Number.MAX_VALUE
},
bottomRightEdge = {
x: -Number.MAX_VALUE,
y: -Number.MAX_VALUE
};
// get extremes
funnel3d.sideParts[sideGroupName].forEach(function (partName) {
var part = funnel3d[partName];
bbox = part.getBBox(true);
topLeftEdge = {
x: Math.min(topLeftEdge.x, bbox.x),
y: Math.min(topLeftEdge.y, bbox.y)
};
bottomRightEdge = {
x: Math.max(bottomRightEdge.x, bbox.x + bbox.width),
y: Math.max(bottomRightEdge.y, bbox.y + bbox.height)
};
});
// store for color fillSetter
funnel3d[sideGroupName].gradientBox = {
x: topLeftEdge.x,
width: bottomRightEdge.x - topLeftEdge.x,
y: topLeftEdge.y,
height: bottomRightEdge.y - topLeftEdge.y
};
});
},
zIndexSetter: function () {
// this.added won't work, because zIndex is set after the prop is set,
// but before the graphic is really added
if (this.finishedOnAdd) {
this.adjustForGradient();
}
// run default
return this.renderer.Element.prototype.zIndexSetter.apply(this, arguments);
},
onAdd: function () {
this.adjustForGradient();
this.finishedOnAdd = true;
}
});
RendererProto.elements3d.funnel3d = funnel3dMethods;
RendererProto.funnel3d = function (shapeArgs) {
var renderer = this,
funnel3d = renderer.element3d('funnel3d',
shapeArgs),
styledMode = renderer.styledMode,
// hide stroke for Firefox
strokeAttrs = {
'stroke-width': 1,
stroke: 'none'
};
// create groups for sides for oppacity setter
funnel3d.upperGroup = renderer.g('funnel3d-upper-group').attr({
zIndex: funnel3d.frontUpper.zIndex
}).add(funnel3d);
[
funnel3d.frontUpper,
funnel3d.backUpper,
funnel3d.rightUpper
].forEach(function (upperElem) {
if (!styledMode) {
upperElem.attr(strokeAttrs);
}
upperElem.add(funnel3d.upperGroup);
});
funnel3d.lowerGroup = renderer.g('funnel3d-lower-group').attr({
zIndex: funnel3d.frontLower.zIndex
}).add(funnel3d);
[
funnel3d.frontLower,
funnel3d.backLower,
funnel3d.rightLower
].forEach(function (lowerElem) {
if (!styledMode) {
lowerElem.attr(strokeAttrs);
}
lowerElem.add(funnel3d.lowerGroup);
});
funnel3d.gradientForSides = shapeArgs.gradientForSides;
return funnel3d;
};
// eslint-disable-next-line valid-jsdoc
/**
* Generates paths and zIndexes.
* @private
*/
RendererProto.funnel3dPath = function (shapeArgs) {
// Check getCylinderEnd for better error message if
// the cylinder module is missing
if (!this.getCylinderEnd) {
error('A required Highcharts module is missing: cylinder.js', true, charts[this.chartIndex]);
}
var renderer = this,
chart = charts[renderer.chartIndex],
// adjust angles for visible edges
// based on alpha, selected through visual tests
alphaCorrection = shapeArgs.alphaCorrection = 90 -
Math.abs((chart.options.chart.options3d.alpha % 180) - 90),
// set zIndexes of parts based on cubiod logic, for consistency
cuboidData = cuboidPath.call(renderer,
merge(shapeArgs, {
depth: shapeArgs.width,
width: (shapeArgs.width + shapeArgs.bottom.width) / 2
})),
isTopFirst = cuboidData.isTop,
isFrontFirst = !cuboidData.isFront,
hasMiddle = !!shapeArgs.middle,
//
top = renderer.getCylinderEnd(chart,
merge(shapeArgs, {
x: shapeArgs.x - shapeArgs.width / 2,
z: shapeArgs.z - shapeArgs.width / 2,
alphaCorrection: alphaCorrection
})),
bottomWidth = shapeArgs.bottom.width,
bottomArgs = merge(shapeArgs, {
width: bottomWidth,
x: shapeArgs.x - bottomWidth / 2,
z: shapeArgs.z - bottomWidth / 2,
alphaCorrection: alphaCorrection
}),
bottom = renderer.getCylinderEnd(chart,
bottomArgs,
true),
//
middleWidth = bottomWidth,
middleTopArgs = bottomArgs,
middleTop = bottom,
middleBottom = bottom,
ret,
// masking for cylinders or a missing part of a side shape
useAlphaCorrection;
if (hasMiddle) {
middleWidth = shapeArgs.middle.width;
middleTopArgs = merge(shapeArgs, {
y: shapeArgs.y + shapeArgs.middle.fraction * shapeArgs.height,
width: middleWidth,
x: shapeArgs.x - middleWidth / 2,
z: shapeArgs.z - middleWidth / 2
});
middleTop = renderer.getCylinderEnd(chart, middleTopArgs, false);
middleBottom = renderer.getCylinderEnd(chart, middleTopArgs, false);
}
ret = {
top: top,
bottom: bottom,
frontUpper: renderer.getCylinderFront(top, middleTop),
zIndexes: {
group: cuboidData.zIndexes.group,
top: isTopFirst !== 0 ? 0 : 3,
bottom: isTopFirst !== 1 ? 0 : 3,
frontUpper: isFrontFirst ? 2 : 1,
backUpper: isFrontFirst ? 1 : 2,
rightUpper: isFrontFirst ? 2 : 1
}
};
ret.backUpper = renderer.getCylinderBack(top, middleTop);
useAlphaCorrection = (Math.min(middleWidth, shapeArgs.width) /
Math.max(middleWidth, shapeArgs.width)) !== 1;
ret.rightUpper = renderer.getCylinderFront(renderer.getCylinderEnd(chart, merge(shapeArgs, {
x: shapeArgs.x - shapeArgs.width / 2,
z: shapeArgs.z - shapeArgs.width / 2,
alphaCorrection: useAlphaCorrection ? -alphaCorrection : 0
}), false), renderer.getCylinderEnd(chart, merge(middleTopArgs, {
alphaCorrection: useAlphaCorrection ? -alphaCorrection : 0
}), !hasMiddle));
if (hasMiddle) {
useAlphaCorrection = (Math.min(middleWidth, bottomWidth) /
Math.max(middleWidth, bottomWidth)) !== 1;
merge(true, ret, {
frontLower: renderer.getCylinderFront(middleBottom, bottom),
backLower: renderer.getCylinderBack(middleBottom, bottom),
rightLower: renderer.getCylinderFront(renderer.getCylinderEnd(chart, merge(bottomArgs, {
alphaCorrection: useAlphaCorrection ?
-alphaCorrection : 0
}), true), renderer.getCylinderEnd(chart, merge(middleTopArgs, {
alphaCorrection: useAlphaCorrection ?
-alphaCorrection : 0
}), false)),
zIndexes: {
frontLower: isFrontFirst ? 2 : 1,
backLower: isFrontFirst ? 1 : 2,
rightLower: isFrontFirst ? 1 : 2
}
});
}
return ret;
};
});
_registerModule(_modules, 'masters/modules/funnel3d.src.js', [], function () {
});
}));
+198
View File
@@ -0,0 +1,198 @@
/*
Highcharts Gantt JS v8.2.0 (2020-08-20)
Gantt series
(c) 2016-2019 Lars A. V. Cabrera
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/gantt",["highcharts"],function(J){e(J);e.Highcharts=J;return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){function J(e,n,v,x){e.hasOwnProperty(n)||(e[n]=x.apply(null,v))}e=e?e._modules:{};J(e,"Gantt/Tree.js",[e["Core/Utilities.js"]],function(e){var n=e.extend,v=e.isNumber,x=e.pick,w=function(n,u){var l=n.reduce(function(b,
m){var q=x(m.parent,"");"undefined"===typeof b[q]&&(b[q]=[]);b[q].push(m);return b},{});Object.keys(l).forEach(function(b,m){var q=l[b];""!==b&&-1===u.indexOf(b)&&(q.forEach(function(b){m[""].push(b)}),delete m[b])});return l},y=function(e,u,l,b,m,q){var z=0,F=0,G=q&&q.after,k=q&&q.before;u={data:b,depth:l-1,id:e,level:l,parent:u};var f,a;"function"===typeof k&&k(u,q);k=(m[e]||[]).map(function(h){var d=y(h.id,e,l+1,h,m,q),r=h.start;h=!0===h.milestone?r:h.end;f=!v(f)||r<f?r:f;a=!v(a)||h>a?h:a;z=z+
1+d.descendants;F=Math.max(d.height+1,F);return d});b&&(b.start=x(b.start,f),b.end=x(b.end,a));n(u,{children:k,descendants:z,height:F});"function"===typeof G&&G(u,q);return u};return{getListOfParents:w,getNode:y,getTree:function(e,u){var l=e.map(function(b){return b.id});e=w(e,l);return y("",null,1,null,e,u)}}});J(e,"Core/Axis/TreeGridTick.js",[e["Core/Utilities.js"]],function(e){var n=e.addEvent,v=e.defined,x=e.isObject,w=e.isNumber,y=e.pick,C=e.wrap,u;(function(l){function b(){this.treeGrid||(this.treeGrid=
new G(this))}function m(k,f){k=k.treeGrid;var a=!k.labelIcon,h=f.renderer,d=f.xy,r=f.options,c=r.width,A=r.height,t=d.x-c/2-r.padding;d=d.y-A/2;var I=f.collapsed?90:180,D=f.show&&w(d),B=k.labelIcon;B||(k.labelIcon=B=h.path(h.symbols[r.type](r.x,r.y,c,A)).addClass("highcharts-label-icon").add(f.group));D||B.attr({y:-9999});h.styledMode||B.attr({"stroke-width":1,fill:y(f.color,"#666666")}).css({cursor:"pointer",stroke:r.lineColor,strokeWidth:r.lineWidth});B[a?"attr":"animate"]({translateX:t,translateY:d,
rotation:I})}function q(k,f,a,h,d,r,c,A,t){var I=y(this.options&&this.options.labels,r);r=this.pos;var D=this.axis,B="treegrid"===D.options.type;k=k.apply(this,[f,a,h,d,I,c,A,t]);B&&(f=I&&x(I.symbol,!0)?I.symbol:{},I=I&&w(I.indentation)?I.indentation:0,r=(r=(D=D.treeGrid.mapOfPosToGridNode)&&D[r])&&r.depth||1,k.x+=f.width+2*f.padding+(r-1)*I);return k}function z(k){var f=this,a=f.pos,h=f.axis,d=f.label,r=h.treeGrid.mapOfPosToGridNode,c=h.options,A=y(f.options&&f.options.labels,c&&c.labels),t=A&&x(A.symbol,
!0)?A.symbol:{},I=(r=r&&r[a])&&r.depth;c="treegrid"===c.type;var D=-1<h.tickPositions.indexOf(a);a=h.chart.styledMode;c&&r&&d&&d.element&&d.addClass("highcharts-treegrid-node-level-"+I);k.apply(f,Array.prototype.slice.call(arguments,1));c&&d&&d.element&&r&&r.descendants&&0<r.descendants&&(h=h.treeGrid.isCollapsed(r),m(f,{color:!a&&d.styles&&d.styles.color||"",collapsed:h,group:d.parentGroup,options:t,renderer:d.renderer,show:D,xy:d.xy}),t="highcharts-treegrid-node-"+(h?"expanded":"collapsed"),d.addClass("highcharts-treegrid-node-"+
(h?"collapsed":"expanded")).removeClass(t),a||d.css({cursor:"pointer"}),[d,f.treeGrid.labelIcon].forEach(function(c){c&&!c.attachedTreeGridEvents&&(n(c.element,"mouseover",function(){d.addClass("highcharts-treegrid-node-active");d.renderer.styledMode||d.css({textDecoration:"underline"})}),n(c.element,"mouseout",function(){var c=v(A.style)?A.style:{};d.removeClass("highcharts-treegrid-node-active");d.renderer.styledMode||d.css({textDecoration:c.textDecoration})}),n(c.element,"click",function(){f.treeGrid.toggleCollapse()}),
c.attachedTreeGridEvents=!0)}))}var F=!1;l.compose=function(k){F||(n(k,"init",b),C(k.prototype,"getLabelPosition",q),C(k.prototype,"renderLabel",z),k.prototype.collapse=function(f){this.treeGrid.collapse(f)},k.prototype.expand=function(f){this.treeGrid.expand(f)},k.prototype.toggleCollapse=function(f){this.treeGrid.toggleCollapse(f)},F=!0)};var G=function(){function k(f){this.tick=f}k.prototype.collapse=function(f){var a=this.tick,h=a.axis,d=h.brokenAxis;d&&h.treeGrid.mapOfPosToGridNode&&(a=h.treeGrid.collapse(h.treeGrid.mapOfPosToGridNode[a.pos]),
d.setBreaks(a,y(f,!0)))};k.prototype.expand=function(f){var a=this.tick,h=a.axis,d=h.brokenAxis;d&&h.treeGrid.mapOfPosToGridNode&&(a=h.treeGrid.expand(h.treeGrid.mapOfPosToGridNode[a.pos]),d.setBreaks(a,y(f,!0)))};k.prototype.toggleCollapse=function(f){var a=this.tick,h=a.axis,d=h.brokenAxis;d&&h.treeGrid.mapOfPosToGridNode&&(a=h.treeGrid.toggleCollapse(h.treeGrid.mapOfPosToGridNode[a.pos]),d.setBreaks(a,y(f,!0)))};return k}();l.Additions=G})(u||(u={}));return u});J(e,"Mixins/TreeSeries.js",[e["Core/Color.js"],
e["Core/Utilities.js"]],function(e,n){var v=n.extend,x=n.isArray,w=n.isNumber,y=n.isObject,C=n.merge,u=n.pick;return{getColor:function(l,b){var m=b.index,q=b.mapOptionsToLevel,z=b.parentColor,F=b.parentColorIndex,G=b.series,k=b.colors,f=b.siblings,a=G.points,h=G.chart.options.chart,d;if(l){a=a[l.i];l=q[l.level]||{};if(q=a&&l.colorByPoint){var r=a.index%(k?k.length:h.colorCount);var c=k&&k[r]}if(!G.chart.styledMode){k=a&&a.options.color;h=l&&l.color;if(d=z)d=(d=l&&l.colorVariation)&&"brightness"===
d.key?e.parse(z).brighten(m/f*d.to).get():z;d=u(k,h,c,d,G.color)}var A=u(a&&a.options.colorIndex,l&&l.colorIndex,r,F,b.colorIndex)}return{color:d,colorIndex:A}},getLevelOptions:function(l){var b=null;if(y(l)){b={};var m=w(l.from)?l.from:1;var q=l.levels;var z={};var F=y(l.defaults)?l.defaults:{};x(q)&&(z=q.reduce(function(b,k){if(y(k)&&w(k.level)){var f=C({},k);var a="boolean"===typeof f.levelIsConstant?f.levelIsConstant:F.levelIsConstant;delete f.levelIsConstant;delete f.level;k=k.level+(a?0:m-1);
y(b[k])?v(b[k],f):b[k]=f}return b},{}));q=w(l.to)?l.to:1;for(l=0;l<=q;l++)b[l]=C({},F,y(z[l])?z[l]:{})}return b},setTreeValues:function q(b,m){var z=m.before,F=m.idRoot,G=m.mapIdToNode[F],k=m.points[b.i],f=k&&k.options||{},a=0,h=[];v(b,{levelDynamic:b.level-(("boolean"===typeof m.levelIsConstant?m.levelIsConstant:1)?0:G.level),name:u(k&&k.name,""),visible:F===b.id||("boolean"===typeof m.visible?m.visible:!1)});"function"===typeof z&&(b=z(b,m));b.children.forEach(function(d,r){var c=v({},m);v(c,{index:r,
siblings:b.children.length,visible:b.visible});d=q(d,c);h.push(d);d.visible&&(a+=d.val)});b.visible=0<a||b.visible;z=u(f.value,a);v(b,{children:h,childrenTotal:a,isLeaf:b.visible&&!a,val:z});return b},updateRootId:function(b){if(y(b)){var m=y(b.options)?b.options:{};m=u(b.rootNode,m.rootId,"");y(b.userOptions)&&(b.userOptions.rootId=m);b.rootNode=m}return m}}});J(e,"Core/Axis/GridAxis.js",[e["Core/Axis/Axis.js"],e["Core/Globals.js"],e["Core/Options.js"],e["Core/Axis/Tick.js"],e["Core/Utilities.js"]],
function(e,n,v,x,w){var y=v.dateFormat,C=w.addEvent,u=w.defined,l=w.erase,b=w.find,m=w.isArray,q=w.isNumber,z=w.merge,F=w.pick,G=w.timeUnits,k=w.wrap;v=n.Chart;var f=function(d){var r=d.options;r.labels||(r.labels={});r.labels.align=F(r.labels.align,"center");d.categories||(r.showLastLabel=!1);d.labelRotation=0;r.labels.rotation=0};"";e.prototype.getMaxLabelDimensions=function(d,r){var c={width:0,height:0};r.forEach(function(r){var a=d[r];r=0;if(w.isObject(a,!0)){var A=w.isObject(a.label,!0)?a.label:
{};a=A.getBBox?A.getBBox().height:0;A.textStr&&(r=Math.round(A.getBBox().width));c.height=Math.max(a,c.height);c.width=Math.max(r,c.width)}});return c};n.dateFormats.W=function(a){a=new this.Date(a);var r=(this.get("Day",a)+6)%7,c=new this.Date(a.valueOf());this.set("Date",c,this.get("Date",a)-r+3);r=new this.Date(this.get("FullYear",c),0,1);4!==this.get("Day",r)&&(this.set("Month",a,0),this.set("Date",a,1+(11-this.get("Day",r))%7));return(1+Math.floor((c.valueOf()-r.valueOf())/6048E5)).toString()};
n.dateFormats.E=function(a){return y("%a",a,!0).charAt(0)};C(v,"afterSetChartSize",function(){this.axes.forEach(function(a){(a.grid&&a.grid.columns||[]).forEach(function(r){r.setAxisSize();r.setAxisTranslation()})})});C(x,"afterGetLabelPosition",function(a){var r=this.label,c=this.axis,d=c.reversed,t=c.chart,f=c.options.grid||{},D=c.options.labels,B=D.align,E=h.Side[c.side],g=a.tickmarkOffset,p=c.tickPositions,H=this.pos-g;p=q(p[a.index+1])?p[a.index+1]-g:c.max+g;var K=c.tickSize("tick");g=K?K[0]:
0;K=K?K[1]/2:0;if(!0===f.enabled){if("top"===E){f=c.top+c.offset;var L=f-g}else"bottom"===E?(L=t.chartHeight-c.bottom+c.offset,f=L+g):(f=c.top+c.len-c.translate(d?p:H),L=c.top+c.len-c.translate(d?H:p));"right"===E?(E=t.chartWidth-c.right+c.offset,d=E+g):"left"===E?(d=c.left+c.offset,E=d-g):(E=Math.round(c.left+c.translate(d?p:H))-K,d=Math.round(c.left+c.translate(d?H:p))-K);this.slotWidth=d-E;a.pos.x="left"===B?E:"right"===B?d:E+(d-E)/2;a.pos.y=L+(f-L)/2;t=t.renderer.fontMetrics(D.style.fontSize,
r.element);r=r.getBBox().height;D.useHTML?a.pos.y+=t.b+-(r/2):(r=Math.round(r/t.h),a.pos.y+=(t.b-(t.h-t.f))/2+-((r-1)*t.h/2));a.pos.x+=c.horiz&&D.x||0}});var a=function(){function a(a){this.axis=a}a.prototype.isOuterAxis=function(){var a=this.axis,c=a.grid.columnIndex,d=a.linkedParent&&a.linkedParent.grid.columns||a.grid.columns,t=c?a.linkedParent:a,h=-1,f=0;a.chart[a.coll].forEach(function(c,r){c.side!==a.side||c.options.isInternal||(f=r,c===t&&(h=r))});return f===h&&(q(c)?d.length===c:!0)};return a}(),
h=function(){function d(){}d.compose=function(a){e.keepProps.push("grid");k(a.prototype,"unsquish",d.wrapUnsquish);C(a,"init",d.onInit);C(a,"afterGetOffset",d.onAfterGetOffset);C(a,"afterGetTitlePosition",d.onAfterGetTitlePosition);C(a,"afterInit",d.onAfterInit);C(a,"afterRender",d.onAfterRender);C(a,"afterSetAxisTranslation",d.onAfterSetAxisTranslation);C(a,"afterSetOptions",d.onAfterSetOptions);C(a,"afterSetOptions",d.onAfterSetOptions2);C(a,"afterSetScale",d.onAfterSetScale);C(a,"afterTickSize",
d.onAfterTickSize);C(a,"trimTicks",d.onTrimTicks);C(a,"destroy",d.onDestroy)};d.onAfterGetOffset=function(){var a=this.grid;(a&&a.columns||[]).forEach(function(a){a.getOffset()})};d.onAfterGetTitlePosition=function(a){if(!0===(this.options.grid||{}).enabled){var c=this.axisTitle,r=this.height,t=this.horiz,h=this.left,f=this.offset,B=this.opposite,E=this.options.title,g=void 0===E?{}:E;E=this.top;var p=this.width,H=this.tickSize(),K=c&&c.getBBox().width,L=g.x||0,k=g.y||0,b=F(g.margin,t?5:10);c=this.chart.renderer.fontMetrics(g.style&&
g.style.fontSize,c).f;H=(t?E+r:h)+(t?1:-1)*(B?-1:1)*(H?H[0]/2:0)+(this.side===d.Side.bottom?c:0);a.titlePosition.x=t?h-K/2-b+L:H+(B?p:0)+f+L;a.titlePosition.y=t?H-(B?r:0)+(B?c:-c)/2+f+k:E-b+k}};d.onAfterInit=function(){var a=this.chart,c=this.options.grid;c=void 0===c?{}:c;var d=this.userOptions;c.enabled&&(f(this),k(this,"labelFormatter",function(a){var c=this.axis,g=this.value,p=c.tickPositions,r=(c.isLinked?c.linkedParent:c).series[0],d=g===p[0];p=g===p[p.length-1];r=r&&b(r.options.data,function(p){return p[c.isXAxis?
"x":"y"]===g});this.isFirst=d;this.isLast=p;this.point=r;return a.call(this)}));if(c.columns)for(var t=this.grid.columns=[],h=this.grid.columnIndex=0;++h<c.columns.length;){var D=z(d,c.columns[c.columns.length-h-1],{linkedTo:0,type:"category",scrollbar:{enabled:!1}});delete D.grid.columns;D=new e(this.chart,D);D.grid.isColumn=!0;D.grid.columnIndex=h;l(a.axes,D);l(a[this.coll],D);t.push(D)}};d.onAfterRender=function(){var a=this.grid,c=this.options,h=this.chart.renderer;if(!0===(c.grid||{}).enabled){this.maxLabelDimensions=
this.getMaxLabelDimensions(this.ticks,this.tickPositions);this.rightWall&&this.rightWall.destroy();if(this.grid&&this.grid.isOuterAxis()&&this.axisLine){var t=c.lineWidth;if(t){var f=this.getLinePath(t),D=f[0],k=f[1],E=((this.tickSize("tick")||[1])[0]-1)*(this.side===d.Side.top||this.side===d.Side.left?-1:1);"M"===D[0]&&"L"===k[0]&&(this.horiz?(D[2]+=E,k[2]+=E):(D[1]+=E,k[1]+=E));this.grid.axisLineExtra?this.grid.axisLineExtra.animate({d:f}):(this.grid.axisLineExtra=h.path(f).attr({zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup),
h.styledMode||this.grid.axisLineExtra.attr({stroke:c.lineColor,"stroke-width":t}));this.axisLine[this.showAxis?"show":"hide"](!0)}}(a&&a.columns||[]).forEach(function(g){g.render()})}};d.onAfterSetAxisTranslation=function(){var a=this.tickPositions&&this.tickPositions.info,c=this.options,d=c.grid||{},t=this.userOptions.labels||{};this.horiz&&(!0===d.enabled&&this.series.forEach(function(a){a.options.pointRange=0}),a&&c.dateTimeLabelFormats&&c.labels&&!u(t.align)&&(!1===c.dateTimeLabelFormats[a.unitName].range||
1<a.count)&&(c.labels.align="left",u(t.x)||(c.labels.x=3)))};d.onAfterSetOptions=function(a){var c=this.options;a=a.userOptions;var d=c&&w.isObject(c.grid,!0)?c.grid:{};if(!0===d.enabled){var r=z(!0,{className:"highcharts-grid-axis "+(a.className||""),dateTimeLabelFormats:{hour:{list:["%H:%M","%H"]},day:{list:["%A, %e. %B","%a, %e. %b","%E"]},week:{list:["Week %W","W%W"]},month:{list:["%B","%b","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"13px"}},margin:0,title:{text:null,reserveSpace:!1,
rotation:0},units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},a);"xAxis"===this.coll&&(u(a.linkedTo)&&!u(a.tickPixelInterval)&&(r.tickPixelInterval=350),u(a.tickPixelInterval)||!u(a.linkedTo)||u(a.tickPositioner)||u(a.tickInterval)||(r.tickPositioner=function(a,c){var d=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(d){var t,g=r.units;for(t=0;t<g.length;t++)if(g[t][0]===
d.unitName){var p=t;break}if(g[p+1]){var H=g[p+1][0];var h=(g[p+1][1]||[1])[0]}else"year"===d.unitName&&(H="year",h=10*d.count);d=G[H];this.tickInterval=d*h;return this.getTimeTicks({unitRange:d,count:h,unitName:H},a,c,this.options.startOfWeek)}}));z(!0,this.options,r);this.horiz&&(c.minPadding=F(a.minPadding,0),c.maxPadding=F(a.maxPadding,0));q(c.grid.borderWidth)&&(c.tickWidth=c.lineWidth=d.borderWidth)}};d.onAfterSetOptions2=function(a){a=(a=a.userOptions)&&a.grid||{};var c=a.columns;a.enabled&&
c&&z(!0,this.options,c[c.length-1])};d.onAfterSetScale=function(){(this.grid.columns||[]).forEach(function(a){a.setScale()})};d.onAfterTickSize=function(a){var c=e.defaultLeftAxisOptions,d=this.horiz,t=this.maxLabelDimensions,h=this.options.grid;h=void 0===h?{}:h;h.enabled&&t&&(c=2*Math.abs(c.labels.x),d=d?h.cellHeight||c+t.height:c+t.width,m(a.tickSize)?a.tickSize[0]=d:a.tickSize=[d,0])};d.onDestroy=function(a){var c=this.grid;(c.columns||[]).forEach(function(c){c.destroy(a.keepEvents)});c.columns=
void 0};d.onInit=function(d){d=d.userOptions||{};var c=d.grid||{};c.enabled&&u(c.borderColor)&&(d.tickColor=d.lineColor=c.borderColor);this.grid||(this.grid=new a(this))};d.onTrimTicks=function(){var a=this.options,c=this.categories,d=this.tickPositions,h=d[0],f=d[d.length-1],k=this.linkedParent&&this.linkedParent.min||this.min,b=this.linkedParent&&this.linkedParent.max||this.max,E=this.tickInterval;!0!==(a.grid||{}).enabled||c||!this.horiz&&!this.isLinked||(h<k&&h+E>k&&!a.startOnTick&&(d[0]=k),f>
b&&f-E<b&&!a.endOnTick&&(d[d.length-1]=b))};d.wrapUnsquish=function(a){var c=this.options.grid;return!0===(void 0===c?{}:c).enabled&&this.categories?this.tickInterval:a.apply(this,Array.prototype.slice.call(arguments,1))};return d}();(function(a){a=a.Side||(a.Side={});a[a.top=0]="top";a[a.right=1]="right";a[a.bottom=2]="bottom";a[a.left=3]="left"})(h||(h={}));h.compose(e);return h});J(e,"Core/Axis/BrokenAxis.js",[e["Core/Axis/Axis.js"],e["Core/Globals.js"],e["Core/Utilities.js"],e["Extensions/Stacking.js"]],
function(e,n,v,x){var w=v.addEvent,y=v.find,C=v.fireEvent,u=v.isArray,l=v.isNumber,b=v.pick,m=n.Series,q=function(){function m(b){this.hasBreaks=!1;this.axis=b}m.isInBreak=function(b,m){var k=b.repeat||Infinity,f=b.from,a=b.to-b.from;m=m>=f?(m-f)%k:k-(f-m)%k;return b.inclusive?m<=a:m<a&&0!==m};m.lin2Val=function(b){var q=this.brokenAxis;q=q&&q.breakArray;if(!q)return b;var k;for(k=0;k<q.length;k++){var f=q[k];if(f.from>=b)break;else f.to<b?b+=f.len:m.isInBreak(f,b)&&(b+=f.len)}return b};m.val2Lin=
function(b){var q=this.brokenAxis;q=q&&q.breakArray;if(!q)return b;var k=b,f;for(f=0;f<q.length;f++){var a=q[f];if(a.to<=b)k-=a.len;else if(a.from>=b)break;else if(m.isInBreak(a,b)){k-=b-a.from;break}}return k};m.prototype.findBreakAt=function(b,m){return y(m,function(k){return k.from<b&&b<k.to})};m.prototype.isInAnyBreak=function(q,l){var k=this.axis,f=k.options.breaks,a=f&&f.length,h;if(a){for(;a--;)if(m.isInBreak(f[a],q)){var d=!0;h||(h=b(f[a].showPoints,!k.isXAxis))}var r=d&&l?d&&!h:d}return r};
m.prototype.setBreaks=function(q,l){var k=this,f=k.axis,a=u(q)&&!!q.length;f.isDirty=k.hasBreaks!==a;k.hasBreaks=a;f.options.breaks=f.userOptions.breaks=q;f.forceRedraw=!0;f.series.forEach(function(a){a.isDirty=!0});a||f.val2lin!==m.val2Lin||(delete f.val2lin,delete f.lin2val);a&&(f.userOptions.ordinal=!1,f.lin2val=m.lin2Val,f.val2lin=m.val2Lin,f.setExtremes=function(a,d,f,c,b){if(k.hasBreaks){for(var t,h=this.options.breaks;t=k.findBreakAt(a,h);)a=t.to;for(;t=k.findBreakAt(d,h);)d=t.from;d<a&&(d=
a)}e.prototype.setExtremes.call(this,a,d,f,c,b)},f.setAxisTranslation=function(a){e.prototype.setAxisTranslation.call(this,a);k.unitLength=null;if(k.hasBreaks){a=f.options.breaks||[];var d=[],h=[],c=0,A,t=f.userMin||f.min,q=f.userMax||f.max,D=b(f.pointRangePadding,0),B;a.forEach(function(a){A=a.repeat||Infinity;m.isInBreak(a,t)&&(t+=a.to%A-t%A);m.isInBreak(a,q)&&(q-=q%A-a.from%A)});a.forEach(function(a){g=a.from;for(A=a.repeat||Infinity;g-A>t;)g-=A;for(;g<t;)g+=A;for(B=g;B<q;B+=A)d.push({value:B,
move:"in"}),d.push({value:B+(a.to-a.from),move:"out",size:a.breakSize})});d.sort(function(a,g){return a.value===g.value?("in"===a.move?0:1)-("in"===g.move?0:1):a.value-g.value});var E=0;var g=t;d.forEach(function(a){E+="in"===a.move?1:-1;1===E&&"in"===a.move&&(g=a.value);0===E&&(h.push({from:g,to:a.value,len:a.value-g-(a.size||0)}),c+=a.value-g-(a.size||0))});f.breakArray=k.breakArray=h;k.unitLength=q-t-c+D;C(f,"afterBreaks");f.staticScale?f.transA=f.staticScale:k.unitLength&&(f.transA*=(q-f.min+
D)/k.unitLength);D&&(f.minPixelPadding=f.transA*f.minPointOffset);f.min=t;f.max=q}});b(l,!0)&&f.chart.redraw()};return m}();n=function(){function z(){}z.compose=function(z,e){z.keepProps.push("brokenAxis");var k=m.prototype;k.drawBreaks=function(f,a){var h=this,d=h.points,r,c,A,t;if(f&&f.brokenAxis&&f.brokenAxis.hasBreaks){var k=f.brokenAxis;a.forEach(function(a){r=k&&k.breakArray||[];c=f.isXAxis?f.min:b(h.options.threshold,f.min);d.forEach(function(d){t=b(d["stack"+a.toUpperCase()],d[a]);r.forEach(function(a){if(l(c)&&
l(t)){A=!1;if(c<a.from&&t>a.to||c>a.from&&t<a.from)A="pointBreak";else if(c<a.from&&t>a.from&&t<a.to||c>a.from&&t>a.to&&t<a.from)A="pointInBreak";A&&C(f,A,{point:d,brk:a})}})})})}};k.gappedPath=function(){var f=this.currentDataGrouping,a=f&&f.gapSize;f=this.options.gapSize;var h=this.points.slice(),d=h.length-1,r=this.yAxis,c;if(f&&0<d)for("value"!==this.options.gapUnit&&(f*=this.basePointRange),a&&a>f&&a>=this.basePointRange&&(f=a),c=void 0;d--;)c&&!1!==c.visible||(c=h[d+1]),a=h[d],!1!==c.visible&&
!1!==a.visible&&(c.x-a.x>f&&(c=(a.x+c.x)/2,h.splice(d+1,0,{isNull:!0,x:c}),r.stacking&&this.options.stacking&&(c=r.stacking.stacks[this.stackKey][c]=new x(r,r.options.stackLabels,!1,c,this.stack),c.total=0)),c=a);return this.getGraphPath(h)};w(z,"init",function(){this.brokenAxis||(this.brokenAxis=new q(this))});w(z,"afterInit",function(){"undefined"!==typeof this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)});w(z,"afterSetTickPositions",function(){var f=this.brokenAxis;if(f&&f.hasBreaks){var a=
this.tickPositions,h=this.tickPositions.info,d=[],r;for(r=0;r<a.length;r++)f.isInAnyBreak(a[r])||d.push(a[r]);this.tickPositions=d;this.tickPositions.info=h}});w(z,"afterSetOptions",function(){this.brokenAxis&&this.brokenAxis.hasBreaks&&(this.options.ordinal=!1)});w(e,"afterGeneratePoints",function(){var f=this.options.connectNulls,a=this.points,h=this.xAxis,d=this.yAxis;if(this.isDirty)for(var r=a.length;r--;){var c=a[r],b=!(null===c.y&&!1===f)&&(h&&h.brokenAxis&&h.brokenAxis.isInAnyBreak(c.x,!0)||
d&&d.brokenAxis&&d.brokenAxis.isInAnyBreak(c.y,!0));c.visible=b?!1:!1!==c.options.visible}});w(e,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,b(this.pointArrayMap,["y"]))})};return z}();n.compose(e,m);return n});J(e,"Core/Axis/TreeGridAxis.js",[e["Core/Axis/Axis.js"],e["Core/Axis/Tick.js"],e["Gantt/Tree.js"],e["Core/Axis/TreeGridTick.js"],e["Mixins/TreeSeries.js"],e["Core/Utilities.js"]],function(e,n,v,x,w,y){var C=w.getLevelOptions,u=y.addEvent,l=y.find,b=
y.fireEvent,m=y.isNumber,q=y.isObject,z=y.isString,F=y.merge,G=y.pick,k=y.wrap,f;(function(a){function h(a,g){var p=a.collapseStart||0;a=a.collapseEnd||0;a>=g&&(p-=.5);return{from:p,to:a,showPoints:!1}}function d(a,g,p){var c=[],d=[],t={},h={},f=-1,r="boolean"===typeof g?g:!1;a=v.getTree(a,{after:function(a){a=h[a.pos];var g=0,c=0;a.children.forEach(function(a){c+=(a.descendants||0)+1;g=Math.max((a.height||0)+1,g)});a.descendants=c;a.height=g;a.collapsed&&d.push(a)},before:function(a){var g=q(a.data,
!0)?a.data:{},p=z(g.name)?g.name:"",d=t[a.parent];d=q(d,!0)?h[d.pos]:null;var H=function(a){return a.name===p},b;r&&q(d,!0)&&(b=l(d.children,H))?(H=b.pos,b.nodes.push(a)):H=f++;h[H]||(h[H]=b={depth:d?d.depth+1:0,name:p,nodes:[a],children:[],pos:H},-1!==H&&c.push(p),q(d,!0)&&d.children.push(b));z(a.id)&&(t[a.id]=a);b&&!0===g.collapsed&&(b.collapsed=!0);a.pos=H}});h=function(a,g){var c=function(a,p,d){var h=p+(-1===p?0:g-1),t=(h-p)/2,H=p+t;a.nodes.forEach(function(a){var g=a.data;q(g,!0)&&(g.y=p+(g.seriesIndex||
0),delete g.seriesIndex);a.pos=H});d[H]=a;a.pos=H;a.tickmarkOffset=t+.5;a.collapseStart=h+.5;a.children.forEach(function(a){c(a,h+1,d);h=(a.collapseEnd||0)-.5});a.collapseEnd=h+.5;return d};return c(a["-1"],-1,{})}(h,p);return{categories:c,mapOfIdToNode:t,mapOfPosToGridNode:h,collapsedNodes:d,tree:a}}function f(a){a.target.axes.filter(function(a){return"treegrid"===a.options.type}).forEach(function(g){var p=g.options||{},c=p.labels,h=p.uniqueNames,t=0,f=p.max;if(!g.treeGrid.mapOfPosToGridNode||g.series.some(function(a){return!a.hasRendered||
a.isDirtyData||a.isDirty})){p=g.series.reduce(function(a,g){g.visible&&((g.options.data||[]).forEach(function(g){q(g,!0)&&(g.seriesIndex=t,a.push(g))}),!0===h&&t++);return a},[]);if(f&&p.length<f)for(var r=p.length;r<=f;r++)p.push({name:r+"\u200b"});p=d(p,h||!1,!0===h?t:1);g.categories=p.categories;g.treeGrid.mapOfPosToGridNode=p.mapOfPosToGridNode;g.hasNames=!0;g.treeGrid.tree=p.tree;g.series.forEach(function(a){var g=(a.options.data||[]).map(function(a){return q(a,!0)?F(a):a});a.visible&&a.setData(g,
!1)});g.treeGrid.mapOptionsToLevel=C({defaults:c,from:1,levels:c&&c.levels,to:g.treeGrid.tree&&g.treeGrid.tree.height});"beforeRender"===a.type&&(g.treeGrid.collapsedNodes=p.collapsedNodes)}})}function c(a,g){var c=this.treeGrid.mapOptionsToLevel||{},d=this.ticks,h=d[g],t;if("treegrid"===this.options.type&&this.treeGrid.mapOfPosToGridNode){var f=this.treeGrid.mapOfPosToGridNode[g];(c=c[f.depth])&&(t={labels:c});h?(h.parameters.category=f.name,h.options=t,h.addLabel()):d[g]=new n(this,g,void 0,void 0,
{category:f.name,tickmarkOffset:f.tickmarkOffset,options:t})}else a.apply(this,Array.prototype.slice.call(arguments,1))}function A(a){var g=this.options;g=(g=g&&g.labels)&&m(g.indentation)?g.indentation:0;var c=a.apply(this,Array.prototype.slice.call(arguments,1));if("treegrid"===this.options.type&&this.treeGrid.mapOfPosToGridNode){var d=this.treeGrid.mapOfPosToGridNode[-1].height||0;c.width+=g*(d-1)}return c}function t(a,g,c){var p=this,h="treegrid"===c.type;p.treeGrid||(p.treeGrid=new B(p));h&&
(u(g,"beforeRender",f),u(g,"beforeRedraw",f),u(g,"addSeries",function(a){a.options.data&&(a=d(a.options.data,c.uniqueNames||!1,1),p.treeGrid.collapsedNodes=(p.treeGrid.collapsedNodes||[]).concat(a.collapsedNodes))}),u(p,"foundExtremes",function(){p.treeGrid.collapsedNodes&&p.treeGrid.collapsedNodes.forEach(function(a){var g=p.treeGrid.collapse(a);p.brokenAxis&&(p.brokenAxis.setBreaks(g,!1),p.treeGrid.collapsedNodes&&(p.treeGrid.collapsedNodes=p.treeGrid.collapsedNodes.filter(function(g){return a.collapseStart!==
g.collapseStart||a.collapseEnd!==g.collapseEnd})))})}),u(p,"afterBreaks",function(){var a;"yAxis"===p.coll&&!p.staticScale&&(null===(a=p.chart.options.chart)||void 0===a?0:a.height)&&(p.isDirty=!0)}),c=F({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-5,height:10,width:10,padding:5}},uniqueNames:!1},c,{reversed:!0,grid:{columns:void 0}}));a.apply(p,[g,c]);h&&(p.hasNames=!0,p.options.showLastLabel=!0)}function I(a){var g=
this.options;"treegrid"===g.type?(this.min=G(this.userMin,g.min,this.dataMin),this.max=G(this.userMax,g.max,this.dataMax),b(this,"foundExtremes"),this.setAxisTranslation(!0),this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=this.treeGrid.mapOfPosToGridNode?this.treeGrid.getTickPositions():[]):a.apply(this,Array.prototype.slice.call(arguments,1))}var D=!1;a.compose=function(a){D||(k(a.prototype,"generateTick",c),k(a.prototype,"getMaxLabelDimensions",A),k(a.prototype,"init",t),k(a.prototype,
"setTickInterval",I),x.compose(n),D=!0)};var B=function(){function a(a){this.axis=a}a.prototype.collapse=function(a){var g=this.axis,c=g.options.breaks||[];a=h(a,g.max);c.push(a);return c};a.prototype.expand=function(a){var g=this.axis,c=g.options.breaks||[],d=h(a,g.max);return c.reduce(function(a,g){g.to===d.to&&g.from===d.from||a.push(g);return a},[])};a.prototype.getTickPositions=function(){var a=this.axis;return Object.keys(a.treeGrid.mapOfPosToGridNode||{}).reduce(function(g,c){c=+c;!(a.min<=
c&&a.max>=c)||a.brokenAxis&&a.brokenAxis.isInAnyBreak(c)||g.push(c);return g},[])};a.prototype.isCollapsed=function(a){var g=this.axis,c=g.options.breaks||[],d=h(a,g.max);return c.some(function(a){return a.from===d.from&&a.to===d.to})};a.prototype.toggleCollapse=function(a){return this.isCollapsed(a)?this.expand(a):this.collapse(a)};return a}();a.Additions=B})(f||(f={}));e.prototype.utils={getNode:v.getNode};f.compose(e);return f});J(e,"Extensions/CurrentDateIndication.js",[e["Core/Globals.js"],e["Core/Options.js"],
e["Core/Utilities.js"],e["Core/Axis/PlotLineOrBand.js"]],function(e,n,v,x){var w=n.dateFormat;n=v.addEvent;var y=v.merge;v=v.wrap;var C={currentDateIndicator:!0,color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:function(e,l){return w(l,e)},rotation:0,style:{fontSize:"10px"}}};n(e.Axis,"afterSetOptions",function(){var e=this.options,l=e.currentDateIndicator;l&&(l="object"===typeof l?y(C,l):y(C),l.value=new Date,e.plotLines||(e.plotLines=[]),e.plotLines.push(l))});n(x,"render",function(){this.label&&
this.label.attr({text:this.getLabelText(this.options.label)})});v(x.prototype,"getLabelText",function(e,l){var b=this.options;return b.currentDateIndicator&&b.label&&"function"===typeof b.label.formatter?(b.value=new Date,b.label.formatter.call(this,b.value,b.label.format)):e.call(this,l)})});J(e,"Extensions/StaticScale.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,n){var v=n.addEvent,x=n.defined,w=n.isNumber,y=n.pick;n=e.Chart;v(e.Axis,"afterSetOptions",function(){var e=this.chart.options&&
this.chart.options.chart;!this.horiz&&w(this.options.staticScale)&&(!e.height||e.scrollablePlotArea&&e.scrollablePlotArea.minHeight)&&(this.staticScale=this.options.staticScale)});n.prototype.adjustHeight=function(){"adjustHeight"!==this.redrawTrigger&&((this.axes||[]).forEach(function(e){var n=e.chart,l=!!n.initiatedScale&&n.options.animation,b=e.options.staticScale;if(e.staticScale&&x(e.min)){var m=y(e.brokenAxis&&e.brokenAxis.unitLength,e.max+e.tickInterval-e.min)*b;m=Math.max(m,b);b=m-n.plotHeight;
1<=Math.abs(b)&&(n.plotHeight=m,n.redrawTrigger="adjustHeight",n.setSize(void 0,n.chartHeight+b,l));e.series.forEach(function(b){(b=b.sharedClipKey&&n[b.sharedClipKey])&&b.attr({height:n.plotHeight})})}}),this.initiatedScale=!0);this.redrawTrigger=null};v(n,"render",n.prototype.adjustHeight)});J(e,"Extensions/ArrowSymbols.js",[e["Core/Renderer/SVG/SVGRenderer.js"]],function(e){e.prototype.symbols.arrow=function(e,v,x,w){return[["M",e,v+w/2],["L",e+x,v],["L",e,v+w/2],["L",e+x,v+w]]};e.prototype.symbols["arrow-half"]=
function(n,v,x,w){return e.prototype.symbols.arrow(n,v,x/2,w)};e.prototype.symbols["triangle-left"]=function(e,v,x,w){return[["M",e+x,v],["L",e,v+w/2],["L",e+x,v+w],["Z"]]};e.prototype.symbols["arrow-filled"]=e.prototype.symbols["triangle-left"];e.prototype.symbols["triangle-left-half"]=function(n,v,x,w){return e.prototype.symbols["triangle-left"](n,v,x/2,w)};e.prototype.symbols["arrow-filled-half"]=e.prototype.symbols["triangle-left-half"]});J(e,"Gantt/Connection.js",[e["Core/Globals.js"],e["Core/Options.js"],
e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(e,n,v,x){function w(b){var m=b.shapeArgs;return m?{xMin:m.x,xMax:m.x+m.width,yMin:m.y,yMax:m.y+m.height}:(m=b.graphic&&b.graphic.getBBox())?{xMin:b.plotX-m.width/2,xMax:b.plotX+m.width/2,yMin:b.plotY-m.height/2,yMax:b.plotY+m.height/2}:null}"";var y=x.defined,C=x.error,u=x.extend,l=x.merge,b=x.objectEach,m=e.deg2rad,q=Math.max,z=Math.min;u(n.defaultOptions,{connectors:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",
inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});n=function(){function e(b,k,f){this.toPoint=this.pathfinder=this.graphics=this.fromPoint=this.chart=void 0;this.init(b,k,f)}e.prototype.init=function(b,k,f){this.fromPoint=b;this.toPoint=k;this.options=f;this.chart=b.series.chart;this.pathfinder=this.chart.pathfinder};e.prototype.renderPath=function(b,k,f){var a=this.chart,h=a.styledMode,d=a.pathfinder,r=!a.options.chart.forExport&&!1!==f,c=this.graphics&&this.graphics.path;
d.group||(d.group=a.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(a.seriesGroup));d.group.translate(a.plotLeft,a.plotTop);c&&c.renderer||(c=a.renderer.path().add(d.group),h||c.attr({opacity:0}));c.attr(k);b={d:b};h||(b.opacity=1);c[r?"animate":"attr"](b,f);this.graphics=this.graphics||{};this.graphics.path=c};e.prototype.addMarker=function(b,k,f){var a=this.fromPoint.series.chart,h=a.pathfinder;a=a.renderer;var d="start"===b?this.fromPoint:this.toPoint,r=d.getPathfinderAnchorPoint(k);
if(k.enabled&&((f="start"===b?f[1]:f[f.length-2])&&"M"===f[0]||"L"===f[0])){f={x:f[1],y:f[2]};f=d.getRadiansToVector(f,r);r=d.getMarkerVector(f,k.radius,r);f=-f/m;if(k.width&&k.height){var c=k.width;var A=k.height}else c=A=2*k.radius;this.graphics=this.graphics||{};r={x:r.x-c/2,y:r.y-A/2,width:c,height:A,rotation:f,rotationOriginX:r.x,rotationOriginY:r.y};this.graphics[b]?this.graphics[b].animate(r):(this.graphics[b]=a.symbol(k.symbol).addClass("highcharts-point-connecting-path-"+b+"-marker").attr(r).add(h.group),
a.styledMode||this.graphics[b].attr({fill:k.color||this.fromPoint.color,stroke:k.lineColor,"stroke-width":k.lineWidth,opacity:0}).animate({opacity:1},d.series.options.animation))}};e.prototype.getPath=function(b){var k=this.pathfinder,f=this.chart,a=k.algorithms[b.type],h=k.chartObstacles;if("function"!==typeof a)return C('"'+b.type+'" is not a Pathfinder algorithm.'),{path:[],obstacles:[]};a.requiresObstacles&&!h&&(h=k.chartObstacles=k.getChartObstacles(b),f.options.connectors.algorithmMargin=b.algorithmMargin,
k.chartObstacleMetrics=k.getObstacleMetrics(h));return a(this.fromPoint.getPathfinderAnchorPoint(b.startMarker),this.toPoint.getPathfinderAnchorPoint(b.endMarker),l({chartObstacles:h,lineObstacles:k.lineObstacles||[],obstacleMetrics:k.chartObstacleMetrics,hardBounds:{xMin:0,xMax:f.plotWidth,yMin:0,yMax:f.plotHeight},obstacleOptions:{margin:b.algorithmMargin},startDirectionX:k.getAlgorithmStartDirection(b.startMarker)},b))};e.prototype.render=function(){var b=this.fromPoint,k=b.series,f=k.chart,a=
f.pathfinder,h=l(f.options.connectors,k.options.connectors,b.options.connectors,this.options),d={};f.styledMode||(d.stroke=h.lineColor||b.color,d["stroke-width"]=h.lineWidth,h.dashStyle&&(d.dashstyle=h.dashStyle));d["class"]="highcharts-point-connecting-path highcharts-color-"+b.colorIndex;h=l(d,h);y(h.marker.radius)||(h.marker.radius=z(q(Math.ceil((h.algorithmMargin||8)/2)-1,1),5));b=this.getPath(h);f=b.path;b.obstacles&&(a.lineObstacles=a.lineObstacles||[],a.lineObstacles=a.lineObstacles.concat(b.obstacles));
this.renderPath(f,d,k.options.animation);this.addMarker("start",l(h.marker,h.startMarker),f);this.addMarker("end",l(h.marker,h.endMarker),f)};e.prototype.destroy=function(){this.graphics&&(b(this.graphics,function(b){b.destroy()}),delete this.graphics)};return e}();e.Connection=n;u(v.prototype,{getPathfinderAnchorPoint:function(b){var m=w(this);switch(b.align){case "right":var k="xMax";break;case "left":k="xMin"}switch(b.verticalAlign){case "top":var f="yMin";break;case "bottom":f="yMax"}return{x:k?
m[k]:(m.xMin+m.xMax)/2,y:f?m[f]:(m.yMin+m.yMax)/2}},getRadiansToVector:function(b,m){var k;y(m)||(k=w(this))&&(m={x:(k.xMin+k.xMax)/2,y:(k.yMin+k.yMax)/2});return Math.atan2(m.y-b.y,b.x-m.x)},getMarkerVector:function(b,m,k){var f=2*Math.PI,a=w(this),h=a.xMax-a.xMin,d=a.yMax-a.yMin,r=Math.atan2(d,h),c=!1;h/=2;var A=d/2,t=a.xMin+h;a=a.yMin+A;for(var e=t,D=a,B={},E=1,g=1;b<-Math.PI;)b+=f;for(;b>Math.PI;)b-=f;f=Math.tan(b);b>-r&&b<=r?(g=-1,c=!0):b>r&&b<=Math.PI-r?g=-1:b>Math.PI-r||b<=-(Math.PI-r)?(E=
-1,c=!0):E=-1;c?(e+=E*h,D+=g*h*f):(e+=d/(2*f)*E,D+=g*A);k.x!==t&&(e=k.x);k.y!==a&&(D=k.y);B.x=e+m*Math.cos(b);B.y=D-m*Math.sin(b);return B}});return n});J(e,"Gantt/PathfinderAlgorithms.js",[e["Core/Utilities.js"]],function(e){function n(b,e,l){l=l||0;var m=b.length-1;e-=1e-7;for(var q,k;l<=m;)if(q=m+l>>1,k=e-b[q].xMin,0<k)l=q+1;else if(0>k)m=q-1;else return q;return 0<l?l-1:0}function v(b,e){for(var m=n(b,e.x+1)+1;m--;){var q;if(q=b[m].xMax>=e.x)q=b[m],q=e.x<=q.xMax&&e.x>=q.xMin&&e.y<=q.yMax&&e.y>=
q.yMin;if(q)return m}return-1}function x(b){var e=[];if(b.length){e.push(["M",b[0].start.x,b[0].start.y]);for(var m=0;m<b.length;++m)e.push(["L",b[m].end.x,b[m].end.y])}return e}function w(b,e){b.yMin=l(b.yMin,e.yMin);b.yMax=u(b.yMax,e.yMax);b.xMin=l(b.xMin,e.xMin);b.xMax=u(b.xMax,e.xMax)}var y=e.extend,C=e.pick,u=Math.min,l=Math.max,b=Math.abs;e=y(function(e,q,l){function m(a,d,b,h,f){a={x:a.x,y:a.y};a[d]=b[h||d]+(f||0);return a}function n(a,d,h){var c=b(d[h]-a[h+"Min"])>b(d[h]-a[h+"Max"]);return m(d,
h,a,h+(c?"Max":"Min"),c?1:-1)}var k=[],f=C(l.startDirectionX,b(q.x-e.x)>b(q.y-e.y))?"x":"y",a=l.chartObstacles,h=v(a,e);l=v(a,q);if(-1<l){var d=a[l];l=n(d,q,f);d={start:l,end:q};var r=l}else r=q;-1<h&&(a=a[h],l=n(a,e,f),k.push({start:e,end:l}),l[f]>=e[f]===l[f]>=r[f]&&(f="y"===f?"x":"y",q=e[f]<q[f],k.push({start:l,end:m(l,f,a,f+(q?"Max":"Min"),q?1:-1)}),f="y"===f?"x":"y"));e=k.length?k[k.length-1].end:e;l=m(e,f,r);k.push({start:e,end:l});f=m(l,"y"===f?"x":"y",r);k.push({start:l,end:f});k.push(d);
return{path:x(k),obstacles:k}},{requiresObstacles:!0});return{fastAvoid:y(function(e,q,z){function m(a,g,c){var p,d=a.x<g.x?1:-1;if(a.x<g.x){var b=a;var h=g}else b=g,h=a;if(a.y<g.y){var f=a;var t=g}else f=g,t=a;for(p=0>d?u(n(B,h.x),B.length-1):0;B[p]&&(0<d&&B[p].xMin<=h.x||0>d&&B[p].xMax>=b.x);){if(B[p].xMin<=h.x&&B[p].xMax>=b.x&&B[p].yMin<=t.y&&B[p].yMax>=f.y)return c?{y:a.y,x:a.x<g.x?B[p].xMin-1:B[p].xMax+1,obstacle:B[p]}:{x:a.x,y:a.y<g.y?B[p].yMin-1:B[p].yMax+1,obstacle:B[p]};p+=d}return g}function y(a,
g,c,d,h){var p=h.soft,f=h.hard,t=d?"x":"y",r={x:g.x,y:g.y},e={x:g.x,y:g.y};h=a[t+"Max"]>=p[t+"Max"];p=a[t+"Min"]<=p[t+"Min"];var k=a[t+"Max"]>=f[t+"Max"];f=a[t+"Min"]<=f[t+"Min"];var A=b(a[t+"Min"]-g[t]),H=b(a[t+"Max"]-g[t]);c=10>b(A-H)?g[t]<c[t]:H<A;e[t]=a[t+"Min"];r[t]=a[t+"Max"];a=m(g,e,d)[t]!==e[t];g=m(g,r,d)[t]!==r[t];c=a?g?c:!0:g?!1:c;c=p?h?c:!0:h?!1:c;return f?k?c:!0:k?!1:c}function k(a,g,c){if(a.x===g.x&&a.y===g.y)return[];var d=c?"x":"y",b=z.obstacleOptions.margin;var p={soft:{xMin:A,xMax:t,
yMin:I,yMax:D},hard:z.hardBounds};var h=v(B,a);if(-1<h){h=B[h];p=y(h,a,g,c,p);w(h,z.hardBounds);var f=c?{y:a.y,x:h[p?"xMax":"xMin"]+(p?1:-1)}:{x:a.x,y:h[p?"yMax":"yMin"]+(p?1:-1)};var e=v(B,f);-1<e&&(e=B[e],w(e,z.hardBounds),f[d]=p?l(h[d+"Max"]-b+1,(e[d+"Min"]+h[d+"Max"])/2):u(h[d+"Min"]+b-1,(e[d+"Max"]+h[d+"Min"])/2),a.x===f.x&&a.y===f.y?(r&&(f[d]=p?l(h[d+"Max"],e[d+"Max"])+1:u(h[d+"Min"],e[d+"Min"])-1),r=!r):r=!1);a=[{start:a,end:f}]}else d=m(a,{x:c?g.x:a.x,y:c?a.y:g.y},c),a=[{start:a,end:{x:d.x,
y:d.y}}],d[c?"x":"y"]!==g[c?"x":"y"]&&(p=y(d.obstacle,d,g,!c,p),w(d.obstacle,z.hardBounds),p={x:c?d.x:d.obstacle[p?"xMax":"xMin"]+(p?1:-1),y:c?d.obstacle[p?"yMax":"yMin"]+(p?1:-1):d.y},c=!c,a=a.concat(k({x:d.x,y:d.y},p,c)));return a=a.concat(k(a[a.length-1].end,g,!c))}function f(a,g,c){var d=u(a.xMax-g.x,g.x-a.xMin)<u(a.yMax-g.y,g.y-a.yMin);c=y(a,g,c,d,{soft:z.hardBounds,hard:z.hardBounds});return d?{y:g.y,x:a[c?"xMax":"xMin"]+(c?1:-1)}:{x:g.x,y:a[c?"yMax":"yMin"]+(c?1:-1)}}var a=C(z.startDirectionX,
b(q.x-e.x)>b(q.y-e.y)),h=a?"x":"y",d=[],r=!1,c=z.obstacleMetrics,A=u(e.x,q.x)-c.maxWidth-10,t=l(e.x,q.x)+c.maxWidth+10,I=u(e.y,q.y)-c.maxHeight-10,D=l(e.y,q.y)+c.maxHeight+10,B=z.chartObstacles;var E=n(B,A);c=n(B,t);B=B.slice(E,c+1);if(-1<(c=v(B,q))){var g=f(B[c],q,e);d.push({end:q,start:g});q=g}for(;-1<(c=v(B,q));)E=0>q[h]-e[h],g={x:q.x,y:q.y},g[h]=B[c][E?h+"Max":h+"Min"]+(E?1:-1),d.push({end:q,start:g}),q=g;e=k(e,q,a);e=e.concat(d.reverse());return{path:x(e),obstacles:e}},{requiresObstacles:!0}),
straight:function(b,e){return{path:[["M",b.x,b.y],["L",e.x,e.y]],obstacles:[{start:b,end:e}]}},simpleConnect:e}});J(e,"Gantt/Pathfinder.js",[e["Gantt/Connection.js"],e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Options.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"],e["Gantt/PathfinderAlgorithms.js"]],function(e,n,v,x,w,y,C){function u(a){var c=a.shapeArgs;return c?{xMin:c.x,xMax:c.x+c.width,yMin:c.y,yMax:c.y+c.height}:(c=a.graphic&&a.graphic.getBBox())?{xMin:a.plotX-c.width/2,xMax:a.plotX+
c.width/2,yMin:a.plotY-c.height/2,yMax:a.plotY+c.height/2}:null}function l(d){for(var c=d.length,b=0,t,f,e=[],r=function(a,g,c){c=k(c,10);var d=a.yMax+c>g.yMin-c&&a.yMin-c<g.yMax+c,b=a.xMax+c>g.xMin-c&&a.xMin-c<g.xMax+c,p=d?a.xMin>g.xMax?a.xMin-g.xMax:g.xMin-a.xMax:Infinity,t=b?a.yMin>g.yMax?a.yMin-g.yMax:g.yMin-a.yMax:Infinity;return b&&d?c?r(a,g,Math.floor(c/2)):Infinity:h(p,t)};b<c;++b)for(t=b+1;t<c;++t)f=r(d[b],d[t]),80>f&&e.push(f);e.push(80);return a(Math.floor(e.sort(function(a,g){return a-
g})[Math.floor(e.length/10)]/2-1),1)}function b(a){if(a.options.pathfinder||a.series.reduce(function(a,d){d.options&&G(!0,d.options.connectors=d.options.connectors||{},d.options.pathfinder);return a||d.options&&d.options.pathfinder},!1))G(!0,a.options.connectors=a.options.connectors||{},a.options.pathfinder),z('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')}"";var m=y.addEvent,q=y.defined,z=y.error,F=y.extend,G=y.merge,k=y.pick,f=y.splat,a=
Math.max,h=Math.min;F(x.defaultOptions,{connectors:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});var d=function(){function a(a){this.lineObstacles=this.group=this.connections=this.chartObstacleMetrics=this.chartObstacles=this.chart=void 0;this.init(a)}a.prototype.init=function(a){this.chart=a;this.connections=[];m(a,"redraw",function(){this.pathfinder.update()})};a.prototype.update=
function(a){var c=this.chart,d=this,b=d.connections;d.connections=[];c.series.forEach(function(a){a.visible&&!a.options.isInternal&&a.points.forEach(function(a){var g,b=a.options&&a.options.connect&&f(a.options.connect);a.visible&&!1!==a.isInside&&b&&b.forEach(function(b){g=c.get("string"===typeof b?b:b.to);g instanceof w&&g.series.visible&&g.visible&&!1!==g.isInside&&d.connections.push(new e(a,g,"string"===typeof b?{}:b))})})});for(var h=0,r,k,g=b.length,p=d.connections.length;h<g;++h){k=!1;for(r=
0;r<p;++r)if(b[h].fromPoint===d.connections[r].fromPoint&&b[h].toPoint===d.connections[r].toPoint){d.connections[r].graphics=b[h].graphics;k=!0;break}k||b[h].destroy()}delete this.chartObstacles;delete this.lineObstacles;d.renderConnections(a)};a.prototype.renderConnections=function(a){a?this.chart.series.forEach(function(a){var c=function(){var c=a.chart.pathfinder;(c&&c.connections||[]).forEach(function(c){c.fromPoint&&c.fromPoint.series===a&&c.render()});a.pathfinderRemoveRenderEvent&&(a.pathfinderRemoveRenderEvent(),
delete a.pathfinderRemoveRenderEvent)};!1===a.options.animation?c():a.pathfinderRemoveRenderEvent=m(a,"afterAnimate",c)}):this.connections.forEach(function(a){a.render()})};a.prototype.getChartObstacles=function(a){for(var c=[],d=this.chart.series,b=k(a.algorithmMargin,0),h,f=0,e=d.length;f<e;++f)if(d[f].visible&&!d[f].options.isInternal)for(var g=0,p=d[f].points.length,r;g<p;++g)r=d[f].points[g],r.visible&&(r=u(r))&&c.push({xMin:r.xMin-b,xMax:r.xMax+b,yMin:r.yMin-b,yMax:r.yMax+b});c=c.sort(function(a,
g){return a.xMin-g.xMin});q(a.algorithmMargin)||(h=a.algorithmMargin=l(c),c.forEach(function(a){a.xMin-=h;a.xMax+=h;a.yMin-=h;a.yMax+=h}));return c};a.prototype.getObstacleMetrics=function(a){for(var c=0,d=0,b,h,f=a.length;f--;)b=a[f].xMax-a[f].xMin,h=a[f].yMax-a[f].yMin,c<b&&(c=b),d<h&&(d=h);return{maxHeight:d,maxWidth:c}};a.prototype.getAlgorithmStartDirection=function(a){var c="top"!==a.verticalAlign&&"bottom"!==a.verticalAlign;return"left"!==a.align&&"right"!==a.align?c?void 0:!1:c?!0:void 0};
return a}();d.prototype.algorithms=C;v.Pathfinder=d;F(w.prototype,{getPathfinderAnchorPoint:function(a){var c=u(this);switch(a.align){case "right":var d="xMax";break;case "left":d="xMin"}switch(a.verticalAlign){case "top":var b="yMin";break;case "bottom":b="yMax"}return{x:d?c[d]:(c.xMin+c.xMax)/2,y:b?c[b]:(c.yMin+c.yMax)/2}},getRadiansToVector:function(a,c){var d;q(c)||(d=u(this))&&(c={x:(d.xMin+d.xMax)/2,y:(d.yMin+d.yMax)/2});return Math.atan2(c.y-a.y,a.x-c.x)},getMarkerVector:function(a,c,d){var b=
2*Math.PI,h=u(this),f=h.xMax-h.xMin,e=h.yMax-h.yMin,r=Math.atan2(e,f),g=!1;f/=2;var p=e/2,k=h.xMin+f;h=h.yMin+p;for(var m=k,l=h,q={},A=1,n=1;a<-Math.PI;)a+=b;for(;a>Math.PI;)a-=b;b=Math.tan(a);a>-r&&a<=r?(n=-1,g=!0):a>r&&a<=Math.PI-r?n=-1:a>Math.PI-r||a<=-(Math.PI-r)?(A=-1,g=!0):A=-1;g?(m+=A*f,l+=n*f*b):(m+=e/(2*b)*A,l+=n*p);d.x!==k&&(m=d.x);d.y!==h&&(l=d.y);q.x=m+c*Math.cos(a);q.y=l-c*Math.sin(a);return q}});n.prototype.callbacks.push(function(a){!1!==a.options.connectors.enabled&&(b(a),this.pathfinder=
new d(this),this.pathfinder.update(!0))});return d});J(e,"Series/XRangeSeries.js",[e["Core/Axis/Axis.js"],e["Core/Globals.js"],e["Core/Color.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(e,n,v,x,w){var y=v.parse;v=w.addEvent;var C=w.clamp,u=w.correctFloat,l=w.defined,b=w.find,m=w.isNumber,q=w.isObject,z=w.merge,F=w.pick;w=w.seriesType;var G=n.seriesTypes.column,k=n.seriesTypes,f=n.Series;w("xrange","column",{colorByPoint:!0,dataLabels:{formatter:function(){var a=this.point.partialFill;
q(a)&&(a=a.amount);if(m(a)&&0<a)return u(100*a)+"%"},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:'<span style="font-size: 10px">{point.x} - {point.x2}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.yCategory}</b><br/>'},borderRadius:3,pointRange:0},{type:"xrange",parallelArrays:["x","x2","y"],requireSorting:!1,animate:k.line.prototype.animate,cropShoulder:1,getExtremesFromAll:!0,autoIncrement:n.noop,buildKDTree:n.noop,init:function(){k.column.prototype.init.apply(this,
arguments);this.options.stacking=void 0},getColumnMetrics:function(){function a(){b.series.forEach(function(a){var c=a.xAxis;a.xAxis=a.yAxis;a.yAxis=c})}var b=this.chart;a();var d=G.prototype.getColumnMetrics.call(this);a();return d},cropData:function(a,b,d,e){b=f.prototype.cropData.call(this,this.x2Data,b,d,e);b.xData=a.slice(b.start,b.end);return b},findPointIndex:function(a){var h=this.cropped,d=this.cropStart,f=this.points,c=a.id;if(c)var e=(e=b(f,function(a){return a.id===c}))?e.index:void 0;
"undefined"===typeof e&&(e=(e=b(f,function(c){return c.x===a.x&&c.x2===a.x2&&!c.touched}))?e.index:void 0);h&&m(e)&&m(d)&&e>=d&&(e-=d);return e},translatePoint:function(a){var b=this.xAxis,d=this.yAxis,f=this.columnMetrics,c=this.options,e=c.minPointLength||0,t=a.plotX,k=F(a.x2,a.x+(a.len||0)),D=b.translate(k,0,0,0,1);k=Math.abs(D-t);var B=this.chart.inverted,E=F(c.borderWidth,1)%2/2,g=f.offset,p=Math.round(f.width);e&&(e-=k,0>e&&(e=0),t-=e/2,D+=e/2);t=Math.max(t,-10);D=C(D,-10,b.len+10);l(a.options.pointWidth)&&
(g-=(Math.ceil(a.options.pointWidth)-p)/2,p=Math.ceil(a.options.pointWidth));c.pointPlacement&&m(a.plotY)&&d.categories&&(a.plotY=d.translate(a.y,0,1,0,1,c.pointPlacement));a.shapeArgs={x:Math.floor(Math.min(t,D))+E,y:Math.floor(a.plotY+g)+E,width:Math.round(Math.abs(D-t)),height:p,r:this.options.borderRadius};c=a.shapeArgs.x;e=c+a.shapeArgs.width;0>c||e>b.len?(c=C(c,0,b.len),e=C(e,0,b.len),D=e-c,a.dlBox=z(a.shapeArgs,{x:c,width:e-c,centerX:D?D/2:null})):a.dlBox=null;c=a.tooltipPos;e=B?1:0;D=B?0:
1;f=this.columnMetrics?this.columnMetrics.offset:-f.width/2;c[e]=C(c[e]+k/2*(b.reversed?-1:1)*(B?-1:1),0,b.len-1);c[D]=C(c[D]+(B?-1:1)*f,0,d.len-1);if(f=a.partialFill)q(f)&&(f=f.amount),m(f)||(f=0),d=a.shapeArgs,a.partShapeArgs={x:d.x,y:d.y,width:d.width,height:d.height,r:this.options.borderRadius},t=Math.max(Math.round(k*f+a.plotX-t),0),a.clipRectArgs={x:b.reversed?d.x+k-t:d.x,y:d.y,width:t,height:d.height}},translate:function(){G.prototype.translate.apply(this,arguments);this.points.forEach(function(a){this.translatePoint(a)},
this)},drawPoint:function(a,b){var d=this.options,f=this.chart.renderer,c=a.graphic,h=a.shapeType,e=a.shapeArgs,k=a.partShapeArgs,m=a.clipRectArgs,l=a.partialFill,E=d.stacking&&!d.borderRadius,g=a.state,p=d.states[g||"normal"]||{},H="undefined"===typeof g?"attr":b;g=this.pointAttribs(a,g);p=F(this.chart.options.chart.animation,p.animation);if(a.isNull||!1===a.visible)c&&(a.graphic=c.destroy());else{if(c)c.rect[b](e);else a.graphic=c=f.g("point").addClass(a.getClassName()).add(a.group||this.group),
c.rect=f[h](z(e)).addClass(a.getClassName()).addClass("highcharts-partfill-original").add(c);k&&(c.partRect?(c.partRect[b](z(k)),c.partialClipRect[b](z(m))):(c.partialClipRect=f.clipRect(m.x,m.y,m.width,m.height),c.partRect=f[h](k).addClass("highcharts-partfill-overlay").add(c).clip(c.partialClipRect)));this.chart.styledMode||(c.rect[b](g,p).shadow(d.shadow,null,E),k&&(q(l)||(l={}),q(d.partialFill)&&(l=z(l,d.partialFill)),a=l.fill||y(g.fill).brighten(-.3).get()||y(a.color||this.color).brighten(-.3).get(),
g.fill=a,c.partRect[H](g,p).shadow(d.shadow,null,E)))}},drawPoints:function(){var a=this,b=a.getAnimationVerb();a.points.forEach(function(d){a.drawPoint(d,b)})},getAnimationVerb:function(){return this.chart.pointCount<(this.options.animationLimit||250)?"animate":"attr"}},{resolveColor:function(){var a=this.series;if(a.options.colorByPoint&&!this.options.color){var b=a.options.colors||a.chart.options.colors;var d=this.y%(b?b.length:a.chart.options.chart.colorCount);b=b&&b[d];a.chart.styledMode||(this.color=
b);this.options.colorIndex||(this.colorIndex=d)}else this.color||(this.color=a.color)},init:function(){x.prototype.init.apply(this,arguments);this.y||(this.y=0);return this},setState:function(){x.prototype.setState.apply(this,arguments);this.series.drawPoint(this,this.series.getAnimationVerb())},getLabelConfig:function(){var a=x.prototype.getLabelConfig.call(this),b=this.series.yAxis.categories;a.x2=this.x2;a.yCategory=this.yCategory=b&&b[this.y];return a},tooltipDateKeys:["x","x2"],isValid:function(){return"number"===
typeof this.x&&"number"===typeof this.x2}});v(e,"afterGetSeriesExtremes",function(){var a=this.series,b;if(this.isXAxis){var d=F(this.dataMax,-Number.MAX_VALUE);a.forEach(function(a){a.x2Data&&a.x2Data.forEach(function(a){a>d&&(d=a,b=!0)})});b&&(this.dataMax=d)}});""});J(e,"Series/GanttSeries.js",[e["Core/Globals.js"],e["Core/Options.js"],e["Core/Utilities.js"]],function(e,n,v){var x=n.dateFormat,w=v.isNumber,y=v.merge,C=v.pick;n=v.seriesType;var u=v.splat,l=e.seriesTypes.xrange;n("gantt","xrange",
{grouping:!1,dataLabels:{enabled:!0},tooltip:{headerFormat:'<span style="font-size: 10px">{series.name}</span><br/>',pointFormat:null,pointFormatter:function(){var b=this.series,e=b.chart.tooltip,l=b.xAxis,n=b.tooltipOptions.dateTimeLabelFormats,w=l.options.startOfWeek,v=b.tooltipOptions,k=v.xDateFormat;b=this.options.milestone;var f="<b>"+(this.name||this.yCategory)+"</b>";if(v.pointFormat)return this.tooltipFormatter(v.pointFormat);k||(k=u(e.getDateFormat(l.closestPointRange,this.start,w,n))[0]);
e=x(k,this.start);l=x(k,this.end);f+="<br/>";return b?f+(e+"<br/>"):f+("Start: "+e+"<br/>End: ")+(l+"<br/>")}},connectors:{type:"simpleConnect",animation:{reversed:!0},startMarker:{enabled:!0,symbol:"arrow-filled",radius:4,fill:"#fa0",align:"left"},endMarker:{enabled:!1,align:"right"}}},{pointArrayMap:["start","end","y"],keyboardMoveVertical:!1,translatePoint:function(b){l.prototype.translatePoint.call(this,b);if(b.options.milestone){var e=b.shapeArgs;var q=e.height;b.shapeArgs={x:e.x-q/2,y:e.y,width:q,
height:q}}},drawPoint:function(b,e){var m=this.options,n=this.chart.renderer,u=b.shapeArgs,v=b.plotY,k=b.graphic,f=b.selected&&"select",a=m.stacking&&!m.borderRadius;if(b.options.milestone)if(w(v)&&null!==b.y&&!1!==b.visible){u=n.symbols.diamond(u.x,u.y,u.width,u.height);if(k)k[e]({d:u});else b.graphic=n.path(u).addClass(b.getClassName(),!0).add(b.group||this.group);this.chart.styledMode||b.graphic.attr(this.pointAttribs(b,f)).shadow(m.shadow,null,a)}else k&&(b.graphic=k.destroy());else l.prototype.drawPoint.call(this,
b,e)},setData:e.Series.prototype.setData,setGanttPointAliases:function(b){function e(e,l){"undefined"!==typeof l&&(b[e]=l)}e("x",C(b.start,b.x));e("x2",C(b.end,b.x2));e("partialFill",C(b.completed,b.partialFill));e("connect",C(b.dependency,b.connect))}},y(l.prototype.pointClass.prototype,{applyOptions:function(b,m){b=y(b);e.seriesTypes.gantt.prototype.setGanttPointAliases(b);return b=l.prototype.pointClass.prototype.applyOptions.call(this,b,m)},isValid:function(){return("number"===typeof this.start||
"number"===typeof this.x)&&("number"===typeof this.end||"number"===typeof this.x2||this.milestone)}}));""});J(e,"Core/Chart/GanttChart.js",[e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,n,v){var x=v.getOptions,w=v.isArray,y=v.merge,C=v.splat;n.ganttChart=function(u,l,b){var m="string"===typeof u||u.nodeName,q=l.series,z=x(),v,G=l;l=arguments[m?1:0];w(l.xAxis)||(l.xAxis=[l.xAxis||{},{}]);l.xAxis=l.xAxis.map(function(b,f){1===f&&(v=0);return y(z.xAxis,{grid:{enabled:!0},
opposite:!0,linkedTo:v},b,{type:"datetime"})});l.yAxis=C(l.yAxis||{}).map(function(b){return y(z.yAxis,{grid:{enabled:!0},staticScale:50,reversed:!0,type:b.categories?b.type:"treegrid"},b)});l.series=null;l=y(!0,{chart:{type:"gantt"},title:{text:null},legend:{enabled:!1},navigator:{series:{type:"gantt"}}},l,{isGantt:!0});l.series=G.series=q;(l.series||[]).forEach(function(b){b.data&&b.data.forEach(function(b){n.seriesTypes.gantt.prototype.setGanttPointAliases(b)})});return m?new e(u,l,b):new e(l,
l)}});J(e,"Core/Axis/ScrollbarAxis.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,n){var v=n.addEvent,x=n.defined,w=n.pick;return function(){function n(){}n.compose=function(n,u){v(n,"afterInit",function(){var l=this;l.options&&l.options.scrollbar&&l.options.scrollbar.enabled&&(l.options.scrollbar.vertical=!l.horiz,l.options.startOnTick=l.options.endOnTick=!1,l.scrollbar=new u(l.chart.renderer,l.options.scrollbar,l.chart),v(l.scrollbar,"changed",function(b){var m=w(l.options&&l.options.min,
l.min),q=w(l.options&&l.options.max,l.max),n=x(l.dataMin)?Math.min(m,l.min,l.dataMin):m,u=(x(l.dataMax)?Math.max(q,l.max,l.dataMax):q)-n;x(m)&&x(q)&&(l.horiz&&!l.reversed||!l.horiz&&l.reversed?(m=n+u*this.to,n+=u*this.from):(m=n+u*(1-this.from),n+=u*(1-this.to)),w(this.options.liveRedraw,e.svg&&!e.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===b.DOMType||!x(b.DOMType)?l.setExtremes(n,m,!0,"mousemove"!==b.DOMType,b):this.setRange(this.from,this.to))}))});v(n,"afterRender",function(){var e=Math.min(w(this.options.min,
this.min),this.min,w(this.dataMin,this.min)),b=Math.max(w(this.options.max,this.max),this.max,w(this.dataMax,this.max)),m=this.scrollbar,q=this.axisTitleMargin+(this.titleOffset||0),n=this.chart.scrollbarsOffsets,u=this.options.margin||0;m&&(this.horiz?(this.opposite||(n[1]+=q),m.position(this.left,this.top+this.height+2+n[1]-(this.opposite?u:0),this.width,this.height),this.opposite||(n[1]+=u),q=1):(this.opposite&&(n[0]+=q),m.position(this.left+this.width+2+n[0]-(this.opposite?0:u),this.top,this.width,
this.height),this.opposite&&(n[0]+=u),q=0),n[q]+=m.size+m.options.margin,isNaN(e)||isNaN(b)||!x(this.min)||!x(this.max)||this.min===this.max?m.setRange(0,1):(n=(this.min-e)/(b-e),e=(this.max-e)/(b-e),this.horiz&&!this.reversed||!this.horiz&&this.reversed?m.setRange(n,e):m.setRange(1-e,1-n)))});v(n,"afterGetOffset",function(){var e=this.horiz?2:1,b=this.scrollbar;b&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[e]+=b.size+b.options.margin)})};return n}()});J(e,"Core/Scrollbar.js",[e["Core/Axis/Axis.js"],
e["Core/Globals.js"],e["Core/Axis/ScrollbarAxis.js"],e["Core/Utilities.js"],e["Core/Options.js"]],function(e,n,v,x,w){var y=x.addEvent,C=x.correctFloat,u=x.defined,l=x.destroyObjectProperties,b=x.fireEvent,m=x.merge,q=x.pick,z=x.removeEvent;x=w.defaultOptions;var F=n.hasTouch,G=n.isTouchDevice,k=n.swapXY=function(b,a){a&&b.forEach(function(a){for(var b=a.length,e,c=0;c<b;c+=2)e=a[c+1],"number"===typeof e&&(a[c+1]=a[c+2],a[c+2]=e)});return b};w=function(){function e(a,b,d){this._events=[];this.from=
this.chartY=this.chartX=0;this.scrollbar=this.group=void 0;this.scrollbarButtons=[];this.scrollbarGroup=void 0;this.scrollbarLeft=0;this.scrollbarRifles=void 0;this.scrollbarStrokeWidth=1;this.to=this.size=this.scrollbarTop=0;this.track=void 0;this.trackBorderWidth=1;this.userOptions={};this.y=this.x=0;this.chart=d;this.options=b;this.renderer=d.renderer;this.init(a,b,d)}e.prototype.addEvents=function(){var a=this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,d=this.scrollbarGroup.element,
e=this.track.element,c=this.mouseDownHandler.bind(this),f=this.mouseMoveHandler.bind(this),t=this.mouseUpHandler.bind(this);a=[[b[a[0]].element,"click",this.buttonToMinClick.bind(this)],[b[a[1]].element,"click",this.buttonToMaxClick.bind(this)],[e,"click",this.trackClick.bind(this)],[d,"mousedown",c],[d.ownerDocument,"mousemove",f],[d.ownerDocument,"mouseup",t]];F&&a.push([d,"touchstart",c],[d.ownerDocument,"touchmove",f],[d.ownerDocument,"touchend",t]);a.forEach(function(a){y.apply(null,a)});this._events=
a};e.prototype.buttonToMaxClick=function(a){var e=(this.to-this.from)*q(this.options.step,.2);this.updatePosition(this.from+e,this.to+e);b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:a})};e.prototype.buttonToMinClick=function(a){var e=C(this.to-this.from)*q(this.options.step,.2);this.updatePosition(C(this.from-e),C(this.to-e));b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:a})};e.prototype.cursorToScrollbarPosition=function(a){var b=this.options;
b=b.minWidth>this.calculatedWidth?b.minWidth:0;return{chartX:(a.chartX-this.x-this.xOffset)/(this.barWidth-b),chartY:(a.chartY-this.y-this.yOffset)/(this.barWidth-b)}};e.prototype.destroy=function(){var a=this.chart.scroller;this.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,l(a.scrollbarButtons))};e.prototype.drawScrollbarButton=function(a){var b=
this.renderer,d=this.scrollbarButtons,e=this.options,c=this.size;var f=b.g().add(this.group);d.push(f);f=b.rect().addClass("highcharts-scrollbar-button").add(f);this.chart.styledMode||f.attr({stroke:e.buttonBorderColor,"stroke-width":e.buttonBorderWidth,fill:e.buttonBackgroundColor});f.attr(f.crisp({x:-.5,y:-.5,width:c+1,height:c+1,r:e.buttonBorderRadius},f.strokeWidth()));f=b.path(k([["M",c/2+(a?-1:1),c/2-3],["L",c/2+(a?-1:1),c/2+3],["L",c/2+(a?2:-2),c/2]],e.vertical)).addClass("highcharts-scrollbar-arrow").add(d[a]);
this.chart.styledMode||f.attr({fill:e.buttonArrowColor})};e.prototype.init=function(a,b,d){this.scrollbarButtons=[];this.renderer=a;this.userOptions=b;this.options=m(e.defaultOptions,b);this.chart=d;this.size=q(this.options.size,this.options.height);b.enabled&&(this.render(),this.addEvents())};e.prototype.mouseDownHandler=function(a){a=this.chart.pointer.normalize(a);a=this.cursorToScrollbarPosition(a);this.chartX=a.chartX;this.chartY=a.chartY;this.initPositions=[this.from,this.to];this.grabbedCenter=
!0};e.prototype.mouseMoveHandler=function(a){var e=this.chart.pointer.normalize(a),d=this.options.vertical?"chartY":"chartX",f=this.initPositions||[];!this.grabbedCenter||a.touches&&0===a.touches[0][d]||(e=this.cursorToScrollbarPosition(e)[d],d=this[d],d=e-d,this.hasDragged=!0,this.updatePosition(f[0]+d,f[1]+d),this.hasDragged&&b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:a.type,DOMEvent:a}))};e.prototype.mouseUpHandler=function(a){this.hasDragged&&b(this,"changed",{from:this.from,
to:this.to,trigger:"scrollbar",DOMType:a.type,DOMEvent:a});this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null};e.prototype.position=function(a,b,d,e){var c=this.options.vertical,f=0,h=this.rendered?"animate":"attr";this.x=a;this.y=b+this.trackBorderWidth;this.width=d;this.xOffset=this.height=e;this.yOffset=f;c?(this.width=this.yOffset=d=f=this.size,this.xOffset=b=0,this.barWidth=e-2*d,this.x=a+=this.options.margin):(this.height=this.xOffset=e=b=this.size,this.barWidth=d-2*e,this.y+=this.options.margin);
this.group[h]({translateX:a,translateY:this.y});this.track[h]({width:d,height:e});this.scrollbarButtons[1][h]({translateX:c?0:d-b,translateY:c?e-f:0})};e.prototype.removeEvents=function(){this._events.forEach(function(a){z.apply(null,a)});this._events.length=0};e.prototype.render=function(){var a=this.renderer,b=this.options,d=this.size,e=this.chart.styledMode,c;this.group=c=a.g("scrollbar").attr({zIndex:b.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,
r:b.trackBorderRadius||0,height:d,width:d}).add(c);e||this.track.attr({fill:b.trackBackgroundColor,stroke:b.trackBorderColor,"stroke-width":b.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(c);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:d,width:d,r:b.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(k([["M",-3,d/4],["L",-3,2*d/3],["M",0,d/4],["L",
0,2*d/3],["M",3,d/4],["L",3,2*d/3]],b.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);e||(this.scrollbar.attr({fill:b.barBackgroundColor,stroke:b.barBorderColor,"stroke-width":b.barBorderWidth}),this.scrollbarRifles.attr({stroke:b.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)};e.prototype.setRange=
function(a,b){var d=this.options,e=d.vertical,c=d.minWidth,f=this.barWidth,h,k=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(u(f)){a=Math.max(a,0);var m=Math.ceil(f*a);this.calculatedWidth=h=C(f*Math.min(b,1)-m);h<c&&(m=(f-c+h)*a,h=c);c=Math.floor(m+this.xOffset+this.yOffset);f=h/2-.5;this.from=a;this.to=b;e?(this.scrollbarGroup[k]({translateY:c}),this.scrollbar[k]({height:h}),this.scrollbarRifles[k]({translateY:f}),this.scrollbarTop=c,
this.scrollbarLeft=0):(this.scrollbarGroup[k]({translateX:c}),this.scrollbar[k]({width:h}),this.scrollbarRifles[k]({translateX:f}),this.scrollbarLeft=c,this.scrollbarTop=0);12>=h?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0);!1===d.showFull&&(0>=a&&1<=b?this.group.hide():this.group.show());this.rendered=!0}};e.prototype.trackClick=function(a){var e=this.chart.pointer.normalize(a),d=this.to-this.from,f=this.y+this.scrollbarTop,c=this.x+this.scrollbarLeft;this.options.vertical&&e.chartY>
f||!this.options.vertical&&e.chartX>c?this.updatePosition(this.from+d,this.to+d):this.updatePosition(this.from-d,this.to-d);b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:a})};e.prototype.update=function(a){this.destroy();this.init(this.chart.renderer,m(!0,this.options,a),this.chart)};e.prototype.updatePosition=function(a,b){1<b&&(a=C(1-C(b-a)),b=1);0>a&&(b=C(b-a),a=0);this.from=a;this.to=b};e.defaultOptions={height:G?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,
margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};return e}();n.Scrollbar||(x.scrollbar=m(!0,w.defaultOptions,x.scrollbar),n.Scrollbar=w,v.compose(e,w));return n.Scrollbar});J(e,"Extensions/RangeSelector.js",[e["Core/Axis/Axis.js"],e["Core/Chart/Chart.js"],
e["Core/Globals.js"],e["Core/Options.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],function(e,n,v,x,w,y){var C=x.defaultOptions,u=y.addEvent,l=y.createElement,b=y.css,m=y.defined,q=y.destroyObjectProperties,z=y.discardElement,F=y.extend,G=y.fireEvent,k=y.isNumber,f=y.merge,a=y.objectEach,h=y.pick,d=y.pInt,r=y.splat;F(C,{rangeSelector:{verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},
buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}});C.lang=f(C.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});var c=function(){function c(a){this.buttons=void 0;this.buttonOptions=c.prototype.defaultButtons;this.options=void 0;this.chart=a;this.init(a)}c.prototype.clickButton=function(a,b){var c=this.chart,d=this.buttonOptions[a],f=c.xAxis[0],g=c.scroller&&c.scroller.getUnionExtremes()||f||{},p=g.dataMin,t=g.dataMax,l=f&&Math.round(Math.min(f.max,
h(t,f.max))),q=d.type;g=d._range;var n,v=d.dataGrouping;if(null!==p&&null!==t){c.fixedRange=g;v&&(this.forcedDataGrouping=!0,e.prototype.setDataGrouping.call(f||{chart:this.chart},v,!1),this.frozenStates=d.preserveDataGrouping);if("month"===q||"year"===q)if(f){q={range:d,max:l,chart:c,dataMin:p,dataMax:t};var M=f.minFromRange.call(q);k(q.newMax)&&(l=q.newMax)}else g=d;else if(g)M=Math.max(l-g,p),l=Math.min(M+g,t);else if("ytd"===q)if(f)"undefined"===typeof t&&(p=Number.MAX_VALUE,t=Number.MIN_VALUE,
c.series.forEach(function(a){a=a.xData;p=Math.min(a[0],p);t=Math.max(a[a.length-1],t)}),b=!1),l=this.getYTDExtremes(t,p,c.time.useUTC),M=n=l.min,l=l.max;else{this.deferredYTDClick=a;return}else"all"===q&&f&&(M=p,l=t);m(M)&&(M+=d._offsetMin);m(l)&&(l+=d._offsetMax);this.setSelected(a);if(f)f.setExtremes(M,l,h(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:d});else{var I=r(c.options.xAxis)[0];var A=I.range;I.range=g;var w=I.min;I.min=n;u(c,"load",function(){I.range=A;I.min=w})}}};c.prototype.setSelected=
function(a){this.selected=this.options.selected=a};c.prototype.init=function(a){var b=this,c=a.options.rangeSelector,d=c.buttons||b.defaultButtons.slice(),e=c.selected,g=function(){var a=b.minInput,g=b.maxInput;a&&a.blur&&G(a,"blur");g&&g.blur&&G(g,"blur")};b.chart=a;b.options=c;b.buttons=[];b.buttonOptions=d;this.unMouseDown=u(a.container,"mousedown",g);this.unResize=u(a,"resize",g);d.forEach(b.computeButtonRange);"undefined"!==typeof e&&d[e]&&this.clickButton(e,!1);u(a,"load",function(){a.xAxis&&
a.xAxis[0]&&u(a.xAxis[0],"setExtremes",function(g){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==g.trigger&&"updatedData"!==g.trigger&&b.forcedDataGrouping&&!b.frozenStates&&this.setDataGrouping(!1,!1)})})};c.prototype.updateButtonStates=function(){var a=this,b=this.chart,c=b.xAxis[0],d=Math.round(c.max-c.min),e=!c.hasVisibleSeries,g=b.scroller&&b.scroller.getUnionExtremes()||c,f=g.dataMin,h=g.dataMax;b=a.getYTDExtremes(h,f,b.time.useUTC);var l=b.min,m=b.max,r=a.selected,q=k(r),n=a.options.allButtonsEnabled,
u=a.buttons;a.buttonOptions.forEach(function(b,g){var p=b._range,k=b.type,t=b.count||1,H=u[g],E=0,D=b._offsetMax-b._offsetMin;b=g===r;var B=p>h-f,L=p<c.minRange,K=!1,v=!1;p=p===d;("month"===k||"year"===k)&&d+36E5>=864E5*{month:28,year:365}[k]*t-D&&d-36E5<=864E5*{month:31,year:366}[k]*t+D?p=!0:"ytd"===k?(p=m-l+D===d,K=!b):"all"===k&&(p=c.max-c.min>=h-f,v=!b&&q&&p);k=!n&&(B||L||v||e);t=b&&p||p&&!q&&!K||b&&a.frozenStates;k?E=3:t&&(q=!0,E=2);H.state!==E&&(H.setState(E),0===E&&r===g&&a.setSelected(null))})};
c.prototype.computeButtonRange=function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c;a._offsetMin=h(a.offsetMin,0);a._offsetMax=h(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin};c.prototype.setInputValue=function(a,b){var c=this.chart.options.rangeSelector,d=this.chart.time,e=this[a+"Input"];m(b)&&(e.previousValue=e.HCTime,e.HCTime=b);e.value=
d.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",e.HCTime);this[a+"DateBox"].attr({text:d.dateFormat(c.inputDateFormat||"%b %e, %Y",e.HCTime)})};c.prototype.showInput=function(a){var c=this.inputGroup,d=this[a+"DateBox"];b(this[a+"Input"],{left:c.translateX+d.x+"px",top:c.translateY+"px",width:d.width-2+"px",height:d.height-2+"px",border:"2px solid silver"})};c.prototype.hideInput=function(a){b(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)};c.prototype.defaultInputDateParser=
function(a,b){var c=new Date;return v.isSafari?Date.parse(a.split(" ").join("T")):b?Date.parse(a+"Z"):Date.parse(a)-6E4*c.getTimezoneOffset()};c.prototype.drawInput=function(a){function c(){var a=q.value,b=h.xAxis[0];var g=h.scroller&&h.scroller.xAxis?h.scroller.xAxis:b;var c=g.dataMin,f=g.dataMax;g=(p.inputDateParser||M)(a,h.time.useUTC);g!==q.previousValue&&(q.previousValue=g,k(g)||(g=a.split("-"),g=Date.UTC(d(g[0]),d(g[1])-1,d(g[2]))),k(g)&&(h.time.useUTC||(g+=6E4*(new Date).getTimezoneOffset()),
r?g>e.maxInput.HCTime?g=void 0:g<c&&(g=c):g<e.minInput.HCTime?g=void 0:g>f&&(g=f),"undefined"!==typeof g&&b.setExtremes(r?g:b.min,r?b.max:g,void 0,void 0,{trigger:"rangeSelectorInput"})))}var e=this,h=e.chart,t=h.renderer.style||{},g=h.renderer,p=h.options.rangeSelector,m=e.div,r="min"===a,q,n,u=this.inputGroup,M=this.defaultInputDateParser;this[a+"Label"]=n=g.label(C.lang[r?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(u);
u.offset+=n.width+5;this[a+"DateBox"]=g=g.label("",u.offset).addClass("highcharts-range-input").attr({padding:2,width:p.inputBoxWidth||90,height:p.inputBoxHeight||17,"text-align":"center"}).on("click",function(){e.showInput(a);e[a+"Input"].focus()});h.styledMode||g.attr({stroke:p.inputBoxBorderColor||"#cccccc","stroke-width":1});g.add(u);u.offset+=g.width+(r?10:0);this[a+"Input"]=q=l("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:h.plotTop+"px"},m);h.styledMode||(n.css(f(t,
p.labelStyle)),g.css(f({color:"#333333"},t,p.inputStyle)),b(q,F({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:t.fontSize,fontFamily:t.fontFamily,top:"-9999em"},p.inputStyle)));q.onfocus=function(){e.showInput(a)};q.onblur=function(){q===v.doc.activeElement&&c();e.hideInput(a);q.blur()};q.onchange=c;q.onkeypress=function(a){13===a.keyCode&&c()}};c.prototype.getPosition=function(){var a=this.chart,b=a.options.rangeSelector;a="top"===b.verticalAlign?a.plotTop-
a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}};c.prototype.getYTDExtremes=function(a,b,c){var d=this.chart.time,e=new d.Date(a),g=d.get("FullYear",e);c=c?d.Date.UTC(g,0,1):+new d.Date(g,0,1);b=Math.max(b||0,c);e=e.getTime();return{max:Math.min(a||e,e),min:b}};c.prototype.render=function(a,b){var c=this,d=c.chart,e=d.renderer,g=d.container,f=d.options,k=f.exporting&&!1!==f.exporting.enabled&&f.navigation&&f.navigation.buttonOptions,t=C.lang,m=c.div,q=f.rangeSelector,
r=h(f.chart.style&&f.chart.style.zIndex,0)+1;f=q.floating;var n=c.buttons;m=c.inputGroup;var u=q.buttonTheme,v=q.buttonPosition,A=q.inputPosition,w=q.inputEnabled,y=u&&u.states,x=d.plotLeft,z=c.buttonGroup,I,G=c.options.verticalAlign,F=d.legend,J=F&&F.options,Q=v.y,P=A.y,R=d.hasLoaded,S=R?"animate":"attr",O=0,N=0;if(!1!==q.enabled){c.rendered||(c.group=I=e.g("range-selector-group").attr({zIndex:7}).add(),c.buttonGroup=z=e.g("range-selector-buttons").add(I),c.zoomText=e.text(t.rangeSelectorZoom,0,
15).add(z),d.styledMode||(c.zoomText.css(q.labelStyle),u["stroke-width"]=h(u["stroke-width"],0)),c.buttonOptions.forEach(function(a,b){n[b]=e.button(a.text,0,0,function(g){var d=a.events&&a.events.click,e;d&&(e=d.call(a,g));!1!==e&&c.clickButton(b);c.isActive=!0},u,y&&y.hover,y&&y.select,y&&y.disabled).attr({"text-align":"center"}).add(z)}),!1!==w&&(c.div=m=l("div",null,{position:"relative",height:0,zIndex:r}),g.parentNode.insertBefore(m,g),c.inputGroup=m=e.g("input-group").add(I),m.offset=0,c.drawInput("min"),
c.drawInput("max")));c.zoomText[S]({x:h(x+v.x,x)});var T=h(x+v.x,x)+c.zoomText.getBBox().width+5;c.buttonOptions.forEach(function(a,b){n[b][S]({x:T});T+=n[b].width+h(q.buttonSpacing,5)});x=d.plotLeft-d.spacing[3];c.updateButtonStates();k&&this.titleCollision(d)&&"top"===G&&"right"===v.align&&v.y+z.getBBox().height-12<(k.y||0)+k.height&&(O=-40);g=v.x-d.spacing[3];"right"===v.align?g+=O-x:"center"===v.align&&(g-=x/2);z.align({y:v.y,width:z.getBBox().width,align:v.align,x:g},!0,d.spacingBox);c.group.placed=
R;c.buttonGroup.placed=R;!1!==w&&(O=k&&this.titleCollision(d)&&"top"===G&&"right"===A.align&&A.y-m.getBBox().height-12<(k.y||0)+k.height+d.spacing[0]?-40:0,"left"===A.align?g=x:"right"===A.align&&(g=-Math.max(d.axisOffset[1],-O)),m.align({y:A.y,width:m.getBBox().width,align:A.align,x:A.x+g-2},!0,d.spacingBox),k=m.alignAttr.translateX+m.alignOptions.x-O+m.getBBox().x+2,g=m.alignOptions.width,t=z.alignAttr.translateX+z.getBBox().x,x=z.getBBox().width+20,(A.align===v.align||t+x>k&&k+g>t&&Q<P+m.getBBox().height)&&
m.attr({translateX:m.alignAttr.translateX+(d.axisOffset[1]>=-O?0:-O),translateY:m.alignAttr.translateY+z.getBBox().height+10}),c.setInputValue("min",a),c.setInputValue("max",b),c.inputGroup.placed=R);c.group.align({verticalAlign:G},!0,d.spacingBox);a=c.group.getBBox().height+20;b=c.group.alignAttr.translateY;"bottom"===G&&(F=J&&"bottom"===J.verticalAlign&&J.enabled&&!J.floating?F.legendHeight+h(J.margin,10):0,a=a+F-20,N=b-a-(f?0:q.y)-(d.titleOffset?d.titleOffset[2]:0)-10);if("top"===G)f&&(N=0),d.titleOffset&&
d.titleOffset[0]&&(N=d.titleOffset[0]),N+=d.margin[0]-d.spacing[0]||0;else if("middle"===G)if(P===Q)N=0>P?b+void 0:b;else if(P||Q)N=0>P||0>Q?N-Math.min(P,Q):b-a+NaN;c.group.translate(q.x,q.y+Math.floor(N));!1!==w&&(c.minInput.style.marginTop=c.group.translateY+"px",c.maxInput.style.marginTop=c.group.translateY+"px");c.rendered=!0}};c.prototype.getHeight=function(){var a=this.options,b=this.group,c=a.y,d=a.buttonPosition.y,e=a.inputPosition.y;if(a.height)return a.height;a=b?b.getBBox(!0).height+13+
c:0;b=Math.min(e,d);if(0>e&&0>d||0<e&&0<d)a+=Math.abs(b);return a};c.prototype.titleCollision=function(a){return!(a.options.title.text||a.options.subtitle.text)};c.prototype.update=function(a){var b=this.chart;f(!0,b.options.rangeSelector,a);this.destroy();this.init(b);b.rangeSelector.render()};c.prototype.destroy=function(){var b=this,d=b.minInput,e=b.maxInput;b.unMouseDown();b.unResize();q(b.buttons);d&&(d.onfocus=d.onblur=d.onchange=null);e&&(e.onfocus=e.onblur=e.onchange=null);a(b,function(a,
d){a&&"chart"!==d&&(a instanceof w?a.destroy():a instanceof window.HTMLElement&&z(a));a!==c.prototype[d]&&(b[d]=null)},this)};return c}();c.prototype.defaultButtons=[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}];e.prototype.minFromRange=function(){var a=this.range,b=a.type,c=this.max,d=this.chart.time,e=function(a,c){var g="year"===b?"FullYear":"Month",e=new d.Date(a),
f=d.get(g,e);d.set(g,e,f+c);f===d.get(g,e)&&d.set("Date",e,0);return e.getTime()-a};if(k(a)){var f=c-a;var g=a}else f=c+e(c,-a.count),this.chart&&(this.chart.fixedRange=c-f);var p=h(this.dataMin,Number.MIN_VALUE);k(f)||(f=p);f<=p&&(f=p,"undefined"===typeof g&&(g=e(f,a.count)),this.newMax=Math.min(f+g,this.dataMax));k(c)||(f=void 0);return f};v.RangeSelector||(u(n,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new c(this))}),u(n,"beforeRender",function(){var a=
this.axes,b=this.rangeSelector;b&&(k(b.deferredYTDClick)&&(b.clickButton(b.deferredYTDClick),delete b.deferredYTDClick),a.forEach(function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),b.render(),a=b.options.verticalAlign,b.options.floating||("bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0)))}),u(n,"update",function(a){var b=a.options.rangeSelector;a=this.rangeSelector;var d=this.extraBottomMargin,e=this.extraTopMargin;b&&b.enabled&&!m(a)&&(this.options.rangeSelector.enabled=
!0,this.rangeSelector=new c(this));this.extraTopMargin=this.extraBottomMargin=!1;a&&(a.render(),b=b&&b.verticalAlign||a.options&&a.options.verticalAlign,a.options.floating||("bottom"===b?this.extraBottomMargin=!0:"middle"!==b&&(this.extraTopMargin=!0)),this.extraBottomMargin!==d||this.extraTopMargin!==e)&&(this.isDirtyBox=!0)}),u(n,"render",function(){var a=this.rangeSelector;a&&!a.options.floating&&(a.render(),a=a.options.verticalAlign,"bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=
!0))}),u(n,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))}),n.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();e=a.legend;g=null===d||void 0===d?void 0:d.options.verticalAlign;k(c.min)&&d.render(c.min,c.max);d&&e.display&&"top"===g&&g===e.options.verticalAlign&&(h=f(a.spacingBox),h.y="vertical"===e.options.layout?a.plotTop:h.y+d.getHeight(),e.group.placed=!1,e.align(h))}
var c,d=a.rangeSelector,e,h,g;if(d){var p=u(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)});var m=u(a,"redraw",b);b()}u(a,"destroy",function(){d&&(m(),p())})}),v.RangeSelector=c);return v.RangeSelector});J(e,"Core/Axis/NavigatorAxis.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,n){var v=e.isTouchDevice,x=n.addEvent,w=n.correctFloat,y=n.defined,C=n.isNumber,u=n.pick,l=function(){function b(b){this.axis=b}b.prototype.destroy=function(){this.axis=void 0};b.prototype.toFixedRange=
function(b,e,l,n){var m=this.axis,k=m.chart;k=k&&k.fixedRange;var f=(m.pointRange||0)/2;b=u(l,m.translate(b,!0,!m.horiz));e=u(n,m.translate(e,!0,!m.horiz));m=k&&(e-b)/k;y(l)||(b=w(b+f));y(n)||(e=w(e-f));.7<m&&1.3>m&&(n?b=e-k:e=b+k);C(b)&&C(e)||(b=e=void 0);return{min:b,max:e}};return b}();return function(){function b(){}b.compose=function(b){b.keepProps.push("navigatorAxis");x(b,"init",function(){this.navigatorAxis||(this.navigatorAxis=new l(this))});x(b,"zoom",function(b){var e=this.chart.options,
m=e.navigator,l=this.navigatorAxis,k=e.chart.pinchType,f=e.rangeSelector;e=e.chart.zoomType;this.isXAxis&&(m&&m.enabled||f&&f.enabled)&&("y"===e?b.zoomed=!1:(!v&&"xy"===e||v&&"xy"===k)&&this.options.range&&(m=l.previousZoom,y(b.newMin)?l.previousZoom=[this.min,this.max]:m&&(b.newMin=m[0],b.newMax=m[1],l.previousZoom=void 0)));"undefined"!==typeof b.zoomed&&b.preventDefault()})};b.AdditionsClass=l;return b}()});J(e,"Core/Navigator.js",[e["Core/Axis/Axis.js"],e["Core/Chart/Chart.js"],e["Core/Color.js"],
e["Core/Globals.js"],e["Core/Axis/NavigatorAxis.js"],e["Core/Options.js"],e["Core/Scrollbar.js"],e["Core/Utilities.js"]],function(e,n,v,x,w,y,C,u){v=v.parse;var l=y.defaultOptions,b=u.addEvent,m=u.clamp,q=u.correctFloat,z=u.defined,F=u.destroyObjectProperties,G=u.erase,k=u.extend,f=u.find,a=u.isArray,h=u.isNumber,d=u.merge,r=u.pick,c=u.removeEvent,A=u.splat,t=x.hasTouch,I=x.isTouchDevice;y=x.Series;var D=function(a){for(var b=[],c=1;c<arguments.length;c++)b[c-1]=arguments[c];b=[].filter.call(b,h);
if(b.length)return Math[a].apply(0,b)};u="undefined"===typeof x.seriesTypes.areaspline?"line":"areaspline";k(l,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:v("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:u,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,
smoothed:!0,units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,
labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});x.Renderer.prototype.symbols["navigator-handle"]=function(a,b,c,d,e){a=(e&&e.width||0)/2;b=Math.round(a/3)+.5;e=e&&e.height||0;return[["M",-a-1,.5],["L",a,.5],["L",a,e+.5],["L",-a-1,e+.5],["L",-a-1,.5],["M",-b,4],["L",-b,e-3],["M",b-1,
4],["L",b-1,e-3]]};var B=function(){function n(a){this.zoomedMin=this.zoomedMax=this.yAxis=this.xAxis=this.top=this.size=this.shades=this.rendered=this.range=this.outlineHeight=this.outline=this.opposite=this.navigatorSize=this.navigatorSeries=this.navigatorOptions=this.navigatorGroup=this.navigatorEnabled=this.left=this.height=this.handles=this.chart=this.baseSeries=void 0;this.init(a)}n.prototype.drawHandle=function(a,b,c,d){var e=this.navigatorOptions.handles.height;this.handles[b][d](c?{translateX:Math.round(this.left+
this.height/2),translateY:Math.round(this.top+parseInt(a,10)+.5-e)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-e/2-1)})};n.prototype.drawOutline=function(a,b,c,d){var e=this.navigatorOptions.maskInside,g=this.outline.strokeWidth(),f=g/2,p=g%2/2;g=this.outlineHeight;var h=this.scrollbarHeight||0,k=this.size,m=this.left-h,l=this.top;c?(m-=f,c=l+b+p,b=l+a+p,p=[["M",m+g,l-h-p],["L",m+g,c],["L",m,c],["L",m,b],["L",m+g,b],["L",m+g,l+k+h]],e&&p.push(["M",
m+g,c-f],["L",m+g,b+f])):(a+=m+h-p,b+=m+h-p,l+=f,p=[["M",m,l],["L",a,l],["L",a,l+g],["L",b,l+g],["L",b,l],["L",m+k+2*h,l]],e&&p.push(["M",a-f,l],["L",b+f,l]));this.outline[d]({d:p})};n.prototype.drawMasks=function(a,b,c,d){var e=this.left,g=this.top,f=this.height;if(c){var p=[e,e,e];var h=[g,g+a,g+b];var k=[f,f,f];var m=[a,b-a,this.size-b]}else p=[e,e+a,e+b],h=[g,g,g],k=[a,b-a,this.size-b],m=[f,f,f];this.shades.forEach(function(a,b){a[d]({x:p[b],y:h[b],width:k[b],height:m[b]})})};n.prototype.renderElements=
function(){var a=this,b=a.navigatorOptions,c=b.maskInside,e=a.chart,d=e.renderer,f,h={cursor:e.inverted?"ns-resize":"ew-resize"};a.navigatorGroup=f=d.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();[!c,c,!c].forEach(function(c,g){a.shades[g]=d.rect().addClass("highcharts-navigator-mask"+(1===g?"-inside":"-outside")).add(f);e.styledMode||a.shades[g].attr({fill:c?b.maskFill:"rgba(0,0,0,0)"}).css(1===g&&h)});a.outline=d.path().addClass("highcharts-navigator-outline").add(f);e.styledMode||a.outline.attr({"stroke-width":b.outlineWidth,
stroke:b.outlineColor});b.handles.enabled&&[0,1].forEach(function(c){b.handles.inverted=e.inverted;a.handles[c]=d.symbol(b.handles.symbols[c],-b.handles.width/2-1,0,b.handles.width,b.handles.height,b.handles);a.handles[c].attr({zIndex:7-c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(f);if(!e.styledMode){var g=b.handles;a.handles[c].attr({fill:g.backgroundColor,stroke:g.borderColor,"stroke-width":g.lineWidth}).css(h)}})};n.prototype.update=function(a){(this.series||
[]).forEach(function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy();d(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)};n.prototype.render=function(a,b,c,e){var d=this.chart,g=this.scrollbarHeight,f,p=this.xAxis,k=p.pointRange||0;var l=p.navigatorAxis.fake?d.xAxis[0]:p;var n=this.navigatorEnabled,t,u=this.rendered;var v=d.inverted;var H=d.xAxis[0].minRange,w=d.xAxis[0].options.maxRange;if(!this.hasDragged||z(c)){a=q(a-k/2);b=q(b+k/2);if(!h(a)||!h(b))if(u)c=
0,e=r(p.width,l.width);else return;this.left=r(p.left,d.plotLeft+g+(v?d.plotWidth:0));this.size=t=f=r(p.len,(v?d.plotHeight:d.plotWidth)-2*g);d=v?g:f+2*g;c=r(c,p.toPixels(a,!0));e=r(e,p.toPixels(b,!0));h(c)&&Infinity!==Math.abs(c)||(c=0,e=d);a=p.toValue(c,!0);b=p.toValue(e,!0);var x=Math.abs(q(b-a));x<H?this.grabbedLeft?c=p.toPixels(b-H-k,!0):this.grabbedRight&&(e=p.toPixels(a+H+k,!0)):z(w)&&q(x-k)>w&&(this.grabbedLeft?c=p.toPixels(b-w-k,!0):this.grabbedRight&&(e=p.toPixels(a+w+k,!0)));this.zoomedMax=
m(Math.max(c,e),0,t);this.zoomedMin=m(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(c,e),0,t);this.range=this.zoomedMax-this.zoomedMin;t=Math.round(this.zoomedMax);c=Math.round(this.zoomedMin);n&&(this.navigatorGroup.attr({visibility:"visible"}),u=u&&!this.hasDragged?"animate":"attr",this.drawMasks(c,t,v,u),this.drawOutline(c,t,v,u),this.navigatorOptions.handles.enabled&&(this.drawHandle(c,0,v,u),this.drawHandle(t,1,v,u)));this.scrollbar&&(v?(v=this.top-g,l=this.left-g+(n||!l.opposite?0:
(l.titleOffset||0)+l.axisTitleMargin),g=f+2*g):(v=this.top+(n?this.height:-g),l=this.left-g),this.scrollbar.position(l,v,d,g),this.scrollbar.setRange(this.zoomedMin/(f||1),this.zoomedMax/(f||1)));this.rendered=!0}};n.prototype.addMouseEvents=function(){var a=this,c=a.chart,e=c.container,d=[],f,h;a.mouseMoveHandler=f=function(b){a.onMouseMove(b)};a.mouseUpHandler=h=function(b){a.onMouseUp(b)};d=a.getPartsEvents("mousedown");d.push(b(c.renderTo,"mousemove",f),b(e.ownerDocument,"mouseup",h));t&&(d.push(b(c.renderTo,
"touchmove",f),b(e.ownerDocument,"touchend",h)),d.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=d;a.series&&a.series[0]&&d.push(b(a.series[0].xAxis,"foundExtremes",function(){c.navigator.modifyNavigatorAxisExtremes()}))};n.prototype.getPartsEvents=function(a){var c=this,e=[];["shades","handles"].forEach(function(d){c[d].forEach(function(g,f){e.push(b(g.element,a,function(a){c[d+"Mousedown"](a,f)}))})});return e};n.prototype.shadesMousedown=function(a,b){a=this.chart.pointer.normalize(a);
var c=this.chart,e=this.xAxis,d=this.zoomedMin,g=this.left,f=this.size,h=this.range,p=a.chartX;c.inverted&&(p=a.chartY,g=this.top);if(1===b)this.grabbedCenter=p,this.fixedWidth=h,this.dragOffset=p-d;else{a=p-g-h/2;if(0===b)a=Math.max(0,a);else if(2===b&&a+h>=f)if(a=f-h,this.reversedExtremes){a-=h;var k=this.getUnionExtremes().dataMin}else var m=this.getUnionExtremes().dataMax;a!==d&&(this.fixedWidth=h,b=e.navigatorAxis.toFixedRange(a,a+h,k,m),z(b.min)&&c.xAxis[0].setExtremes(Math.min(b.min,b.max),
Math.max(b.min,b.max),!0,null,{trigger:"navigator"}))}};n.prototype.handlesMousedown=function(a,b){this.chart.pointer.normalize(a);a=this.chart;var c=a.xAxis[0],d=this.reversedExtremes;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?c.min:c.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?c.max:c.min);a.fixedRange=null};n.prototype.onMouseMove=function(a){var b=this,c=b.chart,d=b.left,e=b.navigatorSize,g=b.range,f=b.dragOffset,h=c.inverted;
a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,h&&(d=b.top,c=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,c-d,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,c-d)):b.grabbedCenter&&(b.hasDragged=!0,c<f?c=f:c>e+f-g&&(c=e+f-g),b.render(0,0,c-f,c-f+g)),b.hasDragged&&b.scrollbar&&r(b.scrollbar.options.liveRedraw,x.svg&&!I&&!this.chart.isBoosting)&&(a.DOMType=a.type,setTimeout(function(){b.onMouseUp(a)},0)))};n.prototype.onMouseUp=function(a){var b=
this.chart,c=this.xAxis,d=this.scrollbar,e=a.DOMEvent||a,g=b.inverted,f=this.rendered&&!this.hasDragged?"animate":"attr";if(this.hasDragged&&(!d||!d.hasDragged)||"scrollbar"===a.trigger){d=this.getUnionExtremes();if(this.zoomedMin===this.otherHandlePos)var k=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var m=this.fixedExtreme;this.zoomedMax===this.size&&(m=this.reversedExtremes?d.dataMin:d.dataMax);0===this.zoomedMin&&(k=this.reversedExtremes?d.dataMax:d.dataMin);c=c.navigatorAxis.toFixedRange(this.zoomedMin,
this.zoomedMax,k,m);z(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:e})}"mousemove"!==a.DOMType&&"touchmove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null);this.navigatorEnabled&&h(this.zoomedMin)&&h(this.zoomedMax)&&(b=Math.round(this.zoomedMin),a=Math.round(this.zoomedMax),
this.shades&&this.drawMasks(b,a,g,f),this.outline&&this.drawOutline(b,a,g,f),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(b,0,g,f),this.drawHandle(a,1,g,f)))};n.prototype.removeEvents=function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()};n.prototype.removeBaseSeriesEvents=function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&
a.forEach(function(a){c(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&c(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))};n.prototype.init=function(a){var c=a.options,g=c.navigator,f=g.enabled,h=c.scrollbar,k=h.enabled;c=f?g.height:0;var m=k?h.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=c;this.scrollbarHeight=m;this.scrollbarEnabled=k;this.navigatorEnabled=f;this.navigatorOptions=g;this.scrollbarOptions=h;this.outlineHeight=c+m;this.opposite=
r(g.opposite,!(f||!a.inverted));var l=this;f=l.baseSeries;h=a.xAxis.length;k=a.yAxis.length;var n=f&&f[0]&&f[0].xAxis||a.xAxis[0]||{options:{}};a.isDirtyBox=!0;l.navigatorEnabled?(l.xAxis=new e(a,d({breaks:n.options.breaks,ordinal:n.options.ordinal},g.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:h,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[m,0,-m,0],width:c}:{offsets:[0,
-m,0,m],height:c})),l.yAxis=new e(a,d(g.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:k,isInternal:!0,zoomEnabled:!1},a.inverted?{width:c}:{height:c})),f||g.series.data?l.updateNavigatorSeries(!1):0===a.series.length&&(l.unbindRedraw=b(a,"beforeRedraw",function(){0<a.series.length&&!l.series&&(l.setBaseSeries(),l.unbindRedraw())})),l.reversedExtremes=a.inverted&&!l.xAxis.reversed||!a.inverted&&l.xAxis.reversed,l.renderElements(),l.addMouseEvents()):(l.xAxis={chart:a,navigatorAxis:{fake:!0},
translate:function(b,c){var d=a.xAxis[0],e=d.getExtremes(),g=d.len-2*m,f=D("min",d.options.min,e.dataMin);d=D("max",d.options.max,e.dataMax)-f;return c?b*d/g+f:g*(b-f)/d},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)}},l.xAxis.navigatorAxis.axis=l.xAxis,l.xAxis.navigatorAxis.toFixedRange=w.AdditionsClass.prototype.toFixedRange.bind(l.xAxis.navigatorAxis));a.options.scrollbar.enabled&&(a.scrollbar=l.scrollbar=new C(a.renderer,d(a.options.scrollbar,{margin:l.navigatorEnabled?
0:10,vertical:a.inverted}),a),b(l.scrollbar,"changed",function(b){var c=l.size,d=c*this.to;c*=this.from;l.hasDragged=l.scrollbar.hasDragged;l.render(0,0,c,d);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType)&&setTimeout(function(){l.onMouseUp(b)})}));l.addBaseSeriesEvents();l.addChartEvents()};n.prototype.getUnionExtremes=function(a){var b=this.chart.xAxis[0],c=this.xAxis,d=c.options,e=b.options,f;a&&null===b.dataMin||(f={dataMin:r(d&&d.min,D("min",e.min,b.dataMin,
c.dataMin,c.min)),dataMax:r(d&&d.max,D("max",e.max,b.dataMax,c.dataMax,c.max))});return f};n.prototype.setBaseSeries=function(a,b){var c=this.chart,d=this.baseSeries=[];a=a||c.options&&c.options.navigator.baseSeries||(c.series.length?f(c.series,function(a){return!a.options.isInternal}).index:0);(c.series||[]).forEach(function(b,c){b.options.isInternal||!b.options.showInNavigator&&(c!==a&&b.options.id!==a||!1===b.options.showInNavigator)||d.push(b)});this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,
b)};n.prototype.updateNavigatorSeries=function(b,e){var f=this,g=f.chart,h=f.baseSeries,m,p,n=f.navigatorOptions.series,q,t={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},u=f.series=(f.series||[]).filter(function(a){var b=a.baseSeries;return 0>h.indexOf(b)?(b&&(c(b,"updatedData",f.updatedDataHandler),delete b.navigatorSeries),a.chart&&a.destroy(),
!1):!0});h&&h.length&&h.forEach(function(b){var c=b.navigatorSeries,v=k({color:b.color,visible:b.visible},a(n)?l.navigator.series:n);c&&!1===f.navigatorOptions.adaptToUpdatedData||(t.name="Navigator "+h.length,m=b.options||{},q=m.navigatorOptions||{},p=d(m,t,v,q),p.pointRange=r(v.pointRange,q.pointRange,l.plotOptions[p.type||"line"].pointRange),v=q.data||v.data,f.hasNavigatorData=f.hasNavigatorData||!!v,p.data=v||m.data&&m.data.slice(0),c&&c.options?c.update(p,e):(b.navigatorSeries=g.initSeries(p),
b.navigatorSeries.baseSeries=b,u.push(b.navigatorSeries)))});if(n.data&&(!h||!h.length)||a(n))f.hasNavigatorData=!1,n=A(n),n.forEach(function(a,b){t.name="Navigator "+(u.length+1);p=d(l.navigator.series,{color:g.series[b]&&!g.series[b].options.isInternal&&g.series[b].color||g.options.colors[b]||g.options.colors[0]},t,a);p.data=a.data;p.data&&(f.hasNavigatorData=!0,u.push(g.initSeries(p)))});b&&this.addBaseSeriesEvents()};n.prototype.addBaseSeriesEvents=function(){var a=this,c=a.baseSeries||[];c[0]&&
c[0].xAxis&&b(c[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);c.forEach(function(c){b(c,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});b(c,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&c.xAxis&&b(c,"updatedData",this.updatedDataHandler);b(c,"remove",function(){this.navigatorSeries&&(G(a.series,this.navigatorSeries),z(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),
delete this.navigatorSeries)})},this)};n.prototype.getBaseSeriesMin=function(a){return this.baseSeries.reduce(function(a,b){return Math.min(a,b.xData?b.xData[0]:a)},a)};n.prototype.modifyNavigatorAxisExtremes=function(){var a=this.xAxis,b;"undefined"!==typeof a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))};n.prototype.modifyBaseAxisExtremes=function(){var a=this.chart.navigator,b=this.getExtremes(),c=b.dataMin,d=b.dataMax;b=
b.max-b.min;var e=a.stickToMin,f=a.stickToMax,k=r(this.options.overscroll,0),l=a.series&&a.series[0],m=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(e){var n=c;var q=n+b}f&&(q=d+k,e||(n=Math.max(c,q-b,a.getBaseSeriesMin(l&&l.xData?l.xData[0]:-Number.MAX_VALUE))));m&&(e||f)&&h(n)&&(this.min=this.userMin=n,this.max=this.userMax=q)}a.stickToMin=a.stickToMax=null};n.prototype.updatedDataHandler=function(){var a=this.chart.navigator,b=this.navigatorSeries,c=
a.getBaseSeriesMin(this.xData[0]);a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=h(this.xAxis.min)&&this.xAxis.min<=c&&(!this.chart.fixedRange||!a.stickToMax);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))};n.prototype.addChartEvents=function(){this.eventsToUnbind||(this.eventsToUnbind=[]);this.eventsToUnbind.push(b(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&
a.baseSeries[0]&&a.baseSeries[0].xAxis||this.xAxis[0]);b&&a.render(b.min,b.max)}),b(this.chart,"getMargins",function(){var a=this.navigator,b=a.opposite?"plotTop":"marginBottom";this.inverted&&(b=a.opposite?"marginRight":"plotLeft");this[b]=(this[b]||0)+(a.navigatorEnabled||!this.inverted?a.outlineHeight:0)+a.navigatorOptions.margin}))};n.prototype.destroy=function(){this.removeEvents();this.xAxis&&(G(this.chart.xAxis,this.xAxis),G(this.chart.axes,this.xAxis));this.yAxis&&(G(this.chart.yAxis,this.yAxis),
G(this.chart.axes,this.yAxis));(this.series||[]).forEach(function(a){a.destroy&&a.destroy()});"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);[this.handles].forEach(function(a){F(a)},this)};return n}();x.Navigator||(x.Navigator=B,w.compose(e),b(n,"beforeShowResetZoom",function(){var a=this.options,b=a.navigator,c=a.rangeSelector;if((b&&
b.enabled||c&&c.enabled)&&(!I&&"x"===a.chart.zoomType||I&&"x"===a.chart.pinchType))return!1}),b(n,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new B(this)}),b(n,"afterSetChartSize",function(){var a=this.legend,b=this.navigator;if(b){var c=a&&a.options;var d=b.xAxis;var e=b.yAxis;var f=b.scrollbarHeight;this.inverted?(b.left=b.opposite?this.chartWidth-f-b.height:this.spacing[3]+f,b.top=this.plotTop+f):(b.left=this.plotLeft+f,
b.top=b.navigatorOptions.top||this.chartHeight-b.height-f-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(c&&"bottom"===c.verticalAlign&&"proximate"!==c.layout&&c.enabled&&!c.floating?a.legendHeight+r(c.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0));d&&e&&(this.inverted?d.options.left=e.options.left=b.left:d.options.top=e.options.top=b.top,d.setAxisSize(),e.setAxisSize())}}),b(n,"update",function(a){var b=a.options.navigator||{},c=a.options.scrollbar||
{};this.navigator||this.scroller||!b.enabled&&!c.enabled||(d(!0,this.options.navigator,b),d(!0,this.options.scrollbar,c),delete a.options.navigator,delete a.options.scrollbar)}),b(n,"afterUpdate",function(a){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new B(this),r(a.redraw,!0)&&this.redraw(a.animation))}),b(n,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),b(y,"afterUpdate",function(){this.chart.navigator&&
!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}),n.prototype.callbacks.push(function(a){var b=a.navigator;b&&a.xAxis[0]&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))}));x.Navigator=B;return x.Navigator});J(e,"masters/modules/gantt.src.js",[],function(){})});
//# sourceMappingURL=gantt.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
/*
Highcharts Gantt JS v8.2.0 (2020-08-20)
GridAxis
(c) 2016-2019 Lars A. V. Cabrera
License: www.highcharts.com/license
*/
(function(d){"object"===typeof module&&module.exports?(d["default"]=d,module.exports=d):"function"===typeof define&&define.amd?define("highcharts/modules/grid-axis",["highcharts"],function(n){d(n);d.Highcharts=n;return d}):d("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(d){function n(d,w,n,A){d.hasOwnProperty(w)||(d[w]=A.apply(null,n))}d=d?d._modules:{};n(d,"Core/Axis/GridAxis.js",[d["Core/Axis/Axis.js"],d["Core/Globals.js"],d["Core/Options.js"],d["Core/Axis/Tick.js"],d["Core/Utilities.js"]],
function(d,n,z,A,l){var w=z.dateFormat,f=l.addEvent,p=l.defined,C=l.erase,E=l.find,F=l.isArray,B=l.isNumber,x=l.merge,y=l.pick,G=l.timeUnits,D=l.wrap;z=n.Chart;var H=function(b){var a=b.options;a.labels||(a.labels={});a.labels.align=y(a.labels.align,"center");b.categories||(a.showLastLabel=!1);b.labelRotation=0;a.labels.rotation=0};"";d.prototype.getMaxLabelDimensions=function(b,a){var c={width:0,height:0};a.forEach(function(a){var e=b[a];a=0;if(l.isObject(e,!0)){var h=l.isObject(e.label,!0)?e.label:
{};e=h.getBBox?h.getBBox().height:0;h.textStr&&(a=Math.round(h.getBBox().width));c.height=Math.max(e,c.height);c.width=Math.max(a,c.width)}});return c};n.dateFormats.W=function(b){b=new this.Date(b);var a=(this.get("Day",b)+6)%7,c=new this.Date(b.valueOf());this.set("Date",c,this.get("Date",b)-a+3);a=new this.Date(this.get("FullYear",c),0,1);4!==this.get("Day",a)&&(this.set("Month",b,0),this.set("Date",b,1+(11-this.get("Day",a))%7));return(1+Math.floor((c.valueOf()-a.valueOf())/6048E5)).toString()};
n.dateFormats.E=function(b){return w("%a",b,!0).charAt(0)};f(z,"afterSetChartSize",function(){this.axes.forEach(function(b){(b.grid&&b.grid.columns||[]).forEach(function(a){a.setAxisSize();a.setAxisTranslation()})})});f(A,"afterGetLabelPosition",function(b){var a=this.label,c=this.axis,h=c.reversed,e=c.chart,m=c.options.grid||{},g=c.options.labels,u=g.align,k=v.Side[c.side],d=b.tickmarkOffset,r=c.tickPositions,q=this.pos-d;r=B(r[b.index+1])?r[b.index+1]-d:c.max+d;var t=c.tickSize("tick");d=t?t[0]:
0;t=t?t[1]/2:0;if(!0===m.enabled){if("top"===k){m=c.top+c.offset;var f=m-d}else"bottom"===k?(f=e.chartHeight-c.bottom+c.offset,m=f+d):(m=c.top+c.len-c.translate(h?r:q),f=c.top+c.len-c.translate(h?q:r));"right"===k?(k=e.chartWidth-c.right+c.offset,h=k+d):"left"===k?(h=c.left+c.offset,k=h-d):(k=Math.round(c.left+c.translate(h?r:q))-t,h=Math.round(c.left+c.translate(h?q:r))-t);this.slotWidth=h-k;b.pos.x="left"===u?k:"right"===u?h:k+(h-k)/2;b.pos.y=f+(m-f)/2;e=e.renderer.fontMetrics(g.style.fontSize,
a.element);a=a.getBBox().height;g.useHTML?b.pos.y+=e.b+-(a/2):(a=Math.round(a/e.h),b.pos.y+=(e.b-(e.h-e.f))/2+-((a-1)*e.h/2));b.pos.x+=c.horiz&&g.x||0}});var I=function(){function b(a){this.axis=a}b.prototype.isOuterAxis=function(){var a=this.axis,c=a.grid.columnIndex,b=a.linkedParent&&a.linkedParent.grid.columns||a.grid.columns,e=c?a.linkedParent:a,d=-1,g=0;a.chart[a.coll].forEach(function(c,b){c.side!==a.side||c.options.isInternal||(g=b,c===e&&(d=b))});return g===d&&(B(c)?b.length===c:!0)};return b}(),
v=function(){function b(){}b.compose=function(a){d.keepProps.push("grid");D(a.prototype,"unsquish",b.wrapUnsquish);f(a,"init",b.onInit);f(a,"afterGetOffset",b.onAfterGetOffset);f(a,"afterGetTitlePosition",b.onAfterGetTitlePosition);f(a,"afterInit",b.onAfterInit);f(a,"afterRender",b.onAfterRender);f(a,"afterSetAxisTranslation",b.onAfterSetAxisTranslation);f(a,"afterSetOptions",b.onAfterSetOptions);f(a,"afterSetOptions",b.onAfterSetOptions2);f(a,"afterSetScale",b.onAfterSetScale);f(a,"afterTickSize",
b.onAfterTickSize);f(a,"trimTicks",b.onTrimTicks);f(a,"destroy",b.onDestroy)};b.onAfterGetOffset=function(){var a=this.grid;(a&&a.columns||[]).forEach(function(a){a.getOffset()})};b.onAfterGetTitlePosition=function(a){if(!0===(this.options.grid||{}).enabled){var c=this.axisTitle,h=this.height,e=this.horiz,d=this.left,g=this.offset,u=this.opposite,k=this.options.title,f=void 0===k?{}:k;k=this.top;var r=this.width,q=this.tickSize(),t=c&&c.getBBox().width,l=f.x||0,n=f.y||0,p=y(f.margin,e?5:10);c=this.chart.renderer.fontMetrics(f.style&&
f.style.fontSize,c).f;q=(e?k+h:d)+(e?1:-1)*(u?-1:1)*(q?q[0]/2:0)+(this.side===b.Side.bottom?c:0);a.titlePosition.x=e?d-t/2-p+l:q+(u?r:0)+g+l;a.titlePosition.y=e?q-(u?h:0)+(u?c:-c)/2+g+n:k-p+n}};b.onAfterInit=function(){var a=this.chart,c=this.options.grid;c=void 0===c?{}:c;var b=this.userOptions;c.enabled&&(H(this),D(this,"labelFormatter",function(a){var c=this.axis,b=this.value,e=c.tickPositions,d=(c.isLinked?c.linkedParent:c).series[0],h=b===e[0];e=b===e[e.length-1];d=d&&E(d.options.data,function(a){return a[c.isXAxis?
"x":"y"]===b});this.isFirst=h;this.isLast=e;this.point=d;return a.call(this)}));if(c.columns)for(var e=this.grid.columns=[],m=this.grid.columnIndex=0;++m<c.columns.length;){var g=x(b,c.columns[c.columns.length-m-1],{linkedTo:0,type:"category",scrollbar:{enabled:!1}});delete g.grid.columns;g=new d(this.chart,g);g.grid.isColumn=!0;g.grid.columnIndex=m;C(a.axes,g);C(a[this.coll],g);e.push(g)}};b.onAfterRender=function(){var a=this.grid,c=this.options,d=this.chart.renderer;if(!0===(c.grid||{}).enabled){this.maxLabelDimensions=
this.getMaxLabelDimensions(this.ticks,this.tickPositions);this.rightWall&&this.rightWall.destroy();if(this.grid&&this.grid.isOuterAxis()&&this.axisLine){var e=c.lineWidth;if(e){var m=this.getLinePath(e),g=m[0],f=m[1],k=((this.tickSize("tick")||[1])[0]-1)*(this.side===b.Side.top||this.side===b.Side.left?-1:1);"M"===g[0]&&"L"===f[0]&&(this.horiz?(g[2]+=k,f[2]+=k):(g[1]+=k,f[1]+=k));this.grid.axisLineExtra?this.grid.axisLineExtra.animate({d:m}):(this.grid.axisLineExtra=d.path(m).attr({zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup),
d.styledMode||this.grid.axisLineExtra.attr({stroke:c.lineColor,"stroke-width":e}));this.axisLine[this.showAxis?"show":"hide"](!0)}}(a&&a.columns||[]).forEach(function(a){a.render()})}};b.onAfterSetAxisTranslation=function(){var a=this.tickPositions&&this.tickPositions.info,c=this.options,b=c.grid||{},e=this.userOptions.labels||{};this.horiz&&(!0===b.enabled&&this.series.forEach(function(a){a.options.pointRange=0}),a&&c.dateTimeLabelFormats&&c.labels&&!p(e.align)&&(!1===c.dateTimeLabelFormats[a.unitName].range||
1<a.count)&&(c.labels.align="left",p(e.x)||(c.labels.x=3)))};b.onAfterSetOptions=function(a){var c=this.options;a=a.userOptions;var b=c&&l.isObject(c.grid,!0)?c.grid:{};if(!0===b.enabled){var e=x(!0,{className:"highcharts-grid-axis "+(a.className||""),dateTimeLabelFormats:{hour:{list:["%H:%M","%H"]},day:{list:["%A, %e. %B","%a, %e. %b","%E"]},week:{list:["Week %W","W%W"]},month:{list:["%B","%b","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"13px"}},margin:0,title:{text:null,reserveSpace:!1,
rotation:0},units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},a);"xAxis"===this.coll&&(p(a.linkedTo)&&!p(a.tickPixelInterval)&&(e.tickPixelInterval=350),p(a.tickPixelInterval)||!p(a.linkedTo)||p(a.tickPositioner)||p(a.tickInterval)||(e.tickPositioner=function(a,c){var b=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(b){var d,h=e.units;for(d=0;d<h.length;d++)if(h[d][0]===
b.unitName){var f=d;break}if(h[f+1]){var g=h[f+1][0];var m=(h[f+1][1]||[1])[0]}else"year"===b.unitName&&(g="year",m=10*b.count);b=G[g];this.tickInterval=b*m;return this.getTimeTicks({unitRange:b,count:m,unitName:g},a,c,this.options.startOfWeek)}}));x(!0,this.options,e);this.horiz&&(c.minPadding=y(a.minPadding,0),c.maxPadding=y(a.maxPadding,0));B(c.grid.borderWidth)&&(c.tickWidth=c.lineWidth=b.borderWidth)}};b.onAfterSetOptions2=function(a){a=(a=a.userOptions)&&a.grid||{};var c=a.columns;a.enabled&&
c&&x(!0,this.options,c[c.length-1])};b.onAfterSetScale=function(){(this.grid.columns||[]).forEach(function(a){a.setScale()})};b.onAfterTickSize=function(a){var c=d.defaultLeftAxisOptions,b=this.horiz,e=this.maxLabelDimensions,f=this.options.grid;f=void 0===f?{}:f;f.enabled&&e&&(c=2*Math.abs(c.labels.x),b=b?f.cellHeight||c+e.height:c+e.width,F(a.tickSize)?a.tickSize[0]=b:a.tickSize=[b,0])};b.onDestroy=function(a){var c=this.grid;(c.columns||[]).forEach(function(c){c.destroy(a.keepEvents)});c.columns=
void 0};b.onInit=function(a){a=a.userOptions||{};var c=a.grid||{};c.enabled&&p(c.borderColor)&&(a.tickColor=a.lineColor=c.borderColor);this.grid||(this.grid=new I(this))};b.onTrimTicks=function(){var a=this.options,c=this.categories,b=this.tickPositions,d=b[0],f=b[b.length-1],g=this.linkedParent&&this.linkedParent.min||this.min,l=this.linkedParent&&this.linkedParent.max||this.max,k=this.tickInterval;!0!==(a.grid||{}).enabled||c||!this.horiz&&!this.isLinked||(d<g&&d+k>g&&!a.startOnTick&&(b[0]=g),f>
l&&f-k<l&&!a.endOnTick&&(b[b.length-1]=l))};b.wrapUnsquish=function(a){var b=this.options.grid;return!0===(void 0===b?{}:b).enabled&&this.categories?this.tickInterval:a.apply(this,Array.prototype.slice.call(arguments,1))};return b}();(function(b){b=b.Side||(b.Side={});b[b.top=0]="top";b[b.right=1]="right";b[b.bottom=2]="bottom";b[b.left=3]="left"})(v||(v={}));v.compose(d);return v});n(d,"masters/modules/grid-axis.src.js",[],function(){})});
//# sourceMappingURL=grid-axis.js.map
File diff suppressed because one or more lines are too long
+989
View File
@@ -0,0 +1,989 @@
/**
* @license Highcharts Gantt JS v8.2.0 (2020-08-20)
*
* GridAxis
*
* (c) 2016-2019 Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/grid-axis', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Core/Axis/GridAxis.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Globals.js'], _modules['Core/Options.js'], _modules['Core/Axis/Tick.js'], _modules['Core/Utilities.js']], function (Axis, H, O, Tick, U) {
/* *
*
* (c) 2016 Highsoft AS
* Authors: Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var dateFormat = O.dateFormat;
var addEvent = U.addEvent,
defined = U.defined,
erase = U.erase,
find = U.find,
isArray = U.isArray,
isNumber = U.isNumber,
merge = U.merge,
pick = U.pick,
timeUnits = U.timeUnits,
wrap = U.wrap;
var argsToArray = function (args) {
return Array.prototype.slice.call(args, 1);
}, isObject = function (x) {
// Always use strict mode
return U.isObject(x, true);
}, Chart = H.Chart;
var applyGridOptions = function applyGridOptions(axis) {
var options = axis.options;
// Center-align by default
if (!options.labels) {
options.labels = {};
}
options.labels.align = pick(options.labels.align, 'center');
// @todo: Check against tickLabelPlacement between/on etc
/* Prevents adding the last tick label if the axis is not a category
axis.
Since numeric labels are normally placed at starts and ends of a
range of value, and this module makes the label point at the value,
an "extra" label would appear. */
if (!axis.categories) {
options.showLastLabel = false;
}
// Prevents rotation of labels when squished, as rotating them would not
// help.
axis.labelRotation = 0;
options.labels.rotation = 0;
};
/**
* For a datetime axis, the scale will automatically adjust to the
* appropriate unit. This member gives the default string
* representations used for each unit. For intermediate values,
* different units may be used, for example the `day` unit can be used
* on midnight and `hour` unit be used for intermediate values on the
* same axis.
* For grid axes (like in Gantt charts),
* it is possible to declare as a list to provide different
* formats depending on available space.
* For an overview of the replacement codes, see
* [dateFormat](/class-reference/Highcharts#dateFormat).
*
* Defaults to:
* ```js
* {
hour: {
list: ['%H:%M', '%H']
},
day: {
list: ['%A, %e. %B', '%a, %e. %b', '%E']
},
week: {
list: ['Week %W', 'W%W']
},
month: {
list: ['%B', '%b', '%o']
}
},
* ```
*
* @sample {gantt} gantt/demo/left-axis-table
* Gantt Chart with custom axis date format.
*
* @product gantt
* @apioption xAxis.dateTimeLabelFormats
*/
/**
* Set grid options for the axis labels. Requires Highcharts Gantt.
*
* @since 6.2.0
* @product gantt
* @apioption xAxis.grid
*/
/**
* Enable grid on the axis labels. Defaults to true for Gantt charts.
*
* @type {boolean}
* @default true
* @since 6.2.0
* @product gantt
* @apioption xAxis.grid.enabled
*/
/**
* Set specific options for each column (or row for horizontal axes) in the
* grid. Each extra column/row is its own axis, and the axis options can be set
* here.
*
* @sample gantt/demo/left-axis-table
* Left axis as a table
*
* @type {Array<Highcharts.XAxisOptions>}
* @apioption xAxis.grid.columns
*/
/**
* Set border color for the label grid lines.
*
* @type {Highcharts.ColorString}
* @apioption xAxis.grid.borderColor
*/
/**
* Set border width of the label grid lines.
*
* @type {number}
* @default 1
* @apioption xAxis.grid.borderWidth
*/
/**
* Set cell height for grid axis labels. By default this is calculated from font
* size. This option only applies to horizontal axes.
*
* @sample gantt/grid-axis/cellheight
* Gant chart with custom cell height
* @type {number}
* @apioption xAxis.grid.cellHeight
*/
''; // detach doclets above
/**
* Get the largest label width and height.
*
* @private
* @function Highcharts.Axis#getMaxLabelDimensions
*
* @param {Highcharts.Dictionary<Highcharts.Tick>} ticks
* All the ticks on one axis.
*
* @param {Array<number|string>} tickPositions
* All the tick positions on one axis.
*
* @return {Highcharts.SizeObject}
* Object containing the properties height and width.
*
* @todo Move this to the generic axis implementation, as it is used there.
*/
Axis.prototype.getMaxLabelDimensions = function (ticks, tickPositions) {
var dimensions = {
width: 0,
height: 0
};
tickPositions.forEach(function (pos) {
var tick = ticks[pos],
tickHeight = 0,
tickWidth = 0,
label;
if (isObject(tick)) {
label = isObject(tick.label) ? tick.label : {};
// Find width and height of tick
tickHeight = label.getBBox ? label.getBBox().height : 0;
if (label.textStr) {
// Set the tickWidth same as the label width after ellipsis
// applied #10281
tickWidth = Math.round(label.getBBox().width);
}
// Update the result if width and/or height are larger
dimensions.height = Math.max(tickHeight, dimensions.height);
dimensions.width = Math.max(tickWidth, dimensions.width);
}
});
return dimensions;
};
// Adds week date format
H.dateFormats.W = function (timestamp) {
var d = new this.Date(timestamp);
var firstDay = (this.get('Day',
d) + 6) % 7;
var thursday = new this.Date(d.valueOf());
this.set('Date', thursday, this.get('Date', d) - firstDay + 3);
var firstThursday = new this.Date(this.get('FullYear',
thursday), 0, 1);
if (this.get('Day', firstThursday) !== 4) {
this.set('Month', d, 0);
this.set('Date', d, 1 + (11 - this.get('Day', firstThursday)) % 7);
}
return (1 +
Math.floor((thursday.valueOf() - firstThursday.valueOf()) / 604800000)).toString();
};
// First letter of the day of the week, e.g. 'M' for 'Monday'.
H.dateFormats.E = function (timestamp) {
return dateFormat('%a', timestamp, true).charAt(0);
};
/* eslint-disable no-invalid-this */
addEvent(Chart, 'afterSetChartSize', function () {
this.axes.forEach(function (axis) {
(axis.grid && axis.grid.columns || []).forEach(function (column) {
column.setAxisSize();
column.setAxisTranslation();
});
});
});
// Center tick labels in cells.
addEvent(Tick, 'afterGetLabelPosition', function (e) {
var tick = this,
label = tick.label,
axis = tick.axis,
reversed = axis.reversed,
chart = axis.chart,
options = axis.options,
gridOptions = options.grid || {},
labelOpts = axis.options.labels,
align = labelOpts.align,
// verticalAlign is currently not supported for axis.labels.
verticalAlign = 'middle', // labelOpts.verticalAlign,
side = GridAxis.Side[axis.side],
tickmarkOffset = e.tickmarkOffset,
tickPositions = axis.tickPositions,
tickPos = tick.pos - tickmarkOffset,
nextTickPos = (isNumber(tickPositions[e.index + 1]) ?
tickPositions[e.index + 1] - tickmarkOffset :
axis.max + tickmarkOffset),
tickSize = axis.tickSize('tick'),
tickWidth = tickSize ? tickSize[0] : 0,
crispCorr = tickSize ? tickSize[1] / 2 : 0,
labelHeight,
lblMetrics,
lines,
bottom,
top,
left,
right;
// Only center tick labels in grid axes
if (gridOptions.enabled === true) {
// Calculate top and bottom positions of the cell.
if (side === 'top') {
bottom = axis.top + axis.offset;
top = bottom - tickWidth;
}
else if (side === 'bottom') {
top = chart.chartHeight - axis.bottom + axis.offset;
bottom = top + tickWidth;
}
else {
bottom = axis.top + axis.len - axis.translate(reversed ? nextTickPos : tickPos);
top = axis.top + axis.len - axis.translate(reversed ? tickPos : nextTickPos);
}
// Calculate left and right positions of the cell.
if (side === 'right') {
left = chart.chartWidth - axis.right + axis.offset;
right = left + tickWidth;
}
else if (side === 'left') {
right = axis.left + axis.offset;
left = right - tickWidth;
}
else {
left = Math.round(axis.left + axis.translate(reversed ? nextTickPos : tickPos)) - crispCorr;
right = Math.round(axis.left + axis.translate(reversed ? tickPos : nextTickPos)) - crispCorr;
}
tick.slotWidth = right - left;
// Calculate the positioning of the label based on
// alignment.
e.pos.x = (align === 'left' ?
left :
align === 'right' ?
right :
left + ((right - left) / 2) // default to center
);
e.pos.y = (verticalAlign === 'top' ?
top :
verticalAlign === 'bottom' ?
bottom :
top + ((bottom - top) / 2) // default to middle
);
lblMetrics = chart.renderer.fontMetrics(labelOpts.style.fontSize, label.element);
labelHeight = label.getBBox().height;
// Adjustment to y position to align the label correctly.
// Would be better to have a setter or similar for this.
if (!labelOpts.useHTML) {
lines = Math.round(labelHeight / lblMetrics.h);
e.pos.y += (
// Center the label
// TODO: why does this actually center the label?
((lblMetrics.b - (lblMetrics.h - lblMetrics.f)) / 2) +
// Adjust for height of additional lines.
-(((lines - 1) * lblMetrics.h) / 2));
}
else {
e.pos.y += (
// Readjust yCorr in htmlUpdateTransform
lblMetrics.b +
// Adjust for height of html label
-(labelHeight / 2));
}
e.pos.x += (axis.horiz && labelOpts.x || 0);
}
});
/* eslint-enable no-invalid-this */
/**
* Additions for grid axes.
* @private
* @class
*/
var GridAxisAdditions = /** @class */ (function () {
/* *
*
* Constructors
*
* */
function GridAxisAdditions(axis) {
this.axis = axis;
}
/* *
*
* Functions
*
* */
/**
* Checks if an axis is the outer axis in its dimension. Since
* axes are placed outwards in order, the axis with the highest
* index is the outermost axis.
*
* Example: If there are multiple x-axes at the top of the chart,
* this function returns true if the axis supplied is the last
* of the x-axes.
*
* @private
*
* @return {boolean}
* True if the axis is the outermost axis in its dimension; false if
* not.
*/
GridAxisAdditions.prototype.isOuterAxis = function () {
var axis = this.axis;
var chart = axis.chart;
var columnIndex = axis.grid.columnIndex;
var columns = (axis.linkedParent && axis.linkedParent.grid.columns ||
axis.grid.columns);
var parentAxis = columnIndex ? axis.linkedParent : axis;
var thisIndex = -1,
lastIndex = 0;
chart[axis.coll].forEach(function (otherAxis, index) {
if (otherAxis.side === axis.side && !otherAxis.options.isInternal) {
lastIndex = index;
if (otherAxis === parentAxis) {
// Get the index of the axis in question
thisIndex = index;
}
}
});
return (lastIndex === thisIndex &&
(isNumber(columnIndex) ? columns.length === columnIndex : true));
};
return GridAxisAdditions;
}());
/**
* Axis with grid support.
* @private
* @class
*/
var GridAxis = /** @class */ (function () {
function GridAxis() {
}
/* *
*
* Static Functions
*
* */
/* eslint-disable valid-jsdoc */
/**
* Extends axis class with grid support.
* @private
*/
GridAxis.compose = function (AxisClass) {
Axis.keepProps.push('grid');
wrap(AxisClass.prototype, 'unsquish', GridAxis.wrapUnsquish);
// Add event handlers
addEvent(AxisClass, 'init', GridAxis.onInit);
addEvent(AxisClass, 'afterGetOffset', GridAxis.onAfterGetOffset);
addEvent(AxisClass, 'afterGetTitlePosition', GridAxis.onAfterGetTitlePosition);
addEvent(AxisClass, 'afterInit', GridAxis.onAfterInit);
addEvent(AxisClass, 'afterRender', GridAxis.onAfterRender);
addEvent(AxisClass, 'afterSetAxisTranslation', GridAxis.onAfterSetAxisTranslation);
addEvent(AxisClass, 'afterSetOptions', GridAxis.onAfterSetOptions);
addEvent(AxisClass, 'afterSetOptions', GridAxis.onAfterSetOptions2);
addEvent(AxisClass, 'afterSetScale', GridAxis.onAfterSetScale);
addEvent(AxisClass, 'afterTickSize', GridAxis.onAfterTickSize);
addEvent(AxisClass, 'trimTicks', GridAxis.onTrimTicks);
addEvent(AxisClass, 'destroy', GridAxis.onDestroy);
};
/**
* Handle columns and getOffset.
* @private
*/
GridAxis.onAfterGetOffset = function () {
var grid = this.grid;
(grid && grid.columns || []).forEach(function (column) {
column.getOffset();
});
};
/**
* @private
*/
GridAxis.onAfterGetTitlePosition = function (e) {
var axis = this;
var options = axis.options;
var gridOptions = options.grid || {};
if (gridOptions.enabled === true) {
// compute anchor points for each of the title align options
var title = axis.axisTitle,
axisHeight = axis.height,
horiz = axis.horiz,
axisLeft = axis.left,
offset = axis.offset,
opposite = axis.opposite,
_a = axis.options.title,
axisTitleOptions = _a === void 0 ? {} : _a,
axisTop = axis.top,
axisWidth = axis.width;
var tickSize = axis.tickSize();
var titleWidth = title && title.getBBox().width;
var xOption = axisTitleOptions.x || 0;
var yOption = axisTitleOptions.y || 0;
var titleMargin = pick(axisTitleOptions.margin,
horiz ? 5 : 10);
var titleFontSize = axis.chart.renderer.fontMetrics(axisTitleOptions.style &&
axisTitleOptions.style.fontSize,
title).f;
var crispCorr = tickSize ? tickSize[0] / 2 : 0;
// TODO account for alignment
// the position in the perpendicular direction of the axis
var offAxis = ((horiz ? axisTop + axisHeight : axisLeft) +
(horiz ? 1 : -1) * // horizontal axis reverses the margin
(opposite ? -1 : 1) * // so does opposite axes
crispCorr +
(axis.side === GridAxis.Side.bottom ? titleFontSize : 0));
e.titlePosition.x = horiz ?
axisLeft - titleWidth / 2 - titleMargin + xOption :
offAxis + (opposite ? axisWidth : 0) + offset + xOption;
e.titlePosition.y = horiz ?
(offAxis -
(opposite ? axisHeight : 0) +
(opposite ? titleFontSize : -titleFontSize) / 2 +
offset +
yOption) :
axisTop - titleMargin + yOption;
}
};
/**
* @private
*/
GridAxis.onAfterInit = function () {
var axis = this;
var chart = axis.chart,
_a = axis.options.grid,
gridOptions = _a === void 0 ? {} : _a,
userOptions = axis.userOptions;
if (gridOptions.enabled) {
applyGridOptions(axis);
/* eslint-disable no-invalid-this */
// TODO: wrap the axis instead
wrap(axis, 'labelFormatter', function (proceed) {
var _a = this,
axis = _a.axis,
value = _a.value;
var tickPos = axis.tickPositions;
var series = (axis.isLinked ?
axis.linkedParent :
axis).series[0];
var isFirst = value === tickPos[0];
var isLast = value === tickPos[tickPos.length - 1];
var point = series && find(series.options.data,
function (p) {
return p[axis.isXAxis ? 'x' : 'y'] === value;
});
// Make additional properties available for the
// formatter
this.isFirst = isFirst;
this.isLast = isLast;
this.point = point;
// Call original labelFormatter
return proceed.call(this);
});
/* eslint-enable no-invalid-this */
}
if (gridOptions.columns) {
var columns = axis.grid.columns = [],
columnIndex = axis.grid.columnIndex = 0;
// Handle columns, each column is a grid axis
while (++columnIndex < gridOptions.columns.length) {
var columnOptions = merge(userOptions,
gridOptions.columns[gridOptions.columns.length - columnIndex - 1], {
linkedTo: 0,
// Force to behave like category axis
type: 'category',
// Disable by default the scrollbar on the grid axis
scrollbar: {
enabled: false
}
});
delete columnOptions.grid.columns; // Prevent recursion
var column = new Axis(axis.chart,
columnOptions);
column.grid.isColumn = true;
column.grid.columnIndex = columnIndex;
// Remove column axis from chart axes array, and place it
// in the columns array.
erase(chart.axes, column);
erase(chart[axis.coll], column);
columns.push(column);
}
}
};
/**
* Draw an extra line on the far side of the outermost axis,
* creating floor/roof/wall of a grid. And some padding.
* ```
* Make this:
* (axis.min) __________________________ (axis.max)
* | | | | |
* Into this:
* (axis.min) __________________________ (axis.max)
* ___|____|____|____|____|__
* ```
* @private
*/
GridAxis.onAfterRender = function () {
var axis = this;
var grid = axis.grid;
var options = axis.options;
var renderer = axis.chart.renderer;
var gridOptions = options.grid || {};
var yStartIndex,
yEndIndex,
xStartIndex,
xEndIndex;
if (gridOptions.enabled === true) {
// @todo acutual label padding (top, bottom, left, right)
axis.maxLabelDimensions = axis.getMaxLabelDimensions(axis.ticks, axis.tickPositions);
// Remove right wall before rendering if updating
if (axis.rightWall) {
axis.rightWall.destroy();
}
/*
Draw an extra axis line on outer axes
>
Make this: |______|______|______|___
> _________________________
Into this: |______|______|______|__|
*/
if (axis.grid && axis.grid.isOuterAxis() && axis.axisLine) {
var lineWidth = options.lineWidth;
if (lineWidth) {
var linePath = axis.getLinePath(lineWidth);
var startPoint = linePath[0];
var endPoint = linePath[1];
// Negate distance if top or left axis
// Subtract 1px to draw the line at the end of the tick
var tickLength = (axis.tickSize('tick') || [1])[0];
var distance = (tickLength - 1) * ((axis.side === GridAxis.Side.top ||
axis.side === GridAxis.Side.left) ? -1 : 1);
// If axis is horizontal, reposition line path vertically
if (startPoint[0] === 'M' && endPoint[0] === 'L') {
if (axis.horiz) {
startPoint[2] += distance;
endPoint[2] += distance;
}
else {
// If axis is vertical, reposition line path
// horizontally
startPoint[1] += distance;
endPoint[1] += distance;
}
}
if (!axis.grid.axisLineExtra) {
axis.grid.axisLineExtra = renderer
.path(linePath)
.attr({
zIndex: 7
})
.addClass('highcharts-axis-line')
.add(axis.axisGroup);
if (!renderer.styledMode) {
axis.grid.axisLineExtra.attr({
stroke: options.lineColor,
'stroke-width': lineWidth
});
}
}
else {
axis.grid.axisLineExtra.animate({
d: linePath
});
}
// show or hide the line depending on
// options.showEmpty
axis.axisLine[axis.showAxis ? 'show' : 'hide'](true);
}
}
(grid && grid.columns || []).forEach(function (column) {
column.render();
});
}
};
/**
* @private
*/
GridAxis.onAfterSetAxisTranslation = function () {
var axis = this;
var tickInfo = axis.tickPositions && axis.tickPositions.info;
var options = axis.options;
var gridOptions = options.grid || {};
var userLabels = axis.userOptions.labels || {};
if (axis.horiz) {
if (gridOptions.enabled === true) {
axis.series.forEach(function (series) {
series.options.pointRange = 0;
});
}
// Lower level time ticks, like hours or minutes, represent
// points in time and not ranges. These should be aligned
// left in the grid cell by default. The same applies to
// years of higher order.
if (tickInfo &&
options.dateTimeLabelFormats &&
options.labels &&
!defined(userLabels.align) &&
(options.dateTimeLabelFormats[tickInfo.unitName].range === false ||
tickInfo.count > 1 // years
)) {
options.labels.align = 'left';
if (!defined(userLabels.x)) {
options.labels.x = 3;
}
}
}
};
/**
* Creates a left and right wall on horizontal axes:
* - Places leftmost tick at the start of the axis, to create a left
* wall
* - Ensures that the rightmost tick is at the end of the axis, to
* create a right wall.
* @private
*/
GridAxis.onAfterSetOptions = function (e) {
var options = this.options,
userOptions = e.userOptions,
gridAxisOptions,
gridOptions = ((options && isObject(options.grid)) ? options.grid : {});
if (gridOptions.enabled === true) {
// Merge the user options into default grid axis options so
// that when a user option is set, it takes presedence.
gridAxisOptions = merge(true, {
className: ('highcharts-grid-axis ' + (userOptions.className || '')),
dateTimeLabelFormats: {
hour: {
list: ['%H:%M', '%H']
},
day: {
list: ['%A, %e. %B', '%a, %e. %b', '%E']
},
week: {
list: ['Week %W', 'W%W']
},
month: {
list: ['%B', '%b', '%o']
}
},
grid: {
borderWidth: 1
},
labels: {
padding: 2,
style: {
fontSize: '13px'
}
},
margin: 0,
title: {
text: null,
reserveSpace: false,
rotation: 0
},
// In a grid axis, only allow one unit of certain types,
// for example we shouln't have one grid cell spanning
// two days.
units: [[
'millisecond',
[1, 10, 100]
], [
'second',
[1, 10]
], [
'minute',
[1, 5, 15]
], [
'hour',
[1, 6]
], [
'day',
[1]
], [
'week',
[1]
], [
'month',
[1]
], [
'year',
null
]]
}, userOptions);
// X-axis specific options
if (this.coll === 'xAxis') {
// For linked axes, tickPixelInterval is used only if
// the tickPositioner below doesn't run or returns
// undefined (like multiple years)
if (defined(userOptions.linkedTo) &&
!defined(userOptions.tickPixelInterval)) {
gridAxisOptions.tickPixelInterval = 350;
}
// For the secondary grid axis, use the primary axis'
// tick intervals and return ticks one level higher.
if (
// Check for tick pixel interval in options
!defined(userOptions.tickPixelInterval) &&
// Only for linked axes
defined(userOptions.linkedTo) &&
!defined(userOptions.tickPositioner) &&
!defined(userOptions.tickInterval)) {
gridAxisOptions.tickPositioner = function (min, max) {
var parentInfo = (this.linkedParent &&
this.linkedParent.tickPositions &&
this.linkedParent.tickPositions.info);
if (parentInfo) {
var unitIdx,
count,
unitName,
i,
units = gridAxisOptions.units,
unitRange;
for (i = 0; i < units.length; i++) {
if (units[i][0] ===
parentInfo.unitName) {
unitIdx = i;
break;
}
}
// Get the first allowed count on the next
// unit.
if (units[unitIdx + 1]) {
unitName = units[unitIdx + 1][0];
count =
(units[unitIdx + 1][1] || [1])[0];
// In case the base X axis shows years, make
// the secondary axis show ten times the
// years (#11427)
}
else if (parentInfo.unitName === 'year') {
unitName = 'year';
count = parentInfo.count * 10;
}
unitRange = timeUnits[unitName];
this.tickInterval = unitRange * count;
return this.getTimeTicks({
unitRange: unitRange,
count: count,
unitName: unitName
}, min, max, this.options.startOfWeek);
}
};
}
}
// Now merge the combined options into the axis options
merge(true, this.options, gridAxisOptions);
if (this.horiz) {
/* _________________________
Make this: ___|_____|_____|_____|__|
^ ^
_________________________
Into this: |_____|_____|_____|_____|
^ ^ */
options.minPadding = pick(userOptions.minPadding, 0);
options.maxPadding = pick(userOptions.maxPadding, 0);
}
// If borderWidth is set, then use its value for tick and
// line width.
if (isNumber(options.grid.borderWidth)) {
options.tickWidth = options.lineWidth = gridOptions.borderWidth;
}
}
};
/**
* @private
*/
GridAxis.onAfterSetOptions2 = function (e) {
var axis = this;
var userOptions = e.userOptions;
var gridOptions = userOptions && userOptions.grid || {};
var columns = gridOptions.columns;
// Add column options to the parent axis. Children has their column
// options set on init in onGridAxisAfterInit.
if (gridOptions.enabled && columns) {
merge(true, axis.options, columns[columns.length - 1]);
}
};
/**
* Handle columns and setScale.
* @private
*/
GridAxis.onAfterSetScale = function () {
var axis = this;
(axis.grid.columns || []).forEach(function (column) {
column.setScale();
});
};
/**
* Draw vertical axis ticks extra long to create cell floors and roofs.
* Overrides the tickLength for vertical axes.
* @private
*/
GridAxis.onAfterTickSize = function (e) {
var defaultLeftAxisOptions = Axis.defaultLeftAxisOptions;
var _a = this,
horiz = _a.horiz,
maxLabelDimensions = _a.maxLabelDimensions,
_b = _a.options.grid,
gridOptions = _b === void 0 ? {} : _b;
if (gridOptions.enabled && maxLabelDimensions) {
var labelPadding = (Math.abs(defaultLeftAxisOptions.labels.x) * 2);
var distance = horiz ?
gridOptions.cellHeight || labelPadding + maxLabelDimensions.height :
labelPadding + maxLabelDimensions.width;
if (isArray(e.tickSize)) {
e.tickSize[0] = distance;
}
else {
e.tickSize = [distance, 0];
}
}
};
/**
* @private
*/
GridAxis.onDestroy = function (e) {
var grid = this.grid;
(grid.columns || []).forEach(function (column) {
column.destroy(e.keepEvents);
});
grid.columns = void 0;
};
/**
* Wraps axis init to draw cell walls on vertical axes.
* @private
*/
GridAxis.onInit = function (e) {
var axis = this;
var userOptions = e.userOptions || {};
var gridOptions = userOptions.grid || {};
if (gridOptions.enabled && defined(gridOptions.borderColor)) {
userOptions.tickColor = userOptions.lineColor = gridOptions.borderColor;
}
if (!axis.grid) {
axis.grid = new GridAxisAdditions(axis);
}
};
/**
* Makes tick labels which are usually ignored in a linked axis
* displayed if they are within range of linkedParent.min.
* ```
* _____________________________
* | | | | |
* Make this: | | 2 | 3 | 4 |
* |___|_______|_______|_______|
* ^
* _____________________________
* | | | | |
* Into this: | 1 | 2 | 3 | 4 |
* |___|_______|_______|_______|
* ^
* ```
* @private
* @todo Does this function do what the drawing says? Seems to affect
* ticks and not the labels directly?
*/
GridAxis.onTrimTicks = function () {
var axis = this;
var options = axis.options;
var gridOptions = options.grid || {};
var categoryAxis = axis.categories;
var tickPositions = axis.tickPositions;
var firstPos = tickPositions[0];
var lastPos = tickPositions[tickPositions.length - 1];
var linkedMin = axis.linkedParent && axis.linkedParent.min;
var linkedMax = axis.linkedParent && axis.linkedParent.max;
var min = linkedMin || axis.min;
var max = linkedMax || axis.max;
var tickInterval = axis.tickInterval;
var endMoreThanMin = (firstPos < min &&
firstPos + tickInterval > min);
var startLessThanMax = (lastPos > max &&
lastPos - tickInterval < max);
if (gridOptions.enabled === true &&
!categoryAxis &&
(axis.horiz || axis.isLinked)) {
if (endMoreThanMin && !options.startOnTick) {
tickPositions[0] = min;
}
if (startLessThanMax && !options.endOnTick) {
tickPositions[tickPositions.length - 1] = max;
}
}
};
/**
* Avoid altering tickInterval when reserving space.
* @private
*/
GridAxis.wrapUnsquish = function (proceed) {
var axis = this;
var _a = axis.options.grid,
gridOptions = _a === void 0 ? {} : _a;
if (gridOptions.enabled === true && axis.categories) {
return axis.tickInterval;
}
return proceed.apply(axis, argsToArray(arguments));
};
return GridAxis;
}());
(function (GridAxis) {
/**
* Enum for which side the axis is on. Maps to axis.side.
* @private
*/
var Side;
(function (Side) {
Side[Side["top"] = 0] = "top";
Side[Side["right"] = 1] = "right";
Side[Side["bottom"] = 2] = "bottom";
Side[Side["left"] = 3] = "left";
})(Side = GridAxis.Side || (GridAxis.Side = {}));
})(GridAxis || (GridAxis = {}));
GridAxis.compose(Axis);
return GridAxis;
});
_registerModule(_modules, 'masters/modules/grid-axis.src.js', [], function () {
});
}));
+40
View File
@@ -0,0 +1,40 @@
/*
Highmaps JS v8.2.0 (2020-08-20)
(c) 2009-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/heatmap",["highcharts"],function(p){a(p);a.Highcharts=p;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function p(a,t,m,k){a.hasOwnProperty(t)||(a[t]=k.apply(null,m))}a=a?a._modules:{};p(a,"Mixins/ColorSeries.js",[a["Core/Globals.js"]],function(a){a.colorPointMixin={setVisible:function(a){var m=this,k=a?"show":"hide";
m.visible=m.options.visible=!!a;["graphic","dataLabel"].forEach(function(a){if(m[a])m[a][k]()});this.series.buildKDTree()}};a.colorSeriesMixin={optionalAxis:"colorAxis",colorAxis:0,translateColors:function(){var a=this,m=this.options.nullColor,k=this.colorAxis,x=this.colorKey;(this.data.length?this.data:this.points).forEach(function(q){var v=q.getNestedProperty(x);(v=q.options.color||(q.isNull||null===q.value?m:k&&"undefined"!==typeof v?k.toColor(v,q):q.color||a.color))&&q.color!==v&&(q.color=v,"point"===
a.options.legendType&&q.legendItem&&a.chart.legend.colorizeItem(q,q.visible))})}}});p(a,"Core/Axis/ColorAxis.js",[a["Core/Axis/Axis.js"],a["Core/Chart/Chart.js"],a["Core/Color.js"],a["Core/Globals.js"],a["Core/Legend.js"],a["Mixins/LegendSymbol.js"],a["Core/Series/Point.js"],a["Core/Utilities.js"]],function(a,t,m,k,y,q,v,r){var x=this&&this.__extends||function(){var c=function(b,d){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var f in b)b.hasOwnProperty(f)&&
(d[f]=b[f])};return c(b,d)};return function(b,d){function e(){this.constructor=b}c(b,d);b.prototype=null===d?Object.create(d):(e.prototype=d.prototype,new e)}}(),p=m.parse,B=k.noop;m=r.addEvent;var u=r.erase,w=r.extend,c=r.Fx,g=r.isNumber,C=r.merge,A=r.pick,n=r.splat;"";var l=k.Series;r=k.colorPointMixin;w(l.prototype,k.colorSeriesMixin);w(v.prototype,r);t.prototype.collectionsWithUpdate.push("colorAxis");t.prototype.collectionsWithInit.colorAxis=[t.prototype.addColorAxis];var h=function(c){function b(d,
b){var e=c.call(this,d,b)||this;e.beforePadding=!1;e.chart=void 0;e.coll="colorAxis";e.dataClasses=void 0;e.legendItem=void 0;e.legendItems=void 0;e.name="";e.options=void 0;e.stops=void 0;e.visible=!0;e.init(d,b);return e}x(b,c);b.buildOptions=function(d,e,b){d=d.options.legend||{};var f=b.layout?"vertical"!==b.layout:"vertical"!==d.layout;return C(e,{side:f?2:1,reversed:!f},b,{opposite:!f,showEmpty:!1,title:null,visible:d.enabled&&(b?!1!==b.visible:!0)})};b.prototype.init=function(d,e){var D=b.buildOptions(d,
b.defaultOptions,e);this.coll="colorAxis";c.prototype.init.call(this,d,D);e.dataClasses&&this.initDataClasses(e);this.initStops();this.horiz=!D.opposite;this.zoomEnabled=!1};b.prototype.initDataClasses=function(d){var b=this.chart,c,f=0,a=b.options.chart.colorCount,g=this.options,l=d.dataClasses.length;this.dataClasses=c=[];this.legendItems=[];d.dataClasses.forEach(function(d,e){d=C(d);c.push(d);if(b.styledMode||!d.color)"category"===g.dataClassColor?(b.styledMode||(e=b.options.colors,a=e.length,
d.color=e[f]),d.colorIndex=f,f++,f===a&&(f=0)):d.color=p(g.minColor).tweenTo(p(g.maxColor),2>l?.5:e/(l-1))})};b.prototype.hasData=function(){return!!(this.tickPositions||[]).length};b.prototype.setTickPositions=function(){if(!this.dataClasses)return c.prototype.setTickPositions.call(this)};b.prototype.initStops=function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];this.stops.forEach(function(d){d.color=p(d[1])})};b.prototype.setOptions=function(d){c.prototype.setOptions.call(this,
d);this.options.crosshair=this.options.marker};b.prototype.setAxisSize=function(){var d=this.legendSymbol,e=this.chart,c=e.options.legend||{},f,a;d?(this.left=c=d.attr("x"),this.top=f=d.attr("y"),this.width=a=d.attr("width"),this.height=d=d.attr("height"),this.right=e.chartWidth-c-a,this.bottom=e.chartHeight-f-d,this.len=this.horiz?a:d,this.pos=this.horiz?c:f):this.len=(this.horiz?c.symbolWidth:c.symbolHeight)||b.defaultLegendLength};b.prototype.normalizedValue=function(d){this.logarithmic&&(d=this.logarithmic.log2lin(d));
return 1-(this.max-d)/(this.max-this.min||1)};b.prototype.toColor=function(d,b){var c=this.dataClasses,e=this.stops,a;if(c)for(a=c.length;a--;){var g=c[a];var l=g.from;e=g.to;if(("undefined"===typeof l||d>=l)&&("undefined"===typeof e||d<=e)){var h=g.color;b&&(b.dataClass=a,b.colorIndex=g.colorIndex);break}}else{d=this.normalizedValue(d);for(a=e.length;a--&&!(d>e[a][0]););l=e[a]||e[a+1];e=e[a+1]||l;d=1-(e[0]-d)/(e[0]-l[0]||1);h=l.color.tweenTo(e.color,d)}return h};b.prototype.getOffset=function(){var d=
this.legendGroup,b=this.chart.axisOffset[this.side];d&&(this.axisParent=d,c.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=b)};b.prototype.setLegendColor=function(){var d=this.reversed,b=d?1:0;d=d?0:1;b=this.horiz?[b,0,d,0]:[0,d,0,b];this.legendColor={linearGradient:{x1:b[0],y1:b[1],x2:b[2],y2:b[3]},stops:this.stops}};b.prototype.drawLegendSymbol=function(d,c){var e=d.padding,f=d.options,a=this.horiz,g=A(f.symbolWidth,
a?b.defaultLegendLength:12),l=A(f.symbolHeight,a?12:b.defaultLegendLength),h=A(f.labelPadding,a?16:30);f=A(f.itemDistance,10);this.setLegendColor();c.legendSymbol=this.chart.renderer.rect(0,d.baseline-11,g,l).attr({zIndex:1}).add(c.legendGroup);this.legendItemWidth=g+e+(a?f:h);this.legendItemHeight=l+e+(a?h:0)};b.prototype.setState=function(d){this.series.forEach(function(b){b.setState(d)})};b.prototype.setVisible=function(){};b.prototype.getSeriesExtremes=function(){var b=this.series,c=b.length,
a;this.dataMin=Infinity;for(this.dataMax=-Infinity;c--;){var f=b[c];var g=f.colorKey=A(f.options.colorKey,f.colorKey,f.pointValKey,f.zoneAxis,"y");var h=f.pointArrayMap;var z=f[g+"Min"]&&f[g+"Max"];if(f[g+"Data"])var n=f[g+"Data"];else if(h){n=[];h=h.indexOf(g);var k=f.yData;if(0<=h&&k)for(a=0;a<k.length;a++)n.push(A(k[a][h],k[a]))}else n=f.yData;z?(f.minColorValue=f[g+"Min"],f.maxColorValue=f[g+"Max"]):(n=l.prototype.getExtremes.call(f,n),f.minColorValue=n.dataMin,f.maxColorValue=n.dataMax);"undefined"!==
typeof f.minColorValue&&(this.dataMin=Math.min(this.dataMin,f.minColorValue),this.dataMax=Math.max(this.dataMax,f.maxColorValue));z||l.prototype.applyExtremes.call(f)}};b.prototype.drawCrosshair=function(b,e){var d=e&&e.plotX,a=e&&e.plotY,g=this.pos,l=this.len;if(e){var h=this.toPixels(e.getNestedProperty(e.series.colorKey));h<g?h=g-2:h>g+l&&(h=g+l+2);e.plotX=h;e.plotY=this.len-h;c.prototype.drawCrosshair.call(this,b,e);e.plotX=d;e.plotY=a;this.cross&&!this.cross.addedToColorAxis&&this.legendGroup&&
(this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup),this.cross.addedToColorAxis=!0,!this.chart.styledMode&&this.crosshair&&this.cross.attr({fill:this.crosshair.color}))}};b.prototype.getPlotLinePath=function(b){var d=this.left,a=b.translatedValue,f=this.top;return g(a)?this.horiz?[["M",a-4,f-6],["L",a+4,f-6],["L",a,f],["Z"]]:[["M",d,a],["L",d-6,a+6],["L",d-6,a-6],["Z"]]:c.prototype.getPlotLinePath.call(this,b)};b.prototype.update=function(d,a){var e=this.chart,g=e.legend,l=b.buildOptions(e,
{},d);this.series.forEach(function(b){b.isDirtyData=!0});(d.dataClasses&&g.allItems||this.dataClasses)&&this.destroyItems();e.options[this.coll]=C(this.userOptions,l);c.prototype.update.call(this,l,a);this.legendItem&&(this.setLegendColor(),g.colorizeItem(this,!0))};b.prototype.destroyItems=function(){var b=this.chart;this.legendItem?b.legend.destroyItem(this):this.legendItems&&this.legendItems.forEach(function(d){b.legend.destroyItem(d)});b.isDirtyLegend=!0};b.prototype.remove=function(b){this.destroyItems();
c.prototype.remove.call(this,b)};b.prototype.getDataClassLegendSymbols=function(){var b=this,c=b.chart,a=b.legendItems,g=c.options.legend,l=g.valueDecimals,h=g.valueSuffix||"",n;a.length||b.dataClasses.forEach(function(d,g){var e=!0,f=d.from,z=d.to,k=c.numberFormatter;n="";"undefined"===typeof f?n="< ":"undefined"===typeof z&&(n="> ");"undefined"!==typeof f&&(n+=k(f,l)+h);"undefined"!==typeof f&&"undefined"!==typeof z&&(n+=" - ");"undefined"!==typeof z&&(n+=k(z,l)+h);a.push(w({chart:c,name:n,options:{},
drawLegendSymbol:q.drawRectangle,visible:!0,setState:B,isDataClass:!0,setVisible:function(){e=b.visible=!e;b.series.forEach(function(b){b.points.forEach(function(b){b.dataClass===g&&b.setVisible(e)})});c.legend.colorizeItem(this,e)}},d))});return a};b.defaultLegendLength=200;b.defaultOptions={lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{overflow:"justify",rotation:0},
minColor:"#e6ebf5",maxColor:"#003399",tickLength:5,showInLegend:!0};b.keepProps=["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"];return b}(a);Array.prototype.push.apply(a.keepProps,h.keepProps);k.ColorAxis=h;["fill","stroke"].forEach(function(a){c.prototype[a+"Setter"]=function(){this.elem.attr(a,p(this.start).tweenTo(p(this.end),this.pos),null,!0)}});m(t,"afterGetAxes",function(){var c=this,b=c.options;this.colorAxis=[];b.colorAxis&&(b.colorAxis=n(b.colorAxis),b.colorAxis.forEach(function(b,
a){b.index=a;new h(c,b)}))});m(l,"bindAxes",function(){var c=this.axisTypes;c?-1===c.indexOf("colorAxis")&&c.push("colorAxis"):this.axisTypes=["colorAxis"]});m(y,"afterGetAllItems",function(c){var b=[],d,a;(this.chart.colorAxis||[]).forEach(function(a){(d=a.options)&&d.showInLegend&&(d.dataClasses&&d.visible?b=b.concat(a.getDataClassLegendSymbols()):d.visible&&b.push(a),a.series.forEach(function(b){if(!b.options.showInLegend||d.dataClasses)"point"===b.options.legendType?b.points.forEach(function(b){u(c.allItems,
b)}):u(c.allItems,b)}))});for(a=b.length;a--;)c.allItems.unshift(b[a])});m(y,"afterColorizeItem",function(c){c.visible&&c.item.legendColor&&c.item.legendSymbol.attr({fill:c.item.legendColor})});m(y,"afterUpdate",function(){var c=this.chart.colorAxis;c&&c.forEach(function(b,c,a){b.update({},a)})});m(l,"afterTranslate",function(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()});return h});p(a,"Mixins/ColorMapSeries.js",[a["Core/Globals.js"],a["Core/Series/Point.js"],
a["Core/Utilities.js"]],function(a,p,m){var k=m.defined;m=a.noop;var x=a.seriesTypes;a.colorMapPointMixin={dataLabelOnNull:!0,isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value},setState:function(a){p.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})}};a.colorMapSeriesMixin={pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:m,parallelArrays:["x",
"y","value"],colorKey:"value",pointAttribs:x.column.prototype.pointAttribs,colorAttribs:function(a){var m={};k(a.color)&&(m[this.colorProp||"fill"]=a.color);return m}}});p(a,"Series/HeatmapSeries.js",[a["Core/Globals.js"],a["Mixins/LegendSymbol.js"],a["Core/Renderer/SVG/SVGRenderer.js"],a["Core/Utilities.js"]],function(a,p,m,k){var y=k.clamp,q=k.extend,v=k.fireEvent,r=k.isNumber,t=k.merge,x=k.pick;k=k.seriesType;"";var B=a.colorMapPointMixin,u=a.Series,w=m.prototype.symbols;k("heatmap","scatter",
{animation:!1,borderWidth:0,nullColor:"#f7f7f7",dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},marker:{symbol:"rect",radius:0,lineColor:void 0,states:{hover:{lineWidthPlus:0},select:{}}},clip:!0,pointRange:null,tooltip:{pointFormat:"{point.x}, {point.y}: {point.value}<br/>"},states:{hover:{halo:!1,brightness:.2}}},t(a.colorMapSeriesMixin,{pointArrayMap:["y","value"],hasPointSpecificOptions:!0,getExtremesFromAll:!0,directTouch:!0,
init:function(){u.prototype.init.apply(this,arguments);var a=this.options;a.pointRange=x(a.pointRange,a.colsize||1);this.yAxis.axisPointRange=a.rowsize||1;q(w,{ellipse:w.circle,rect:w.square})},getSymbol:u.prototype.getSymbol,setClip:function(a){var c=this.chart;u.prototype.setClip.apply(this,arguments);(!1!==this.options.clip||a)&&this.markerGroup.clip((a||this.clipBox)&&this.sharedClipKey?c[this.sharedClipKey]:c.clipRect)},translate:function(){var a=this.options,g=a.marker&&a.marker.symbol||"",
k=w[g]?g:"rect";a=this.options;var m=-1!==["circle","square"].indexOf(k);this.generatePoints();this.points.forEach(function(a){var c=a.getCellAttributes(),h={x:Math.min(c.x1,c.x2),y:Math.min(c.y1,c.y2),width:Math.max(Math.abs(c.x2-c.x1),0),height:Math.max(Math.abs(c.y2-c.y1),0)};var n=a.hasImage=0===(a.marker&&a.marker.symbol||g||"").indexOf("url");if(m){var b=Math.abs(h.width-h.height);h.x=Math.min(c.x1,c.x2)+(h.width<h.height?0:b/2);h.y=Math.min(c.y1,c.y2)+(h.width<h.height?b/2:0);h.width=h.height=
Math.min(h.width,h.height)}b={plotX:(c.x1+c.x2)/2,plotY:(c.y1+c.y2)/2,clientX:(c.x1+c.x2)/2,shapeType:"path",shapeArgs:t(!0,h,{d:w[k](h.x,h.y,h.width,h.height)})};n&&(a.marker={width:h.width,height:h.height});q(a,b)});v(this,"afterTranslate")},pointAttribs:function(c,g){var k=u.prototype.pointAttribs.call(this,c,g),m=this.options||{},n=this.chart.options.plotOptions||{},l=n.series||{},h=n.heatmap||{};n=m.borderColor||h.borderColor||l.borderColor;l=m.borderWidth||h.borderWidth||l.borderWidth||k["stroke-width"];
k.stroke=c&&c.marker&&c.marker.lineColor||m.marker&&m.marker.lineColor||n||this.color;k["stroke-width"]=l;g&&(c=t(m.states[g],m.marker&&m.marker.states[g],c.options.states&&c.options.states[g]||{}),g=c.brightness,k.fill=c.color||a.color(k.fill).brighten(g||0).get(),k.stroke=c.lineColor);return k},markerAttribs:function(a,g){var c=a.marker||{},k=this.options.marker||{},n=a.shapeArgs||{},l={};if(a.hasImage)return{x:a.plotX,y:a.plotY};if(g){var h=k.states[g]||{};var m=c.states&&c.states[g]||{};[["width",
"x"],["height","y"]].forEach(function(a){l[a[0]]=(m[a[0]]||h[a[0]]||n[a[0]])+(m[a[0]+"Plus"]||h[a[0]+"Plus"]||0);l[a[1]]=n[a[1]]+(n[a[0]]-l[a[0]])/2})}return g?l:n},drawPoints:function(){var a=this;if((this.options.marker||{}).enabled||this._hasPointMarkers)u.prototype.drawPoints.call(this),this.points.forEach(function(c){c.graphic&&c.graphic[a.chart.styledMode?"css":"animate"](a.colorAttribs(c))})},hasData:function(){return!!this.processedXData.length},getValidPoints:function(a,g){return u.prototype.getValidPoints.call(this,
a,g,!0)},getBox:a.noop,drawLegendSymbol:p.drawRectangle,alignDataLabel:a.seriesTypes.column.prototype.alignDataLabel,getExtremes:function(){var a=u.prototype.getExtremes.call(this,this.valueData),g=a.dataMin;a=a.dataMax;r(g)&&(this.valueMin=g);r(a)&&(this.valueMax=a);return u.prototype.getExtremes.call(this)}}),t(B,{applyOptions:function(c,g){c=a.Point.prototype.applyOptions.call(this,c,g);c.formatPrefix=c.isNull||null===c.value?"null":"point";return c},isValid:function(){return Infinity!==this.value&&
-Infinity!==this.value},haloPath:function(a){if(!a)return[];var c=this.shapeArgs;return["M",c.x-a,c.y-a,"L",c.x-a,c.y+c.height+a,c.x+c.width+a,c.y+c.height+a,c.x+c.width+a,c.y-a,"Z"]},getCellAttributes:function(){var a=this.series,g=a.options,k=(g.colsize||1)/2,m=(g.rowsize||1)/2,n=a.xAxis,l=a.yAxis,h=this.options.marker||a.options.marker;a=a.pointPlacementToXValue();var p=x(this.pointPadding,g.pointPadding,0),b={x1:y(Math.round(n.len-(n.translate(this.x-k,!1,!0,!1,!0,-a)||0)),-n.len,2*n.len),x2:y(Math.round(n.len-
(n.translate(this.x+k,!1,!0,!1,!0,-a)||0)),-n.len,2*n.len),y1:y(Math.round(l.translate(this.y-m,!1,!0,!1,!0)||0),-l.len,2*l.len),y2:y(Math.round(l.translate(this.y+m,!1,!0,!1,!0)||0),-l.len,2*l.len)};[["width","x"],["height","y"]].forEach(function(a){var c=a[0];a=a[1];var d=a+"1",f=a+"2",g=Math.abs(b[d]-b[f]),k=h&&h.lineWidth||0,l=Math.abs(b[d]+b[f])/2;h[c]&&h[c]<g&&(b[d]=l-h[c]/2-k/2,b[f]=l+h[c]/2+k/2);p&&("y"===a&&(d=f,f=a+"1"),b[d]+=p,b[f]-=p)});return b}}));""});p(a,"masters/modules/heatmap.src.js",
[],function(){})});
//# sourceMappingURL=heatmap.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+18
View File
@@ -0,0 +1,18 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
(c) 2010-2019 Highsoft AS
Author: Sebastian Domas
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/histogram-bellcurve",["highcharts"],function(c){a(c);a.Highcharts=c;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function c(f,a,d,c){f.hasOwnProperty(a)||(f[a]=c.apply(null,d))}a=a?a._modules:{};c(a,"Mixins/DerivedSeries.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,c){var f=c.addEvent,p=c.defined,
l=a.Series;return{hasDerivedData:!0,init:function(){l.prototype.init.apply(this,arguments);this.initialised=!1;this.baseSeries=null;this.eventRemovers=[];this.addEvents()},setDerivedData:a.noop,setBaseSeries:function(){var b=this.chart,a=this.options.baseSeries;this.baseSeries=p(a)&&(b.series[a]||b.get(a))||null},addEvents:function(){var b=this;var a=f(this.chart,"afterLinkSeries",function(){b.setBaseSeries();b.baseSeries&&!b.initialised&&(b.setDerivedData(),b.addBaseSeriesEvents(),b.initialised=
!0)});this.eventRemovers.push(a)},addBaseSeriesEvents:function(){var a=this;var c=f(a.baseSeries,"updatedData",function(){a.setDerivedData()});var d=f(a.baseSeries,"destroy",function(){a.baseSeries=null;a.initialised=!1});a.eventRemovers.push(c,d)},destroy:function(){this.eventRemovers.forEach(function(a){a()});l.prototype.destroy.apply(this,arguments)}}});c(a,"Series/HistogramSeries.js",[a["Core/Utilities.js"],a["Mixins/DerivedSeries.js"]],function(a,c){function f(a){return function(h){for(var b=
1;a[b]<=h;)b++;return a[--b]}}var p=a.arrayMax,l=a.arrayMin,b=a.correctFloat,m=a.isNumber,k=a.merge,r=a.objectEach;a=a.seriesType;var g={"square-root":function(a){return Math.ceil(Math.sqrt(a.options.data.length))},sturges:function(a){return Math.ceil(Math.log(a.options.data.length)*Math.LOG2E)},rice:function(a){return Math.ceil(2*Math.pow(a.options.data.length,1/3))}};a("histogram","column",{binsNumber:"square-root",binWidth:void 0,pointPadding:0,groupPadding:0,grouping:!1,pointPlacement:"between",
tooltip:{headerFormat:"",pointFormat:'<span style="font-size: 10px">{point.x} - {point.x2}</span><br/><span style="color:{point.color}">\u25cf</span> {series.name} <b>{point.y}</b><br/>'}},k(c,{setDerivedData:function(){var a=this.baseSeries.yData;a.length&&(a=this.derivedData(a,this.binsNumber(),this.options.binWidth),this.setData(a,!1))},derivedData:function(a,e,c){var h=p(a),g=b(l(a)),n=[],d={},k=[];c=this.binWidth=b(m(c)?c||1:(h-g)/e);this.options.pointRange=Math.max(c,0);for(e=g;e<h&&(this.userOptions.binWidth||
b(h-e)>=c||0>=b(b(g+n.length*c)-e));e=b(e+c))n.push(e),d[e]=0;0!==d[g]&&(n.push(b(g)),d[b(g)]=0);var q=f(n.map(function(a){return parseFloat(a)}));a.forEach(function(a){a=b(q(a));d[a]++});r(d,function(a,h){k.push({x:Number(h),y:a,x2:b(Number(h)+c)})});k.sort(function(a,h){return a.x-h.x});return k},binsNumber:function(){var a=this.options.binsNumber,b=g[a]||"function"===typeof a&&a;return Math.ceil(b&&b(this.baseSeries)||(m(a)?a:g["square-root"](this.baseSeries)))}}));""});c(a,"Series/BellcurveSeries.js",
[a["Core/Utilities.js"],a["Mixins/DerivedSeries.js"]],function(a,c){function d(a){var b=a.length;a=a.reduce(function(a,b){return a+b},0);return 0<b&&a/b}function f(a,b){var c=a.length;b=m(b)?b:d(a);a=a.reduce(function(a,c){c-=b;return a+c*c},0);return 1<c&&Math.sqrt(a/(c-1))}function l(a,b,c){a-=b;return Math.exp(-(a*a)/(2*c*c))/(c*Math.sqrt(2*Math.PI))}var b=a.correctFloat,m=a.isNumber,k=a.merge;a=a.seriesType;a("bellcurve","areaspline",{intervals:3,pointsInInterval:3,marker:{enabled:!1}},k(c,{setMean:function(){this.mean=
b(d(this.baseSeries.yData))},setStandardDeviation:function(){this.standardDeviation=b(f(this.baseSeries.yData,this.mean))},setDerivedData:function(){1<this.baseSeries.yData.length&&(this.setMean(),this.setStandardDeviation(),this.setData(this.derivedData(this.mean,this.standardDeviation),!1))},derivedData:function(a,b){var c=this.options.intervals,e=this.options.pointsInInterval,d=a-c*b;c=c*e*2+1;e=b/e;var f=[],g;for(g=0;g<c;g++)f.push([d,l(d,a,b)]),d+=e;return f}}));""});c(a,"masters/modules/histogram-bellcurve.src.js",
[],function(){})});
//# sourceMappingURL=histogram-bellcurve.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,522 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* (c) 2010-2019 Highsoft AS
* Author: Sebastian Domas
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/histogram-bellcurve', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Mixins/DerivedSeries.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {
/* *
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var addEvent = U.addEvent,
defined = U.defined;
var Series = H.Series,
noop = H.noop;
/* ************************************************************************** *
*
* DERIVED SERIES MIXIN
*
* ************************************************************************** */
/**
* Provides methods for auto setting/updating series data based on the based
* series data.
*
* @private
* @mixin derivedSeriesMixin
*/
var derivedSeriesMixin = {
hasDerivedData: true,
/* eslint-disable valid-jsdoc */
/**
* Initialise series
*
* @private
* @function derivedSeriesMixin.init
* @return {void}
*/
init: function () {
Series.prototype.init.apply(this,
arguments);
this.initialised = false;
this.baseSeries = null;
this.eventRemovers = [];
this.addEvents();
},
/**
* Method to be implemented - inside the method the series has already
* access to the base series via m `this.baseSeries` and the bases data is
* initialised. It should return data in the format accepted by
* `Series.setData()` method
*
* @private
* @function derivedSeriesMixin.setDerivedData
* @return {Array<Highcharts.PointOptionsType>}
* An array of data
*/
setDerivedData: noop,
/**
* Sets base series for the series
*
* @private
* @function derivedSeriesMixin.setBaseSeries
* @return {void}
*/
setBaseSeries: function () {
var chart = this.chart,
baseSeriesOptions = this.options.baseSeries,
baseSeries = (defined(baseSeriesOptions) &&
(chart.series[baseSeriesOptions] ||
chart.get(baseSeriesOptions)));
this.baseSeries = baseSeries || null;
},
/**
* Adds events for the series
*
* @private
* @function derivedSeriesMixin.addEvents
* @return {void}
*/
addEvents: function () {
var derivedSeries = this,
chartSeriesLinked;
chartSeriesLinked = addEvent(this.chart, 'afterLinkSeries', function () {
derivedSeries.setBaseSeries();
if (derivedSeries.baseSeries && !derivedSeries.initialised) {
derivedSeries.setDerivedData();
derivedSeries.addBaseSeriesEvents();
derivedSeries.initialised = true;
}
});
this.eventRemovers.push(chartSeriesLinked);
},
/**
* Adds events to the base series - it required for recalculating the data
* in the series if the base series is updated / removed / etc.
*
* @private
* @function derivedSeriesMixin.addBaseSeriesEvents
* @return {void}
*/
addBaseSeriesEvents: function () {
var derivedSeries = this,
updatedDataRemover,
destroyRemover;
updatedDataRemover = addEvent(derivedSeries.baseSeries, 'updatedData', function () {
derivedSeries.setDerivedData();
});
destroyRemover = addEvent(derivedSeries.baseSeries, 'destroy', function () {
derivedSeries.baseSeries = null;
derivedSeries.initialised = false;
});
derivedSeries.eventRemovers.push(updatedDataRemover, destroyRemover);
},
/**
* Destroys the series
*
* @private
* @function derivedSeriesMixin.destroy
*/
destroy: function () {
this.eventRemovers.forEach(function (remover) {
remover();
});
Series.prototype.destroy.apply(this, arguments);
}
/* eslint-disable valid-jsdoc */
};
return derivedSeriesMixin;
});
_registerModule(_modules, 'Series/HistogramSeries.js', [_modules['Core/Utilities.js'], _modules['Mixins/DerivedSeries.js']], function (U, derivedSeriesMixin) {
/* *
*
* Copyright (c) 2010-2017 Highsoft AS
* Author: Sebastian Domas
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var arrayMax = U.arrayMax,
arrayMin = U.arrayMin,
correctFloat = U.correctFloat,
isNumber = U.isNumber,
merge = U.merge,
objectEach = U.objectEach,
seriesType = U.seriesType;
/* ************************************************************************** *
* HISTOGRAM
* ************************************************************************** */
/**
* A dictionary with formulas for calculating number of bins based on the
* base series
**/
var binsNumberFormulas = {
'square-root': function (baseSeries) {
return Math.ceil(Math.sqrt(baseSeries.options.data.length));
},
'sturges': function (baseSeries) {
return Math.ceil(Math.log(baseSeries.options.data.length) * Math.LOG2E);
},
'rice': function (baseSeries) {
return Math.ceil(2 * Math.pow(baseSeries.options.data.length, 1 / 3));
}
};
/**
* Returns a function for mapping number to the closed (right opened) bins
* @private
* @param {Array<number>} bins - Width of the bins
* @return {Function}
**/
function fitToBinLeftClosed(bins) {
return function (y) {
var i = 1;
while (bins[i] <= y) {
i++;
}
return bins[--i];
};
}
/**
* Histogram class
* @private
* @class
* @name Highcharts.seriesTypes.histogram
* @augments Highcharts.Series
*/
seriesType('histogram', 'column',
/**
* A histogram is a column series which represents the distribution of the
* data set in the base series. Histogram splits data into bins and shows
* their frequencies.
*
* @sample {highcharts} highcharts/demo/histogram/
* Histogram
*
* @extends plotOptions.column
* @excluding boostThreshold, dragDrop, pointInterval, pointIntervalUnit,
* stacking, boostBlending
* @product highcharts
* @since 6.0.0
* @requires modules/histogram
* @optionparent plotOptions.histogram
*/
{
/**
* A preferable number of bins. It is a suggestion, so a histogram may
* have a different number of bins. By default it is set to the square
* root of the base series' data length. Available options are:
* `square-root`, `sturges`, `rice`. You can also define a function
* which takes a `baseSeries` as a parameter and should return a
* positive integer.
*
* @type {"square-root"|"sturges"|"rice"|number|function}
*/
binsNumber: 'square-root',
/**
* Width of each bin. By default the bin's width is calculated as
* `(max - min) / number of bins`. This option takes precedence over
* [binsNumber](#plotOptions.histogram.binsNumber).
*
* @type {number}
*/
binWidth: void 0,
pointPadding: 0,
groupPadding: 0,
grouping: false,
pointPlacement: 'between',
tooltip: {
headerFormat: '',
pointFormat: ('<span style="font-size: 10px">{point.x} - {point.x2}' +
'</span><br/>' +
'<span style="color:{point.color}">\u25CF</span>' +
' {series.name} <b>{point.y}</b><br/>')
}
}, merge(derivedSeriesMixin, {
setDerivedData: function () {
var yData = this.baseSeries.yData;
if (!yData.length) {
return;
}
var data = this.derivedData(yData,
this.binsNumber(),
this.options.binWidth);
this.setData(data, false);
},
derivedData: function (baseData, binsNumber, binWidth) {
var series = this,
max = arrayMax(baseData),
// Float correction needed, because first frequency value is not
// corrected when generating frequencies (within for loop).
min = correctFloat(arrayMin(baseData)),
frequencies = [],
bins = {},
data = [],
x,
fitToBin;
binWidth = series.binWidth = (correctFloat(isNumber(binWidth) ?
(binWidth || 1) :
(max - min) / binsNumber));
// #12077 negative pointRange causes wrong calculations,
// browser hanging.
series.options.pointRange = Math.max(binWidth, 0);
// If binWidth is 0 then max and min are equaled,
// increment the x with some positive value to quit the loop
for (x = min;
// This condition is needed because of the margin of error while
// operating on decimal numbers. Without that, additional bin
// was sometimes noticeable on the graph, because of too small
// precision of float correction.
x < max &&
(series.userOptions.binWidth ||
correctFloat(max - x) >= binWidth ||
// #13069 - Every add and subtract operation should
// be corrected, due to general problems with
// operations on float numbers in JS.
correctFloat(correctFloat(min + (frequencies.length * binWidth)) -
x) <= 0); x = correctFloat(x + binWidth)) {
frequencies.push(x);
bins[x] = 0;
}
if (bins[min] !== 0) {
frequencies.push(correctFloat(min));
bins[correctFloat(min)] = 0;
}
fitToBin = fitToBinLeftClosed(frequencies.map(function (elem) {
return parseFloat(elem);
}));
baseData.forEach(function (y) {
var x = correctFloat(fitToBin(y));
bins[x]++;
});
objectEach(bins, function (frequency, x) {
data.push({
x: Number(x),
y: frequency,
x2: correctFloat(Number(x) + binWidth)
});
});
data.sort(function (a, b) {
return a.x - b.x;
});
return data;
},
binsNumber: function () {
var binsNumberOption = this.options.binsNumber;
var binsNumber = binsNumberFormulas[binsNumberOption] ||
// #7457
(typeof binsNumberOption === 'function' && binsNumberOption);
return Math.ceil((binsNumber && binsNumber(this.baseSeries)) ||
(isNumber(binsNumberOption) ?
binsNumberOption :
binsNumberFormulas['square-root'](this.baseSeries)));
}
}));
/**
* A `histogram` series. If the [type](#series.histogram.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.histogram
* @excluding data, dataParser, dataURL, boostThreshold, boostBlending
* @product highcharts
* @since 6.0.0
* @requires modules/histogram
* @apioption series.histogram
*/
/**
* An integer identifying the index to use for the base series, or a string
* representing the id of the series.
*
* @type {number|string}
* @apioption series.histogram.baseSeries
*/
''; // adds doclets above to transpiled file
});
_registerModule(_modules, 'Series/BellcurveSeries.js', [_modules['Core/Utilities.js'], _modules['Mixins/DerivedSeries.js']], function (U, derivedSeriesMixin) {
/* *
*
* (c) 2010-2020 Highsoft AS
*
* Author: Sebastian Domas
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var correctFloat = U.correctFloat,
isNumber = U.isNumber,
merge = U.merge,
seriesType = U.seriesType;
/* ************************************************************************** *
* BELL CURVE *
* ************************************************************************** */
/* eslint-disable valid-jsdoc */
/**
* @private
*/
function mean(data) {
var length = data.length,
sum = data.reduce(function (sum,
value) {
return (sum += value);
}, 0);
return length > 0 && sum / length;
}
/**
* @private
*/
function standardDeviation(data, average) {
var len = data.length,
sum;
average = isNumber(average) ? average : mean(data);
sum = data.reduce(function (sum, value) {
var diff = value - average;
return (sum += diff * diff);
}, 0);
return len > 1 && Math.sqrt(sum / (len - 1));
}
/**
* @private
*/
function normalDensity(x, mean, standardDeviation) {
var translation = x - mean;
return Math.exp(-(translation * translation) /
(2 * standardDeviation * standardDeviation)) / (standardDeviation * Math.sqrt(2 * Math.PI));
}
/* eslint-enable valid-jsdoc */
/**
* Bell curve class
*
* @private
* @class
* @name Highcharts.seriesTypes.bellcurve
*
* @augments Highcharts.Series
*/
seriesType('bellcurve', 'areaspline'
/**
* A bell curve is an areaspline series which represents the probability
* density function of the normal distribution. It calculates mean and
* standard deviation of the base series data and plots the curve according
* to the calculated parameters.
*
* @sample {highcharts} highcharts/demo/bellcurve/
* Bell curve
*
* @extends plotOptions.areaspline
* @since 6.0.0
* @product highcharts
* @excluding boostThreshold, connectNulls, dragDrop, stacking,
* pointInterval, pointIntervalUnit
* @requires modules/bellcurve
* @optionparent plotOptions.bellcurve
*/
, {
/**
* This option allows to define the length of the bell curve. A unit of
* the length of the bell curve is standard deviation.
*
* @sample highcharts/plotoptions/bellcurve-intervals-pointsininterval
* Intervals and points in interval
*/
intervals: 3,
/**
* Defines how many points should be plotted within 1 interval. See
* `plotOptions.bellcurve.intervals`.
*
* @sample highcharts/plotoptions/bellcurve-intervals-pointsininterval
* Intervals and points in interval
*/
pointsInInterval: 3,
marker: {
enabled: false
}
}, merge(derivedSeriesMixin, {
setMean: function () {
this.mean = correctFloat(mean(this.baseSeries.yData));
},
setStandardDeviation: function () {
this.standardDeviation = correctFloat(standardDeviation(this.baseSeries.yData, this.mean));
},
setDerivedData: function () {
if (this.baseSeries.yData.length > 1) {
this.setMean();
this.setStandardDeviation();
this.setData(this.derivedData(this.mean, this.standardDeviation), false);
}
return (void 0);
},
derivedData: function (mean, standardDeviation) {
var intervals = this.options.intervals,
pointsInInterval = this.options.pointsInInterval,
x = mean - intervals * standardDeviation,
stop = intervals * pointsInInterval * 2 + 1,
increment = standardDeviation / pointsInInterval,
data = [],
i;
for (i = 0; i < stop; i++) {
data.push([x, normalDensity(x, mean, standardDeviation)]);
x += increment;
}
return data;
}
}));
/**
* A `bellcurve` series. If the [type](#series.bellcurve.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* For options that apply to multiple series, it is recommended to add
* them to the [plotOptions.series](#plotOptions.series) options structure.
* To apply to all series of this specific type, apply it to
* [plotOptions.bellcurve](#plotOptions.bellcurve).
*
* @extends series,plotOptions.bellcurve
* @since 6.0.0
* @product highcharts
* @excluding dataParser, dataURL, data, boostThreshold, boostBlending
* @requires modules/bellcurve
* @apioption series.bellcurve
*/
/**
* An integer identifying the index to use for the base series, or a string
* representing the id of the series.
*
* @type {number|string}
* @apioption series.bellcurve.baseSeries
*/
''; // adds doclets above to transpiled file
});
_registerModule(_modules, 'masters/modules/histogram-bellcurve.src.js', [], function () {
});
}));
+18
View File
@@ -0,0 +1,18 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Item series type for Highcharts
(c) 2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/item-series",["highcharts"],function(d){b(d);b.Highcharts=d;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function d(b,d,c,C){b.hasOwnProperty(d)||(b[d]=C.apply(null,c))}b=b?b._modules:{};d(b,"Series/ItemSeries.js",[b["Core/Globals.js"],b["Core/Options.js"],b["Core/Utilities.js"]],function(b,d,c){var C=c.defined,F=
c.extend,G=c.fireEvent,D=c.isNumber,H=c.merge,I=c.objectEach,J=c.pick;c=c.seriesType;var m=b.seriesTypes.pie.prototype.pointClass.prototype;c("item","pie",{endAngle:void 0,innerSize:"40%",itemPadding:.1,layout:"vertical",marker:H(d.defaultOptions.plotOptions.line.marker,{radius:null}),rows:void 0,crisp:!1,showInLegend:!0,startAngle:void 0},{markerAttribs:void 0,translate:function(a){0===this.total&&(this.center=this.getCenter());this.slots||(this.slots=[]);D(this.options.startAngle)&&D(this.options.endAngle)?
(b.seriesTypes.pie.prototype.translate.apply(this,arguments),this.slots=this.getSlots()):(this.generatePoints(),G(this,"afterTranslate"))},getSlots:function(){function a(a){0<B&&(a.row.colCount--,B--)}for(var b=this.center,c=b[2],d=b[3],x,n=this.slots,r,y,t,u,v,f,l,w,h=0,p,z=this.endAngleRad-this.startAngleRad,q=Number.MAX_VALUE,A,e,k,g=this.options.rows,m=(c-d)/c,E=0===z%(2*Math.PI);q>this.total+(e&&E?e.length:0);)for(A=q,q=n.length=0,e=k,k=[],h++,p=c/h/2,g?(d=(p-g)/p*c,0<=d?p=g:(d=0,m=1)):p=Math.floor(p*
m),x=p;0<x;x--)t=(d+x/p*(c-d-h))/2,u=z*t,v=Math.ceil(u/h),k.push({rowRadius:t,rowLength:u,colCount:v}),q+=v+1;if(e){for(var B=A-this.total-(E?e.length:0);0<B;)e.map(function(a){return{angle:a.colCount/a.rowLength,row:a}}).sort(function(a,b){return b.angle-a.angle}).slice(0,Math.min(B,Math.ceil(e.length/2))).forEach(a);e.forEach(function(a){var c=a.rowRadius;f=(a=a.colCount)?z/a:0;for(w=0;w<=a;w+=1)l=this.startAngleRad+w*f,r=b[0]+Math.cos(l)*c,y=b[1]+Math.sin(l)*c,n.push({x:r,y:y,angle:l})},this);
n.sort(function(a,b){return a.angle-b.angle});this.itemSize=h;return n}},getRows:function(){var a=this.options.rows;if(!a){var b=this.chart.plotWidth/this.chart.plotHeight;a=Math.sqrt(this.total);if(1<b)for(a=Math.ceil(a);0<a;){var c=this.total/a;if(c/a>b)break;a--}else for(a=Math.floor(a);a<this.total;){c=this.total/a;if(c/a<b)break;a++}}return a},drawPoints:function(){var a=this,b=this.options,c=a.chart.renderer,d=b.marker,m=this.borderWidth%2?.5:1,n=0,r=this.getRows(),y=Math.ceil(this.total/r),
t=this.chart.plotWidth/y,u=this.chart.plotHeight/r,v=this.itemSize||Math.min(t,u);this.points.forEach(function(f){var l,w,h=f.marker||{},p=h.symbol||d.symbol;h=J(h.radius,d.radius);var z=C(h)?2*h:v,q=z*b.itemPadding,A;f.graphics=l=f.graphics||{};a.chart.styledMode||(w=a.pointAttribs(f,f.selected&&"select"));if(!f.isNull&&f.visible){f.graphic||(f.graphic=c.g("point").add(a.group));for(var e=0;e<f.y;e++){if(a.center&&a.slots){var k=a.slots.shift();var g=k.x-v/2;k=k.y-v/2}else"horizontal"===b.layout?
(g=n%y*t,k=u*Math.floor(n/y)):(g=t*Math.floor(n/r),k=n%r*u);g+=q;k+=q;var x=A=Math.round(z-2*q);a.options.crisp&&(g=Math.round(g)-m,k=Math.round(k)+m);g={x:g,y:k,width:A,height:x};"undefined"!==typeof h&&(g.r=h);l[e]?l[e].animate(g):l[e]=c.symbol(p,null,null,null,null,{backgroundSize:"within"}).attr(F(g,w)).add(f.graphic);l[e].isActive=!0;n++}}I(l,function(a,b){a.isActive?a.isActive=!1:(a.destroy(),delete l[b])})})},drawDataLabels:function(){this.center&&this.slots?b.seriesTypes.pie.prototype.drawDataLabels.call(this):
this.points.forEach(function(a){a.destroyElements({dataLabel:1})})},animate:function(a){a?this.group.attr({opacity:0}):this.group.animate({opacity:1},this.options.animation)}},{connectorShapes:m.connectorShapes,getConnectorPath:m.getConnectorPath,setVisible:m.setVisible,getTranslate:m.getTranslate});""});d(b,"masters/modules/item-series.src.js",[],function(){})});
//# sourceMappingURL=item-series.js.map
File diff suppressed because one or more lines are too long
+544
View File
@@ -0,0 +1,544 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* Item series type for Highcharts
*
* (c) 2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/item-series', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Series/ItemSeries.js', [_modules['Core/Globals.js'], _modules['Core/Options.js'], _modules['Core/Utilities.js']], function (H, O, U) {
/* *
*
* (c) 2020 Torstein Honsi
*
* Item series type for Highcharts
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var defaultOptions = O.defaultOptions;
var defined = U.defined,
extend = U.extend,
fireEvent = U.fireEvent,
isNumber = U.isNumber,
merge = U.merge,
objectEach = U.objectEach,
pick = U.pick,
seriesType = U.seriesType;
var piePoint = H.seriesTypes.pie.prototype.pointClass.prototype;
/**
* The item series type.
*
* @requires module:modules/item-series
*
* @private
* @class
* @name Highcharts.seriesTypes.item
*
* @augments Highcharts.seriesTypes.pie
*/
seriesType('item',
// Inherits pie as the most tested non-cartesian series with individual
// point legend, tooltips etc. Only downside is we need to re-enable
// marker options.
'pie',
/**
* An item chart is an infographic chart where a number of items are laid
* out in either a rectangular or circular pattern. It can be used to
* visualize counts within a group, or for the circular pattern, typically
* a parliament.
*
* The circular layout has much in common with a pie chart. Many of the item
* series options, like `center`, `size` and data label positioning, are
* inherited from the pie series and don't apply for rectangular layouts.
*
* @sample highcharts/demo/parliament-chart
* Parliament chart (circular item chart)
* @sample highcharts/series-item/rectangular
* Rectangular item chart
* @sample highcharts/series-item/symbols
* Infographic with symbols
*
* @extends plotOptions.pie
* @since 7.1.0
* @product highcharts
* @excluding borderColor, borderWidth, depth, linecap, shadow,
* slicedOffset
* @requires modules/item-series
* @optionparent plotOptions.item
*/
{
/**
* In circular view, the end angle of the item layout, in degrees where
* 0 is up.
*
* @sample highcharts/demo/parliament-chart
* Parliament chart
* @type {undefined|number}
*/
endAngle: void 0,
/**
* In circular view, the size of the inner diameter of the circle. Can
* be a percentage or pixel value. Percentages are relative to the outer
* perimeter. Pixel values are given as integers.
*
* If the `rows` option is set, it overrides the `innerSize` setting.
*
* @sample highcharts/demo/parliament-chart
* Parliament chart
* @type {string|number}
*/
innerSize: '40%',
/**
* The padding between the items, given in relative size where the size
* of the item is 1.
* @type {number}
*/
itemPadding: 0.1,
/**
* The layout of the items in rectangular view. Can be either
* `horizontal` or `vertical`.
* @sample highcharts/series-item/symbols
* Horizontal layout
* @type {string}
*/
layout: 'vertical',
/**
* @extends plotOptions.series.marker
*/
marker: merge(defaultOptions.plotOptions.line.marker, {
radius: null
}),
/**
* The number of rows to display in the rectangular or circular view. If
* the `innerSize` is set, it will be overridden by the `rows` setting.
*
* @sample highcharts/series-item/rows-columns
* Fixed row count
* @type {number}
*/
rows: void 0,
crisp: false,
showInLegend: true,
/**
* In circular view, the start angle of the item layout, in degrees
* where 0 is up.
*
* @sample highcharts/demo/parliament-chart
* Parliament chart
* @type {undefined|number}
*/
startAngle: void 0
},
// Prototype members
{
markerAttribs: void 0,
translate: function (positions) {
// Initialize chart without setting data, #13379.
if (this.total === 0) {
this.center = this.getCenter();
}
if (!this.slots) {
this.slots = [];
}
if (isNumber(this.options.startAngle) &&
isNumber(this.options.endAngle)) {
H.seriesTypes.pie.prototype.translate.apply(this, arguments);
this.slots = this.getSlots();
}
else {
this.generatePoints();
fireEvent(this, 'afterTranslate');
}
},
// Get the semi-circular slots
getSlots: function () {
var center = this.center,
diameter = center[2],
innerSize = center[3],
row,
slots = this.slots,
x,
y,
rowRadius,
rowLength,
colCount,
increment,
angle,
col,
itemSize = 0,
rowCount,
fullAngle = (this.endAngleRad - this.startAngleRad),
itemCount = Number.MAX_VALUE,
finalItemCount,
rows,
testRows,
rowsOption = this.options.rows,
// How many rows (arcs) should be used
rowFraction = (diameter - innerSize) / diameter,
isCircle = fullAngle % (2 * Math.PI) === 0;
// Increase the itemSize until we find the best fit
while (itemCount > this.total + (rows && isCircle ? rows.length : 0)) {
finalItemCount = itemCount;
// Reset
slots.length = 0;
itemCount = 0;
// Now rows is the last successful run
rows = testRows;
testRows = [];
itemSize++;
// Total number of rows (arcs) from the center to the
// perimeter
rowCount = diameter / itemSize / 2;
if (rowsOption) {
innerSize = ((rowCount - rowsOption) / rowCount) * diameter;
if (innerSize >= 0) {
rowCount = rowsOption;
// If innerSize is negative, we are trying to set too
// many rows in the rows option, so fall back to
// treating it as innerSize 0
}
else {
innerSize = 0;
rowFraction = 1;
}
}
else {
rowCount = Math.floor(rowCount * rowFraction);
}
for (row = rowCount; row > 0; row--) {
rowRadius = (innerSize + (row / rowCount) *
(diameter - innerSize - itemSize)) / 2;
rowLength = fullAngle * rowRadius;
colCount = Math.ceil(rowLength / itemSize);
testRows.push({
rowRadius: rowRadius,
rowLength: rowLength,
colCount: colCount
});
itemCount += colCount + 1;
}
}
if (!rows) {
return;
}
// We now have more slots than we have total items. Loop over
// the rows and remove the last slot until the count is correct.
// For each iteration we sort the last slot by the angle, and
// remove those with the highest angles.
var overshoot = finalItemCount - this.total -
(isCircle ? rows.length : 0);
/**
* @private
* @param {Highcharts.ItemRowContainerObject} item
* Wrapped object with angle and row
* @return {void}
*/
function cutOffRow(item) {
if (overshoot > 0) {
item.row.colCount--;
overshoot--;
}
}
while (overshoot > 0) {
rows
// Return a simplified representation of the angle of
// the last slot within each row.
.map(function (row) {
return {
angle: row.colCount / row.rowLength,
row: row
};
})
// Sort by the angles...
.sort(function (a, b) {
return b.angle - a.angle;
})
// ...so that we can ignore the items with the lowest
// angles...
.slice(0, Math.min(overshoot, Math.ceil(rows.length / 2)))
// ...and remove the ones with the highest angles
.forEach(cutOffRow);
}
rows.forEach(function (row) {
var rowRadius = row.rowRadius,
colCount = row.colCount;
increment = colCount ? fullAngle / colCount : 0;
for (col = 0; col <= colCount; col += 1) {
angle = this.startAngleRad + col * increment;
x = center[0] + Math.cos(angle) * rowRadius;
y = center[1] + Math.sin(angle) * rowRadius;
slots.push({ x: x, y: y, angle: angle });
}
}, this);
// Sort by angle
slots.sort(function (a, b) {
return a.angle - b.angle;
});
this.itemSize = itemSize;
return slots;
},
getRows: function () {
var rows = this.options.rows,
cols,
ratio;
// Get the row count that gives the most square cells
if (!rows) {
ratio = this.chart.plotWidth / this.chart.plotHeight;
rows = Math.sqrt(this.total);
if (ratio > 1) {
rows = Math.ceil(rows);
while (rows > 0) {
cols = this.total / rows;
if (cols / rows > ratio) {
break;
}
rows--;
}
}
else {
rows = Math.floor(rows);
while (rows < this.total) {
cols = this.total / rows;
if (cols / rows < ratio) {
break;
}
rows++;
}
}
}
return rows;
},
drawPoints: function () {
var series = this,
options = this.options,
renderer = series.chart.renderer,
seriesMarkerOptions = options.marker,
borderWidth = this.borderWidth,
crisp = borderWidth % 2 ? 0.5 : 1,
i = 0,
rows = this.getRows(),
cols = Math.ceil(this.total / rows),
cellWidth = this.chart.plotWidth / cols,
cellHeight = this.chart.plotHeight / rows,
itemSize = this.itemSize || Math.min(cellWidth,
cellHeight);
/*
this.slots.forEach(slot => {
this.chart.renderer.circle(slot.x, slot.y, 6)
.attr({
fill: 'silver'
})
.add(this.group);
});
//*/
this.points.forEach(function (point) {
var attr,
graphics,
pointAttr,
pointMarkerOptions = point.marker || {},
symbol = (pointMarkerOptions.symbol ||
seriesMarkerOptions.symbol),
r = pick(pointMarkerOptions.radius,
seriesMarkerOptions.radius),
size = defined(r) ? 2 * r : itemSize,
padding = size * options.itemPadding,
x,
y,
width,
height;
point.graphics = graphics = point.graphics || {};
if (!series.chart.styledMode) {
pointAttr = series.pointAttribs(point, point.selected && 'select');
}
if (!point.isNull && point.visible) {
if (!point.graphic) {
point.graphic = renderer.g('point')
.add(series.group);
}
for (var val = 0; val < point.y; val++) {
// Semi-circle
if (series.center && series.slots) {
// Fill up the slots from left to right
var slot = series.slots.shift();
x = slot.x - itemSize / 2;
y = slot.y - itemSize / 2;
}
else if (options.layout === 'horizontal') {
x = cellWidth * (i % cols);
y = cellHeight * Math.floor(i / cols);
}
else {
x = cellWidth * Math.floor(i / rows);
y = cellHeight * (i % rows);
}
x += padding;
y += padding;
width = Math.round(size - 2 * padding);
height = width;
if (series.options.crisp) {
x = Math.round(x) - crisp;
y = Math.round(y) + crisp;
}
attr = {
x: x,
y: y,
width: width,
height: height
};
if (typeof r !== 'undefined') {
attr.r = r;
}
if (graphics[val]) {
graphics[val].animate(attr);
}
else {
graphics[val] = renderer
.symbol(symbol, null, null, null, null, {
backgroundSize: 'within'
})
.attr(extend(attr, pointAttr))
.add(point.graphic);
}
graphics[val].isActive = true;
i++;
}
}
objectEach(graphics, function (graphic, key) {
if (!graphic.isActive) {
graphic.destroy();
delete graphics[key];
}
else {
graphic.isActive = false;
}
});
});
},
drawDataLabels: function () {
if (this.center && this.slots) {
H.seriesTypes.pie.prototype.drawDataLabels.call(this);
// else, it's just a dot chart with no natural place to put the
// data labels
}
else {
this.points.forEach(function (point) {
point.destroyElements({ dataLabel: 1 });
});
}
},
// Fade in the whole chart
animate: function (init) {
if (init) {
this.group.attr({
opacity: 0
});
}
else {
this.group.animate({
opacity: 1
}, this.options.animation);
}
}
},
// Point class
{
connectorShapes: piePoint.connectorShapes,
getConnectorPath: piePoint.getConnectorPath,
setVisible: piePoint.setVisible,
getTranslate: piePoint.getTranslate
});
/**
* An `item` series. If the [type](#series.item.type) option is not specified,
* it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.item
* @excluding dataParser, dataURL, stack, xAxis, yAxis, dataSorting,
* boostThreshold, boostBlending
* @product highcharts
* @requires modules/item-series
* @apioption series.item
*/
/**
* An array of data points for the series. For the `item` series type,
* points can be given in the following ways:
*
* 1. An array of numerical values. In this case, the numerical values will be
* interpreted as `y` options. Example:
* ```js
* data: [0, 5, 3, 5]
* ```
*
* 2. An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of
* data points exceeds the series'
* [turboThreshold](#series.item.turboThreshold),
* this option is not available.
* ```js
* data: [{
* y: 1,
* name: "Point2",
* color: "#00FF00"
* }, {
* y: 7,
* name: "Point1",
* color: "#FF00FF"
* }]
* ```
*
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-arrays/
* Arrays of numeric x and y
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
* Arrays of datetime x and y
* @sample {highcharts} highcharts/series/data-array-of-name-value/
* Arrays of point.name and y
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
*
* @type {Array<number|Array<string,(number|null)>|null|*>}
* @extends series.pie.data
* @excludes sliced
* @product highcharts
* @apioption series.item.data
*/
/**
* The sequential index of the data point in the legend.
*
* @type {number}
* @product highcharts
* @apioption series.pie.data.legendIndex
*/
''; // adds the doclets above to the transpiled file
});
_registerModule(_modules, 'masters/modules/item-series.src.js', [], function () {
});
}));
+11
View File
@@ -0,0 +1,11 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
(c) 2009-2019 Sebastian Bochan, Rafal Sebestjanski
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/lollipop",["highcharts"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,f,b,c){a.hasOwnProperty(f)||(a[f]=c.apply(null,b))}a=a?a._modules:{};b(a,"Series/LollipopSeries.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,b){b=b.seriesType;var e=a.seriesTypes.area.prototype,
c=a.seriesTypes.column.prototype;b("lollipop","dumbbell",{lowColor:void 0,threshold:0,connectorWidth:1,groupPadding:.2,pointPadding:.1,states:{hover:{lineWidthPlus:0,connectorWidthPlus:1,halo:!1}},tooltip:{pointFormat:'<span style="color:{series.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>'}},{pointArrayMap:["y"],pointValKey:"y",toYData:function(b){return[a.pick(b.y,b.low)]},translatePoint:e.translate,drawPoint:e.drawPoints,drawDataLabels:c.drawDataLabels,setShapeArgs:c.translate},{pointSetState:e.pointClass.prototype.setState,
setState:a.seriesTypes.dumbbell.prototype.pointClass.prototype.setState,init:function(b,d,c){a.isObject(d)&&"low"in d&&(d.y=d.low,delete d.low);return a.Point.prototype.init.apply(this,arguments)}});""});b(a,"masters/modules/lollipop.src.js",[],function(){})});
//# sourceMappingURL=lollipop.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"lollipop.js.map","lineCount":10,"mappings":"A;;;;;;;AAQC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,6BAAP,CAAsC,CAAC,YAAD,CAAtC,CAAsD,QAAS,CAACE,CAAD,CAAa,CACxEL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAHiE,CAA5E,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC,QAAS,CAACD,CAAD,CAAa,CAEpBE,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAkBC,CAAlB,CAAsB,CACrCH,CAAAI,eAAA,CAAmBH,CAAnB,CAAL,GACID,CAAA,CAAIC,CAAJ,CADJ,CACgBE,CAAAE,MAAA,CAAS,IAAT,CAAeH,CAAf,CADhB,CAD0C,CAD1CI,CAAAA,CAAWT,CAAA,CAAaA,CAAAS,SAAb,CAAmC,EAMlDP,EAAA,CAAgBO,CAAhB,CAA0B,0BAA1B,CAAsD,CAACA,CAAA,CAAS,iBAAT,CAAD,CAA8BA,CAAA,CAAS,mBAAT,CAA9B,CAAtD,CAAoH,QAAS,CAACC,CAAD,CAAIC,CAAJ,CAAO,CAU5HC,CAAAA,CAAaD,CAAAC,WAV+G,KAW5HC,EAAYH,CAAAI,YAAAC,KAAAC,UAXgH;AAY5HC,EAAWP,CAAAI,YAAAI,OAAAF,UAmBfJ,EAAA,CAAW,UAAX,CAAuB,UAAvB,CAAmC,CAE/BO,SAAU,IAAK,EAFgB,CAI/BC,UAAW,CAJoB,CAM/BC,eAAgB,CANe,CAQ/BC,aAAc,EARiB,CAU/BC,aAAc,EAViB,CAY/BC,OAAQ,CACJC,MAAO,CAEHC,cAAe,CAFZ,CAIHC,mBAAoB,CAJjB,CAMHC,KAAM,CAAA,CANH,CADH,CAZuB,CAsB/BC,QAAS,CACLC,YAAa,uFADR,CAtBsB,CAAnC,CAyBG,CACCC,cAAe,CAAC,GAAD,CADhB,CAECC,YAAa,GAFd,CAGCC,QAASA,QAAS,CAACC,CAAD,CAAQ,CACtB,MAAO,CAACxB,CAAAyB,KAAA,CAAOD,CAAAE,EAAP,CAAgBF,CAAAG,IAAhB,CAAD,CADe,CAH3B,CAMCC,eAAgBzB,CAAA0B,UANjB,CAOCC,UAAW3B,CAAA4B,WAPZ,CAQCC,eAAgBzB,CAAAyB,eARjB,CASCC,aAAc1B,CAAAsB,UATf,CAzBH,CAmCG,CACCK,cAAe/B,CAAAgC,WAAA7B,UAAA8B,SADhB;AAECA,SAAUpC,CAAAI,YAAAiC,SAAA/B,UAAA6B,WAAA7B,UAAA8B,SAFX,CAGCE,KAAMA,QAAS,CAACC,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAAqB,CAC5BzC,CAAA0C,SAAA,CAAWF,CAAX,CAAJ,EAA2B,KAA3B,EAAoCA,EAApC,GACIA,CAAAd,EACA,CADYc,CAAAb,IACZ,CAAA,OAAOa,CAAAb,IAFX,CAIA,OAAO3B,EAAA2C,MAAArC,UAAAgC,KAAAxC,MAAA,CAA6B,IAA7B,CAAmC8C,SAAnC,CALyB,CAHrC,CAnCH,CA+HA,GA9JgI,CAApI,CAiKApD,EAAA,CAAgBO,CAAhB,CAA0B,iCAA1B,CAA6D,EAA7D,CAAiE,QAAS,EAAG,EAA7E,CAxKoB,CAbvB;","sources":["lollipop.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","H","U","seriesType","areaProto","seriesTypes","area","prototype","colProto","column","lowColor","threshold","connectorWidth","groupPadding","pointPadding","states","hover","lineWidthPlus","connectorWidthPlus","halo","tooltip","pointFormat","pointArrayMap","pointValKey","toYData","point","pick","y","low","translatePoint","translate","drawPoint","drawPoints","drawDataLabels","setShapeArgs","pointSetState","pointClass","setState","dumbbell","init","series","options","x","isObject","Point","arguments"]}
+194
View File
@@ -0,0 +1,194 @@
/**
* @license Highcharts JS v8.2.0 (2020-08-20)
*
* (c) 2009-2019 Sebastian Bochan, Rafal Sebestjanski
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/lollipop', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Series/LollipopSeries.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {
/* *
*
* (c) 2010-2020 Sebastian Bochan, Rafal Sebestjanski
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var seriesType = U.seriesType;
var areaProto = H.seriesTypes.area.prototype,
colProto = H.seriesTypes.column.prototype;
/**
* The lollipop series is a carteseian series with a line anchored from
* the x axis and a dot at the end to mark the value.
* Requires `highcharts-more.js`, `modules/dumbbell.js` and
* `modules/lollipop.js`.
*
* @sample {highcharts} highcharts/demo/lollipop/
* Lollipop chart
* @sample {highcharts} highcharts/series-dumbbell/styled-mode-dumbbell/
* Styled mode
*
* @extends plotOptions.dumbbell
* @product highcharts highstock
* @excluding fillColor, fillOpacity, lineWidth, stack, stacking, lowColor,
* stickyTracking, trackByArea
* @since 8.0.0
* @optionparent plotOptions.lollipop
*/
seriesType('lollipop', 'dumbbell', {
/** @ignore-option */
lowColor: void 0,
/** @ignore-option */
threshold: 0,
/** @ignore-option */
connectorWidth: 1,
/** @ignore-option */
groupPadding: 0.2,
/** @ignore-option */
pointPadding: 0.1,
/** @ignore-option */
states: {
hover: {
/** @ignore-option */
lineWidthPlus: 0,
/** @ignore-option */
connectorWidthPlus: 1,
/** @ignore-option */
halo: false
}
},
tooltip: {
pointFormat: '<span style="color:{series.color}">●</span> {series.name}: <b>{point.y}</b><br/>'
}
}, {
pointArrayMap: ['y'],
pointValKey: 'y',
toYData: function (point) {
return [H.pick(point.y, point.low)];
},
translatePoint: areaProto.translate,
drawPoint: areaProto.drawPoints,
drawDataLabels: colProto.drawDataLabels,
setShapeArgs: colProto.translate
}, {
pointSetState: areaProto.pointClass.prototype.setState,
setState: H.seriesTypes.dumbbell.prototype.pointClass.prototype.setState,
init: function (series, options, x) {
if (H.isObject(options) && 'low' in options) {
options.y = options.low;
delete options.low;
}
return H.Point.prototype.init.apply(this, arguments);
}
});
/**
* The `lollipop` series. If the [type](#series.lollipop.type) option is
* not specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.lollipop,
* @excluding boostThreshold, boostBlending
* @product highcharts highstock
* @requires highcharts-more
* @requires modules/dumbbell
* @requires modules/lollipop
* @apioption series.lollipop
*/
/**
* An array of data points for the series. For the `lollipop` series type,
* points can be given in the following ways:
*
* 1. An array of numerical values. In this case, the numerical values will be
* interpreted as `y` options. The `x` values will be automatically
* calculated, either starting at 0 and incremented by 1, or from
* `pointStart` and `pointInterval` given in the series options. If the axis
* has categories, these will be used. Example:
* ```js
* data: [0, 5, 3, 5]
* ```
*
* 2. An array of arrays with 2 values. In this case, the values correspond to
* `x,y`. If the first value is a string, it is applied as the name of the
* point, and the `x` value is inferred.
* ```js
* data: [
* [0, 6],
* [1, 2],
* [2, 6]
* ]
* ```
*
* 3. An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of
* data points exceeds the series'
* [turboThreshold](#series.lollipop.turboThreshold), this option is not
* available.
* ```js
* data: [{
* x: 1,
* y: 9,
* name: "Point2",
* color: "#00FF00",
* connectorWidth: 3,
* connectorColor: "#FF00FF"
* }, {
* x: 1,
* y: 6,
* name: "Point1",
* color: "#FF00FF"
* }]
* ```
*
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-arrays/
* Arrays of numeric x and y
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
* Arrays of datetime x and y
* @sample {highcharts} highcharts/series/data-array-of-name-value/
* Arrays of point.name and y
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
*
* @type {Array<number|Array<(number|string),(number|null)>|null|*>}
* @extends series.dumbbell.data
* @excluding high, low, lowColor
* @product highcharts highstock
* @apioption series.lollipop.data
*/
/**
* The y value of the point.
*
* @type {number|null}
* @product highcharts highstock
* @apioption series.line.data.y
*/
''; // adds doclets above to transpiled file
});
_registerModule(_modules, 'masters/modules/lollipop.src.js', [], function () {
});
}));
+44
View File
@@ -0,0 +1,44 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Marker clusters module for Highcharts
(c) 2010-2019 Wojciech Chmiel
License: www.highcharts.com/license
*/
(function(t){"object"===typeof module&&module.exports?(t["default"]=t,module.exports=t):"function"===typeof define&&define.amd?define("highcharts/modules/marker-clusters",["highcharts"],function(y){t(y);t.Highcharts=y;return t}):t("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(t){function y(t,F,C,y){t.hasOwnProperty(F)||(t[F]=y.apply(null,C))}t=t?t._modules:{};y(t,"Extensions/MarkerClusters.js",[t["Core/Chart/Chart.js"],t["Core/Globals.js"],t["Core/Options.js"],t["Core/Series/Point.js"],
t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"]],function(t,y,C,P,Z,v){function I(a){var b=a.length,e=0,f=0,c;for(c=0;c<b;c++)e+=a[c].x,f+=a[c].y;return{x:e/b,y:f/b}}function F(a,b){var e=[];e.length=b;a.clusters.forEach(function(a){a.data.forEach(function(a){e[a.dataIndex]=a})});a.noise.forEach(function(a){e[a.data[0].dataIndex]=a.data[0]});return e}function Q(a,b,e,f,c){a.point&&(f&&a.point.graphic&&(a.point.graphic.show(),a.point.graphic.attr({opacity:b}).animate({opacity:1},e)),c&&
a.point.dataLabel&&(a.point.dataLabel.show(),a.point.dataLabel.attr({opacity:b}).animate({opacity:1},e)))}function R(a,b,e){a.point&&(b&&a.point.graphic&&a.point.graphic.hide(),e&&a.point.dataLabel&&a.point.dataLabel.hide())}function aa(a){a&&S(a,function(a){a.point&&a.point.destroy&&a.point.destroy()})}function L(a,b,e,f){Q(a,f,e,!0,!0);b.forEach(function(a){a.point&&a.point.destroy&&a.point.destroy()})}C=C.defaultOptions;var B=v.addEvent,T=v.animObject,D=v.defined,U=v.error,V=v.isArray,M=v.isFunction,
N=v.isObject,G=v.isNumber,O=v.merge,S=v.objectEach,W=v.relativeLength,J=v.syncTimeout;"";v=y.Series;var w=y.seriesTypes.scatter,X=v.prototype.generatePoints,Y=0,K=[],E={enabled:!1,allowOverlap:!0,animation:{duration:500},drillToCluster:!0,minimumClusterSize:2,layoutAlgorithm:{gridSize:50,distance:40,kmeansThreshold:100},marker:{symbol:"cluster",radius:15,lineWidth:0,lineColor:"#ffffff"},dataLabels:{enabled:!0,format:"{point.clusterPointsAmount}",verticalAlign:"middle",align:"center",style:{color:"contrast"},
inside:!0}};(C.plotOptions||{}).series=O((C.plotOptions||{}).series,{cluster:E,tooltip:{clusterFormat:"<span>Clustered points: {point.clusterPointsAmount}</span><br/>"}});Z.prototype.symbols.cluster=function(a,b,e,f){e/=2;f/=2;var c=this.arc(a+e,b+f,e-4,f-4,{start:.5*Math.PI,end:2.5*Math.PI,open:!1});var k=this.arc(a+e,b+f,e-3,f-3,{start:.5*Math.PI,end:2.5*Math.PI,innerR:e-2,open:!1});return this.arc(a+e,b+f,e-1,f-1,{start:.5*Math.PI,end:2.5*Math.PI,innerR:e,open:!1}).concat(k,c)};w.prototype.animateClusterPoint=
function(a){var b=this.xAxis,e=this.yAxis,f=this.chart,c=T((this.options.cluster||{}).animation),k=c.duration||500,h=(this.markerClusterInfo||{}).pointsState,m=(h||{}).newState,r=(h||{}).oldState,g=[],l=h=0,p=0,q=!1,u=!1;if(r&&m){var d=m[a.stateId];l=b.toPixels(d.x)-f.plotLeft;p=e.toPixels(d.y)-f.plotTop;if(1===d.parentsId.length){a=(m||{})[a.stateId].parentsId[0];var n=r[a];d.point&&d.point.graphic&&n&&n.point&&n.point.plotX&&n.point.plotY&&n.point.plotX!==d.point.plotX&&n.point.plotY!==d.point.plotY&&
(a=d.point.graphic.getBBox(),h=a.width/2,d.point.graphic.attr({x:n.point.plotX-h,y:n.point.plotY-h}),d.point.graphic.animate({x:l-(d.point.graphic.radius||0),y:p-(d.point.graphic.radius||0)},c,function(){u=!0;n.point&&n.point.destroy&&n.point.destroy()}),d.point.dataLabel&&d.point.dataLabel.alignAttr&&n.point.dataLabel&&n.point.dataLabel.alignAttr&&(d.point.dataLabel.attr({x:n.point.dataLabel.alignAttr.x,y:n.point.dataLabel.alignAttr.y}),d.point.dataLabel.animate({x:d.point.dataLabel.alignAttr.x,
y:d.point.dataLabel.alignAttr.y},c)))}else 0===d.parentsId.length?(R(d,!0,!0),J(function(){Q(d,.1,c,!0,!0)},k/2)):(R(d,!0,!0),d.parentsId.forEach(function(a){r&&r[a]&&(n=r[a],g.push(n),n.point&&n.point.graphic&&(q=!0,n.point.graphic.show(),n.point.graphic.animate({x:l-(n.point.graphic.radius||0),y:p-(n.point.graphic.radius||0),opacity:.4},c,function(){u=!0;L(d,g,c,.7)}),n.point.dataLabel&&-9999!==n.point.dataLabel.y&&d.point&&d.point.dataLabel&&d.point.dataLabel.alignAttr&&(n.point.dataLabel.show(),
n.point.dataLabel.animate({x:d.point.dataLabel.alignAttr.x,y:d.point.dataLabel.alignAttr.y,opacity:.4},c))))}),J(function(){u||L(d,g,c,.85)},k),q||J(function(){L(d,g,c,.1)},k/2))}};w.prototype.getGridOffset=function(){var a=this.chart,b=this.xAxis,e=this.yAxis;b=this.dataMinX&&this.dataMaxX?b.reversed?b.toPixels(this.dataMaxX):b.toPixels(this.dataMinX):a.plotLeft;a=this.dataMinY&&this.dataMaxY?e.reversed?e.toPixels(this.dataMinY):e.toPixels(this.dataMaxY):a.plotTop;return{plotLeft:b,plotTop:a}};w.prototype.getScaledGridSize=
function(a){var b=this.xAxis,e=!0,f=1,c=1;a=a.processedGridSize||E.layoutAlgorithm.gridSize;this.gridValueSize||(this.gridValueSize=Math.abs(b.toValue(a)-b.toValue(0)));b=b.toPixels(this.gridValueSize)-b.toPixels(0);for(b=+(a/b).toFixed(14);e&&1!==b;){var k=Math.pow(2,f);.75<b&&1.25>b?e=!1:b>=1/k&&b<1/k*2?(e=!1,c=k):b<=k&&b>k/2&&(e=!1,c=1/k);f++}return a/c/b};w.prototype.getRealExtremes=function(){var a=this.chart,b=this.xAxis,e=this.yAxis;var f=b?b.toValue(a.plotLeft):0;b=b?b.toValue(a.plotLeft+
a.plotWidth):0;var c=e?e.toValue(a.plotTop):0;a=e?e.toValue(a.plotTop+a.plotHeight):0;f>b&&(f=[f,b],b=f[0],f=f[1]);c>a&&(c=[c,a],a=c[0],c=c[1]);return{minX:f,maxX:b,minY:c,maxY:a}};w.prototype.onDrillToCluster=function(a){(a.point||a.target).firePointEvent("drillToCluster",a,function(a){var b=a.point||a.target,f=b.series.xAxis,c=b.series.yAxis,k=b.series.chart;if((b.series.options.cluster||{}).drillToCluster&&b.clusteredData){var h=b.clusteredData.map(function(a){return a.x}).sort(function(a,b){return a-
b});var m=b.clusteredData.map(function(a){return a.y}).sort(function(a,b){return a-b});b=h[0];var r=h[h.length-1];h=m[0];var g=m[m.length-1];m=Math.abs(.1*(r-b));var l=Math.abs(.1*(g-h));k.pointer.zoomX=!0;k.pointer.zoomY=!0;b>r&&(r=[r,b],b=r[0],r=r[1]);h>g&&(g=[g,h],h=g[0],g=g[1]);k.zoom({originalEvent:a,xAxis:[{axis:f,min:b-m,max:r+m}],yAxis:[{axis:c,min:h-l,max:g+l}]})}})};w.prototype.getClusterDistancesFromPoint=function(a,b,e){var f=this.xAxis,c=this.yAxis,k=[],h;for(h=0;h<a.length;h++){var m=
Math.sqrt(Math.pow(f.toPixels(b)-f.toPixels(a[h].posX),2)+Math.pow(c.toPixels(e)-c.toPixels(a[h].posY),2));k.push({clusterIndex:h,distance:m})}return k.sort(function(a,b){return a.distance-b.distance})};w.prototype.getPointsState=function(a,b,e){b=b?F(b,e):[];e=F(a,e);var f={},c;K=[];a.clusters.forEach(function(a){f[a.stateId]={x:a.x,y:a.y,id:a.stateId,point:a.point,parentsId:[]}});a.noise.forEach(function(a){f[a.stateId]={x:a.x,y:a.y,id:a.stateId,point:a.point,parentsId:[]}});for(c=0;c<e.length;c++){a=
e[c];var k=b[c];a&&k&&a.parentStateId&&k.parentStateId&&f[a.parentStateId]&&-1===f[a.parentStateId].parentsId.indexOf(k.parentStateId)&&(f[a.parentStateId].parentsId.push(k.parentStateId),-1===K.indexOf(k.parentStateId)&&K.push(k.parentStateId))}return f};w.prototype.markerClusterAlgorithms={grid:function(a,b,e,f){var c=this.xAxis,k=this.yAxis,h={},m=this.getGridOffset(),r;f=this.getScaledGridSize(f);for(r=0;r<a.length;r++){var g=c.toPixels(a[r])-m.plotLeft;var l=k.toPixels(b[r])-m.plotTop;g=Math.floor(g/
f);l=Math.floor(l/f);l=l+"-"+g;h[l]||(h[l]=[]);h[l].push({dataIndex:e[r],x:a[r],y:b[r]})}return h},kmeans:function(a,b,e,f){var c=[],k=[],h={},m=f.processedDistance||E.layoutAlgorithm.distance,r=f.iterations,g=0,l=!0,p=0,q=0;var u=[];var d;f.processedGridSize=f.processedDistance;p=this.markerClusterAlgorithms?this.markerClusterAlgorithms.grid.call(this,a,b,e,f):{};for(d in p)1<p[d].length&&(u=I(p[d]),c.push({posX:u.x,posY:u.y,oldX:0,oldY:0,startPointsLen:p[d].length,points:[]}));for(;l;){c.map(function(a){a.points.length=
0;return a});for(l=k.length=0;l<a.length;l++)p=a[l],q=b[l],u=this.getClusterDistancesFromPoint(c,p,q),u.length&&u[0].distance<m?c[u[0].clusterIndex].points.push({x:p,y:q,dataIndex:e[l]}):k.push({x:p,y:q,dataIndex:e[l]});for(d=0;d<c.length;d++)1===c[d].points.length&&(u=this.getClusterDistancesFromPoint(c,c[d].points[0].x,c[d].points[0].y),u[1].distance<m&&(c[u[1].clusterIndex].points.push(c[d].points[0]),c[u[0].clusterIndex].points.length=0));l=!1;for(d=0;d<c.length;d++)if(u=I(c[d].points),c[d].oldX=
c[d].posX,c[d].oldY=c[d].posY,c[d].posX=u.x,c[d].posY=u.y,c[d].posX>c[d].oldX+1||c[d].posX<c[d].oldX-1||c[d].posY>c[d].oldY+1||c[d].posY<c[d].oldY-1)l=!0;r&&(l=g<r-1);g++}c.forEach(function(a,b){h["cluster"+b]=a.points});k.forEach(function(a,b){h["noise"+b]=[a]});return h},optimizedKmeans:function(a,b,e,f){var c=this.xAxis,k=this.yAxis,h=f.processedDistance||E.layoutAlgorithm.gridSize,m={},r=this.getRealExtremes(),g=(this.options.cluster||{}).marker,l,p,q;!this.markerClusterInfo||this.initMaxX&&this.initMaxX<
r.maxX||this.initMinX&&this.initMinX>r.minX||this.initMaxY&&this.initMaxY<r.maxY||this.initMinY&&this.initMinY>r.minY?(this.initMaxX=r.maxX,this.initMinX=r.minX,this.initMaxY=r.maxY,this.initMinY=r.minY,m=this.markerClusterAlgorithms?this.markerClusterAlgorithms.kmeans.call(this,a,b,e,f):{},this.baseClusters=null):(this.baseClusters||(this.baseClusters={clusters:this.markerClusterInfo.clusters,noise:this.markerClusterInfo.noise}),this.baseClusters.clusters.forEach(function(a){a.pointsOutside=[];a.pointsInside=
[];a.data.forEach(function(b){p=Math.sqrt(Math.pow(c.toPixels(b.x)-c.toPixels(a.x),2)+Math.pow(k.toPixels(b.y)-k.toPixels(a.y),2));q=a.clusterZone&&a.clusterZone.marker&&a.clusterZone.marker.radius?a.clusterZone.marker.radius:g&&g.radius?g.radius:E.marker.radius;l=0<=h-q?h-q:q;p>q+l&&D(a.pointsOutside)?a.pointsOutside.push(b):D(a.pointsInside)&&a.pointsInside.push(b)});a.pointsInside.length&&(m[a.id]=a.pointsInside);a.pointsOutside.forEach(function(b,f){m[a.id+"_noise"+f]=[b]})}),this.baseClusters.noise.forEach(function(a){m[a.id]=
a.data}));return m}};w.prototype.preventClusterCollisions=function(a){var b=this.xAxis,e=this.yAxis,f=a.key.split("-").map(parseFloat),c=f[0],k=f[1],h=a.gridSize,m=a.groupedData,r=a.defaultRadius,g=a.clusterRadius,l=k*h,p=c*h,q=b.toPixels(a.x),u=e.toPixels(a.y);f=[];var d=0,n=0,t=(this.options.cluster||{}).marker,x=(this.options.cluster||{}).zones,v=this.getGridOffset(),w,y,A,B,C,F,G;q-=v.plotLeft;u-=v.plotTop;for(A=1;5>A;A++){var H=A%2?-1:1;var z=3>A?-1:1;H=Math.floor((q+H*g)/h);z=Math.floor((u+
z*g)/h);H=[z+"-"+H,z+"-"+k,c+"-"+H];for(z=0;z<H.length;z++)-1===f.indexOf(H[z])&&H[z]!==a.key&&f.push(H[z])}f.forEach(function(a){if(m[a]){m[a].posX||(F=I(m[a]),m[a].posX=F.x,m[a].posY=F.y);w=b.toPixels(m[a].posX||0)-v.plotLeft;y=e.toPixels(m[a].posY||0)-v.plotTop;var f=a.split("-").map(parseFloat);C=f[0];B=f[1];if(x)for(d=m[a].length,A=0;A<x.length;A++)d>=x[A].from&&d<=x[A].to&&(n=D((x[A].marker||{}).radius)?x[A].marker.radius||0:t&&t.radius?t.radius:E.marker.radius);1<m[a].length&&0===n&&t&&t.radius?
n=t.radius:1===m[a].length&&(n=r);G=g+n;n=0;B!==k&&Math.abs(q-w)<G&&(q=0>B-k?l+g:l+h-g);C!==c&&Math.abs(u-y)<G&&(u=0>C-c?p+g:p+h-g)}});f=b.toValue(q+v.plotLeft);z=e.toValue(u+v.plotTop);m[a.key].posX=f;m[a.key].posY=z;return{x:f,y:z}};w.prototype.isValidGroupedDataObject=function(a){var b=!1,e;if(!N(a))return!1;S(a,function(a){b=!0;if(V(a)&&a.length)for(e=0;e<a.length;e++){if(!N(a[e])||!a[e].x||!a[e].y){b=!1;break}}else b=!1});return b};w.prototype.getClusteredData=function(a,b){var e=[],f=[],c=[],
k=[],h=[],m=0,r=Math.max(2,b.minimumClusterSize||2),g,l;if(M(b.layoutAlgorithm.type)&&!this.isValidGroupedDataObject(a))return U("Highcharts marker-clusters module: The custom algorithm result is not valid!",!1,this.chart),!1;for(l in a)if(a[l].length>=r){var p=a[l];var q=Math.random().toString(36).substring(2,7)+"-"+Y++;var u=p.length;if(b.zones)for(g=0;g<b.zones.length;g++)if(u>=b.zones[g].from&&u<=b.zones[g].to){var d=b.zones[g];d.zoneIndex=g;var n=b.zones[g].marker;var t=b.zones[g].className}var x=
I(p);"grid"!==b.layoutAlgorithm.type||b.allowOverlap?x={x:x.x,y:x.y}:(g=this.options.marker||{},x=this.preventClusterCollisions({x:x.x,y:x.y,key:l,groupedData:a,gridSize:this.getScaledGridSize(b.layoutAlgorithm),defaultRadius:g.radius||3+(g.lineWidth||0),clusterRadius:n&&n.radius?n.radius:(b.marker||{}).radius||E.marker.radius}));for(g=0;g<u;g++)p[g].parentStateId=q;c.push({x:x.x,y:x.y,id:l,stateId:q,index:m,data:p,clusterZone:d,clusterZoneClassName:t});e.push(x.x);f.push(x.y);h.push({options:{formatPrefix:"cluster",
dataLabels:b.dataLabels,marker:O(b.marker,{states:b.states},n||{})}});if(this.options.data&&this.options.data.length)for(g=0;g<u;g++)N(this.options.data[p[g].dataIndex])&&(p[g].options=this.options.data[p[g].dataIndex]);m++;n=null}else for(g=0;g<a[l].length;g++)p=a[l][g],q=Math.random().toString(36).substring(2,7)+"-"+Y++,u=((this.options||{}).data||[])[p.dataIndex],e.push(p.x),f.push(p.y),p.parentStateId=q,k.push({x:p.x,y:p.y,id:l,stateId:q,index:m,data:a[l]}),q=u&&"object"===typeof u&&!V(u)?O(u,
{x:p.x,y:p.y}):{userOptions:u,x:p.x,y:p.y},h.push({options:q}),m++;return{clusters:c,noise:k,groupedXData:e,groupedYData:f,groupMap:h}};w.prototype.destroyClusteredData=function(){(this.markerClusterSeriesData||[]).forEach(function(a){a&&a.destroy&&a.destroy()});this.markerClusterSeriesData=null};w.prototype.hideClusteredData=function(){var a=this.markerClusterSeriesData,b=((this.markerClusterInfo||{}).pointsState||{}).oldState||{},e=K.map(function(a){return(b[a].point||{}).id||""});(a||[]).forEach(function(a){a&&
-1!==e.indexOf(a.id)?(a.graphic&&a.graphic.hide(),a.dataLabel&&a.dataLabel.hide()):a&&a.destroy&&a.destroy()})};w.prototype.generatePoints=function(){var a=this,b=a.chart,e=a.xAxis,f=a.yAxis,c=a.options.cluster,k=a.getRealExtremes(),h=[],m=[],r=[],g,l,p,q;if(c&&c.enabled&&a.xData&&a.yData&&!b.polar){var u=c.layoutAlgorithm.type;var d=c.layoutAlgorithm;d.processedGridSize=W(d.gridSize||E.layoutAlgorithm.gridSize,b.plotWidth);d.processedDistance=W(d.distance||E.layoutAlgorithm.distance,b.plotWidth);
b=d.kmeansThreshold||E.layoutAlgorithm.kmeansThreshold;e=Math.abs(e.toValue(d.processedGridSize/2)-e.toValue(0));f=Math.abs(f.toValue(d.processedGridSize/2)-f.toValue(0));for(q=0;q<a.xData.length;q++){if(!a.dataMaxX)if(D(n)&&D(g)&&D(t)&&D(l))G(a.yData[q])&&G(t)&&G(l)&&(n=Math.max(a.xData[q],n),g=Math.min(a.xData[q],g),t=Math.max(a.yData[q]||t,t),l=Math.min(a.yData[q]||l,l));else{var n=g=a.xData[q];var t=l=a.yData[q]}a.xData[q]>=k.minX-e&&a.xData[q]<=k.maxX+e&&(a.yData[q]||k.minY)>=k.minY-f&&(a.yData[q]||
k.maxY)<=k.maxY+f&&(h.push(a.xData[q]),m.push(a.yData[q]),r.push(q))}D(n)&&D(g)&&G(t)&&G(l)&&(a.dataMaxX=n,a.dataMinX=g,a.dataMaxY=t,a.dataMinY=l);k=M(u)?u:a.markerClusterAlgorithms?u&&a.markerClusterAlgorithms[u]?a.markerClusterAlgorithms[u]:h.length<b?a.markerClusterAlgorithms.kmeans:a.markerClusterAlgorithms.grid:function(){return!1};d=(h=k.call(this,h,m,r,d))?a.getClusteredData(h,c):h;c.animation&&a.markerClusterInfo&&a.markerClusterInfo.pointsState&&a.markerClusterInfo.pointsState.oldState?(aa(a.markerClusterInfo.pointsState.oldState),
h=a.markerClusterInfo.pointsState.newState):h={};m=a.xData.length;r=a.markerClusterInfo;d&&(a.processedXData=d.groupedXData,a.processedYData=d.groupedYData,a.hasGroupedData=!0,a.markerClusterInfo=d,a.groupMap=d.groupMap);X.apply(this);d&&a.markerClusterInfo&&((a.markerClusterInfo.clusters||[]).forEach(function(b){p=a.points[b.index];p.isCluster=!0;p.clusteredData=b.data;p.clusterPointsAmount=b.data.length;b.point=p;B(p,"click",a.onDrillToCluster)}),(a.markerClusterInfo.noise||[]).forEach(function(b){b.point=
a.points[b.index]}),c.animation&&a.markerClusterInfo&&(a.markerClusterInfo.pointsState={oldState:h,newState:a.getPointsState(d,r,m)}),c.animation?this.hideClusteredData():this.destroyClusteredData(),this.markerClusterSeriesData=this.hasGroupedData?this.points:null)}else X.apply(this)};B(t,"render",function(){(this.series||[]).forEach(function(a){if(a.markerClusterInfo){var b=((a.markerClusterInfo||{}).pointsState||{}).oldState;(a.options.cluster||{}).animation&&a.markerClusterInfo&&0===a.chart.pointer.pinchDown.length&&
"pan"!==(a.xAxis.eventArgs||{}).trigger&&b&&Object.keys(b).length&&(a.markerClusterInfo.clusters.forEach(function(b){a.animateClusterPoint(b)}),a.markerClusterInfo.noise.forEach(function(b){a.animateClusterPoint(b)}))}})});B(P,"update",function(){if(this.dataGroup)return U("Highcharts marker-clusters module: Running `Point.update` when point belongs to clustered series is not supported.",!1,this.series.chart),!1});B(v,"destroy",w.prototype.destroyClusteredData);B(v,"afterRender",function(){var a=
(this.options.cluster||{}).drillToCluster;this.markerClusterInfo&&this.markerClusterInfo.clusters&&this.markerClusterInfo.clusters.forEach(function(b){b.point&&b.point.graphic&&(b.point.graphic.addClass("highcharts-cluster-point"),a&&b.point&&(b.point.graphic.css({cursor:"pointer"}),b.point.dataLabel&&b.point.dataLabel.css({cursor:"pointer"})),D(b.clusterZone)&&b.point.graphic.addClass(b.clusterZoneClassName||"highcharts-cluster-zone-"+b.clusterZone.zoneIndex))})});B(P,"drillToCluster",function(a){var b=
(((a.point||a.target).series.options.cluster||{}).events||{}).drillToCluster;M(b)&&b.call(this,a)});B(y.Axis,"setExtremes",function(){var a=this.chart,b=0,e;a.series.forEach(function(a){a.markerClusterInfo&&(e=T((a.options.cluster||{}).animation),b=e.duration||0)});J(function(){a.tooltip&&a.tooltip.destroy()},b)})});y(t,"masters/modules/marker-clusters.src.js",[],function(){})});
//# sourceMappingURL=marker-clusters.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+55
View File
@@ -0,0 +1,55 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Force directed graph 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/networkgraph",["highcharts"],function(m){e(m);e.Highcharts=m;return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){function m(e,b,a,c){e.hasOwnProperty(b)||(e[b]=c.apply(null,a))}e=e?e._modules:{};m(e,"Mixins/Nodes.js",[e["Core/Globals.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(e,b,a){var c=a.defined,
d=a.extend,h=a.find,k=a.pick;return e.NodesMixin={createNode:function(b){function a(f,g){return h(f,function(f){return f.id===g})}var c=a(this.nodes,b),f=this.pointClass;if(!c){var g=this.options.nodes&&a(this.options.nodes,b);c=(new f).init(this,d({className:"highcharts-node",isNode:!0,id:b,y:1},g));c.linksTo=[];c.linksFrom=[];c.formatPrefix="node";c.name=c.name||c.options.id||"";c.mass=k(c.options.mass,c.options.marker&&c.options.marker.radius,this.options.marker&&this.options.marker.radius,4);
c.getSum=function(){var f=0,g=0;c.linksTo.forEach(function(g){f+=g.weight});c.linksFrom.forEach(function(f){g+=f.weight});return Math.max(f,g)};c.offset=function(f,g){for(var q=0,b=0;b<c[g].length;b++){if(c[g][b]===f)return q;q+=c[g][b].weight}};c.hasShape=function(){var f=0;c.linksTo.forEach(function(g){g.outgoing&&f++});return!c.linksTo.length||f!==c.linksTo.length};this.nodes.push(c)}return c},generatePoints:function(){var b=this.chart,d={};e.Series.prototype.generatePoints.call(this);this.nodes||
(this.nodes=[]);this.colorCounter=0;this.nodes.forEach(function(c){c.linksFrom.length=0;c.linksTo.length=0;c.level=c.options.level});this.points.forEach(function(a){c(a.from)&&(d[a.from]||(d[a.from]=this.createNode(a.from)),d[a.from].linksFrom.push(a),a.fromNode=d[a.from],b.styledMode?a.colorIndex=k(a.options.colorIndex,d[a.from].colorIndex):a.color=a.options.color||d[a.from].color);c(a.to)&&(d[a.to]||(d[a.to]=this.createNode(a.to)),d[a.to].linksTo.push(a),a.toNode=d[a.to]);a.name=a.name||a.id},this);
this.nodeLookup=d},setData:function(){this.nodes&&(this.nodes.forEach(function(c){c.destroy()}),this.nodes.length=0);e.Series.prototype.setData.apply(this,arguments)},destroy:function(){this.data=[].concat(this.points||[],this.nodes);return e.Series.prototype.destroy.apply(this,arguments)},setNodeState:function(c){var a=arguments,d=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==c&&d.forEach(function(f){f&&f.series&&(b.prototype.setState.apply(f,a),f.isNode||
(f.fromNode.graphic&&b.prototype.setState.apply(f.fromNode,a),f.toNode&&f.toNode.graphic&&b.prototype.setState.apply(f.toNode,a)))});b.prototype.setState.apply(this,a)}}});m(e,"Series/Networkgraph/Integrations.js",[e["Core/Globals.js"]],function(e){e.networkgraphIntegrations={verlet:{attractiveForceFunction:function(b,a){return(a-b)/b},repulsiveForceFunction:function(b,a){return(a-b)/b*(a>b?1:0)},barycenter:function(){var b=this.options.gravitationalConstant,a=this.barycenter.xFactor,c=this.barycenter.yFactor;
a=(a-(this.box.left+this.box.width)/2)*b;c=(c-(this.box.top+this.box.height)/2)*b;this.nodes.forEach(function(d){d.fixedPosition||(d.plotX-=a/d.mass/d.degree,d.plotY-=c/d.mass/d.degree)})},repulsive:function(b,a,c){a=a*this.diffTemperature/b.mass/b.degree;b.fixedPosition||(b.plotX+=c.x*a,b.plotY+=c.y*a)},attractive:function(b,a,c){var d=b.getMass(),h=-c.x*a*this.diffTemperature;a=-c.y*a*this.diffTemperature;b.fromNode.fixedPosition||(b.fromNode.plotX-=h*d.fromNode/b.fromNode.degree,b.fromNode.plotY-=
a*d.fromNode/b.fromNode.degree);b.toNode.fixedPosition||(b.toNode.plotX+=h*d.toNode/b.toNode.degree,b.toNode.plotY+=a*d.toNode/b.toNode.degree)},integrate:function(b,a){var c=-b.options.friction,d=b.options.maxSpeed,h=(a.plotX+a.dispX-a.prevX)*c;c*=a.plotY+a.dispY-a.prevY;var e=Math.abs,n=e(h)/(h||1);e=e(c)/(c||1);h=n*Math.min(d,Math.abs(h));c=e*Math.min(d,Math.abs(c));a.prevX=a.plotX+a.dispX;a.prevY=a.plotY+a.dispY;a.plotX+=h;a.plotY+=c;a.temperature=b.vectorLength({x:h,y:c})},getK:function(b){return Math.pow(b.box.width*
b.box.height/b.nodes.length,.5)}},euler:{attractiveForceFunction:function(b,a){return b*b/a},repulsiveForceFunction:function(b,a){return a*a/b},barycenter:function(){var b=this.options.gravitationalConstant,a=this.barycenter.xFactor,c=this.barycenter.yFactor;this.nodes.forEach(function(d){if(!d.fixedPosition){var h=d.getDegree();h*=1+h/2;d.dispX+=(a-d.plotX)*b*h/d.degree;d.dispY+=(c-d.plotY)*b*h/d.degree}})},repulsive:function(b,a,c,d){b.dispX+=c.x/d*a/b.degree;b.dispY+=c.y/d*a/b.degree},attractive:function(b,
a,c,d){var h=b.getMass(),e=c.x/d*a;a*=c.y/d;b.fromNode.fixedPosition||(b.fromNode.dispX-=e*h.fromNode/b.fromNode.degree,b.fromNode.dispY-=a*h.fromNode/b.fromNode.degree);b.toNode.fixedPosition||(b.toNode.dispX+=e*h.toNode/b.toNode.degree,b.toNode.dispY+=a*h.toNode/b.toNode.degree)},integrate:function(b,a){a.dispX+=a.dispX*b.options.friction;a.dispY+=a.dispY*b.options.friction;var c=a.temperature=b.vectorLength({x:a.dispX,y:a.dispY});0!==c&&(a.plotX+=a.dispX/c*Math.min(Math.abs(a.dispX),b.temperature),
a.plotY+=a.dispY/c*Math.min(Math.abs(a.dispY),b.temperature))},getK:function(b){return Math.pow(b.box.width*b.box.height/b.nodes.length,.3)}}}});m(e,"Series/Networkgraph/QuadTree.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,b){b=b.extend;var a=e.QuadTreeNode=function(a){this.box=a;this.boxSize=Math.min(a.width,a.height);this.nodes=[];this.body=this.isInternal=!1;this.isEmpty=!0};b(a.prototype,{insert:function(c,d){this.isInternal?this.nodes[this.getBoxPosition(c)].insert(c,d-1):(this.isEmpty=
!1,this.body?d?(this.isInternal=!0,this.divideBox(),!0!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body,d-1),this.body=!0),this.nodes[this.getBoxPosition(c)].insert(c,d-1)):(d=new a({top:c.plotX,left:c.plotY,width:.1,height:.1}),d.body=c,d.isInternal=!1,this.nodes.push(d)):(this.isInternal=!1,this.body=c))},updateMassAndCenter:function(){var a=0,d=0,b=0;this.isInternal?(this.nodes.forEach(function(c){c.isEmpty||(a+=c.mass,d+=c.plotX*c.mass,b+=c.plotY*c.mass)}),d/=a,b/=a):
this.body&&(a=this.body.mass,d=this.body.plotX,b=this.body.plotY);this.mass=a;this.plotX=d;this.plotY=b},divideBox:function(){var c=this.box.width/2,b=this.box.height/2;this.nodes[0]=new a({left:this.box.left,top:this.box.top,width:c,height:b});this.nodes[1]=new a({left:this.box.left+c,top:this.box.top,width:c,height:b});this.nodes[2]=new a({left:this.box.left+c,top:this.box.top+b,width:c,height:b});this.nodes[3]=new a({left:this.box.left,top:this.box.top+b,width:c,height:b})},getBoxPosition:function(a){var b=
a.plotY<this.box.top+this.box.height/2;return a.plotX<this.box.left+this.box.width/2?b?0:3:b?1:2}});e=e.QuadTree=function(b,d,e,k){this.box={left:b,top:d,width:e,height:k};this.maxDepth=25;this.root=new a(this.box,"0");this.root.isInternal=!0;this.root.isRoot=!0;this.root.divideBox()};b(e.prototype,{insertNodes:function(a){a.forEach(function(a){this.root.insert(a,this.maxDepth)},this)},visitNodeRecursive:function(a,b,e){var c;a||(a=this.root);a===this.root&&b&&(c=b(a));!1!==c&&(a.nodes.forEach(function(a){if(a.isInternal){b&&
(c=b(a));if(!1===c)return;this.visitNodeRecursive(a,b,e)}else a.body&&b&&b(a.body);e&&e(a)},this),a===this.root&&e&&e(a))},calculateMassAndCenter:function(){this.visitNodeRecursive(null,null,function(a){a.updateMassAndCenter()})}})});m(e,"Series/Networkgraph/Layouts.js",[e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,b,a){var c=a.addEvent,d=a.clamp,h=a.defined,k=a.extend,n=a.isFunction,p=a.pick,l=a.setAnimation;b.layouts={"reingold-fruchterman":function(){}};k(b.layouts["reingold-fruchterman"].prototype,
{init:function(f){this.options=f;this.nodes=[];this.links=[];this.series=[];this.box={x:0,y:0,width:0,height:0};this.setInitialRendering(!0);this.integration=b.networkgraphIntegrations[f.integration];this.enableSimulation=f.enableSimulation;this.attractiveForce=p(f.attractiveForce,this.integration.attractiveForceFunction);this.repulsiveForce=p(f.repulsiveForce,this.integration.repulsiveForceFunction);this.approximation=f.approximation},updateSimulation:function(f){this.enableSimulation=p(f,this.options.enableSimulation)},
start:function(){var f=this.series,a=this.options;this.currentStep=0;this.forces=f[0]&&f[0].forces||[];this.chart=f[0]&&f[0].chart;this.initialRendering&&(this.initPositions(),f.forEach(function(a){a.finishedAnimating=!0;a.render()}));this.setK();this.resetSimulation(a);this.enableSimulation&&this.step()},step:function(){var a=this,g=this.series;a.currentStep++;"barnes-hut"===a.approximation&&(a.createQuadTree(),a.quadTree.calculateMassAndCenter());a.forces.forEach(function(g){a[g+"Forces"](a.temperature)});
a.applyLimits(a.temperature);a.temperature=a.coolDown(a.startTemperature,a.diffTemperature,a.currentStep);a.prevSystemTemperature=a.systemTemperature;a.systemTemperature=a.getSystemTemperature();a.enableSimulation&&(g.forEach(function(a){a.chart&&a.render()}),a.maxIterations--&&isFinite(a.temperature)&&!a.isStable()?(a.simulation&&b.win.cancelAnimationFrame(a.simulation),a.simulation=b.win.requestAnimationFrame(function(){a.step()})):a.simulation=!1)},stop:function(){this.simulation&&b.win.cancelAnimationFrame(this.simulation)},
setArea:function(a,g,b,c){this.box={left:a,top:g,width:b,height:c}},setK:function(){this.k=this.options.linkLength||this.integration.getK(this)},addElementsToCollection:function(a,g){a.forEach(function(a){-1===g.indexOf(a)&&g.push(a)})},removeElementFromCollection:function(a,g){a=g.indexOf(a);-1!==a&&g.splice(a,1)},clear:function(){this.nodes.length=0;this.links.length=0;this.series.length=0;this.resetSimulation()},resetSimulation:function(){this.forcedStop=!1;this.systemTemperature=0;this.setMaxIterations();
this.setTemperature();this.setDiffTemperature()},restartSimulation:function(){this.simulation?this.resetSimulation():(this.setInitialRendering(!1),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(!0))},setMaxIterations:function(a){this.maxIterations=p(a,this.options.maxIterations)},setTemperature:function(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)},setDiffTemperature:function(){this.diffTemperature=this.startTemperature/
(this.options.maxIterations+1)},setInitialRendering:function(a){this.initialRendering=a},createQuadTree:function(){this.quadTree=new b.QuadTree(this.box.left,this.box.top,this.box.width,this.box.height);this.quadTree.insertNodes(this.nodes)},initPositions:function(){var a=this.options.initialPositions;n(a)?(a.call(this),this.nodes.forEach(function(a){h(a.prevX)||(a.prevX=a.plotX);h(a.prevY)||(a.prevY=a.plotY);a.dispX=0;a.dispY=0})):"circle"===a?this.setCircularPositions():this.setRandomPositions()},
setCircularPositions:function(){function a(b){b.linksFrom.forEach(function(b){l[b.toNode.id]||(l[b.toNode.id]=!0,h.push(b.toNode),a(b.toNode))})}var b=this.box,c=this.nodes,d=2*Math.PI/(c.length+1),e=c.filter(function(a){return 0===a.linksTo.length}),h=[],l={},k=this.options.initialPositionRadius;e.forEach(function(b){h.push(b);a(b)});h.length?c.forEach(function(a){-1===h.indexOf(a)&&h.push(a)}):h=c;h.forEach(function(a,g){a.plotX=a.prevX=p(a.plotX,b.width/2+k*Math.cos(g*d));a.plotY=a.prevY=p(a.plotY,
b.height/2+k*Math.sin(g*d));a.dispX=0;a.dispY=0})},setRandomPositions:function(){function a(a){a=a*a/Math.PI;return a-=Math.floor(a)}var b=this.box,c=this.nodes,d=c.length+1;c.forEach(function(g,c){g.plotX=g.prevX=p(g.plotX,b.width*a(c));g.plotY=g.prevY=p(g.plotY,b.height*a(d+c));g.dispX=0;g.dispY=0})},force:function(a){this.integration[a].apply(this,Array.prototype.slice.call(arguments,1))},barycenterForces:function(){this.getBarycenter();this.force("barycenter")},getBarycenter:function(){var a=
0,b=0,c=0;this.nodes.forEach(function(g){b+=g.plotX*g.mass;c+=g.plotY*g.mass;a+=g.mass});return this.barycenter={x:b,y:c,xFactor:b/a,yFactor:c/a}},barnesHutApproximation:function(a,b){var g=this.getDistXY(a,b),c=this.vectorLength(g);if(a!==b&&0!==c)if(b.isInternal)if(b.boxSize/c<this.options.theta&&0!==c){var d=this.repulsiveForce(c,this.k);this.force("repulsive",a,d*b.mass,g,c);var f=!1}else f=!0;else d=this.repulsiveForce(c,this.k),this.force("repulsive",a,d*b.mass,g,c);return f},repulsiveForces:function(){var a=
this;"barnes-hut"===a.approximation?a.nodes.forEach(function(b){a.quadTree.visitNodeRecursive(null,function(g){return a.barnesHutApproximation(b,g)})}):a.nodes.forEach(function(b){a.nodes.forEach(function(g){if(b!==g&&!b.fixedPosition){var c=a.getDistXY(b,g);var d=a.vectorLength(c);if(0!==d){var f=a.repulsiveForce(d,a.k);a.force("repulsive",b,f*g.mass,c,d)}}})})},attractiveForces:function(){var a=this,b,c,d;a.links.forEach(function(g){g.fromNode&&g.toNode&&(b=a.getDistXY(g.fromNode,g.toNode),c=a.vectorLength(b),
0!==c&&(d=a.attractiveForce(c,a.k),a.force("attractive",g,d,b,c)))})},applyLimits:function(){var a=this;a.nodes.forEach(function(b){b.fixedPosition||(a.integration.integrate(a,b),a.applyLimitBox(b,a.box),b.dispX=0,b.dispY=0)})},applyLimitBox:function(a,b){var c=a.radius;a.plotX=d(a.plotX,b.left+c,b.width-c);a.plotY=d(a.plotY,b.top+c,b.height-c)},coolDown:function(a,b,c){return a-b*c},isStable:function(){return.00001>Math.abs(this.systemTemperature-this.prevSystemTemperature)||0>=this.temperature},
getSystemTemperature:function(){return this.nodes.reduce(function(a,b){return a+b.temperature},0)},vectorLength:function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},getDistR:function(a,b){a=this.getDistXY(a,b);return this.vectorLength(a)},getDistXY:function(a,b){var c=a.plotX-b.plotX;a=a.plotY-b.plotY;return{x:c,y:a,absX:Math.abs(c),absY:Math.abs(a)}}});c(e,"predraw",function(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(function(a){a.stop()})});c(e,"render",function(){function a(a){a.maxIterations--&&
isFinite(a.temperature)&&!a.isStable()&&!a.enableSimulation&&(a.beforeStep&&a.beforeStep(),a.step(),c=!1,b=!0)}var b=!1;if(this.graphLayoutsLookup){l(!1,this);for(this.graphLayoutsLookup.forEach(function(a){a.start()});!c;){var c=!0;this.graphLayoutsLookup.forEach(a)}b&&this.series.forEach(function(a){a&&a.layout&&a.render()})}});c(e,"beforePrint",function(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(function(a){a.updateSimulation(!1)}),this.redraw())});c(e,"afterPrint",function(){this.graphLayoutsLookup&&
this.graphLayoutsLookup.forEach(function(a){a.updateSimulation()});this.redraw()})});m(e,"Series/Networkgraph/DraggableNodes.js",[e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,b,a){var c=a.addEvent;b.dragNodesMixin={onMouseDown:function(a,b){b=this.chart.pointer.normalize(b);a.fixedPosition={chartX:b.chartX,chartY:b.chartY,plotX:a.plotX,plotY:a.plotY};a.inDragMode=!0},onMouseMove:function(a,b){if(a.fixedPosition&&a.inDragMode){var c=this.chart;b=c.pointer.normalize(b);
var d=a.fixedPosition.chartX-b.chartX,e=a.fixedPosition.chartY-b.chartY;b=c.graphLayoutsLookup;if(5<Math.abs(d)||5<Math.abs(e))d=a.fixedPosition.plotX-d,e=a.fixedPosition.plotY-e,c.isInsidePlot(d,e)&&(a.plotX=d,a.plotY=e,a.hasDragged=!0,this.redrawHalo(a),b.forEach(function(a){a.restartSimulation()}))}},onMouseUp:function(a,b){a.fixedPosition&&a.hasDragged&&(this.layout.enableSimulation?this.layout.start():this.chart.redraw(),a.inDragMode=a.hasDragged=!1,this.options.fixedDraggable||delete a.fixedPosition)},
redrawHalo:function(a){a&&this.halo&&this.halo.attr({d:a.haloPath(this.options.states.hover.halo.size)})}};c(e,"load",function(){var a=this,b,e,n;a.container&&(b=c(a.container,"mousedown",function(b){var d=a.hoverPoint;d&&d.series&&d.series.hasDraggableNodes&&d.series.options.draggable&&(d.series.onMouseDown(d,b),e=c(a.container,"mousemove",function(a){return d&&d.series&&d.series.onMouseMove(d,a)}),n=c(a.container.ownerDocument,"mouseup",function(a){e();n();return d&&d.series&&d.series.onMouseUp(d,
a)}))}));c(a,"destroy",function(){b()})})});m(e,"Series/Networkgraph/Networkgraph.js",[e["Core/Globals.js"],e["Mixins/Nodes.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(e,b,a,c){var d=c.addEvent,h=c.css,k=c.defined,n=c.pick;c=c.seriesType;"";var m=e.seriesTypes,l=e.Series,f=e.dragNodesMixin;c("networkgraph","line",{stickyTracking:!1,inactiveOtherPoints:!0,marker:{enabled:!0,states:{inactive:{opacity:.3,animation:{duration:50}}}},states:{inactive:{linkOpacity:.3,animation:{duration:50}}},
dataLabels:{formatter:function(){return this.key},linkFormatter:function(){return this.point.fromNode.name+"<br>"+this.point.toNode.name},linkTextPath:{enabled:!0},textPath:{enabled:!1},style:{transition:"opacity 2000ms"}},link:{color:"rgba(100, 100, 100, 0.5)",width:1},draggable:!0,layoutAlgorithm:{initialPositions:"circle",initialPositionRadius:1,enableSimulation:!1,theta:.5,maxSpeed:10,approximation:"none",type:"reingold-fruchterman",integration:"euler",maxIterations:1E3,gravitationalConstant:.0625,
friction:-.981},showInLegend:!1},{forces:["barycenter","repulsive","attractive"],hasDraggableNodes:!0,drawGraph:null,isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,pointArrayMap:["from","to"],trackerGroups:["group","markerGroup","dataLabelsGroup"],drawTracker:e.TrackerMixin.drawTrackerPoint,animate:null,buildKDTree:e.noop,createNode:b.createNode,destroy:function(){this.layout&&this.layout.removeElementFromCollection(this,this.layout.series);b.destroy.call(this)},init:function(){l.prototype.init.apply(this,
arguments);d(this,"updatedData",function(){this.layout&&this.layout.stop()});return this},generatePoints:function(){var a;b.generatePoints.apply(this,arguments);this.options.nodes&&this.options.nodes.forEach(function(a){this.nodeLookup[a.id]||(this.nodeLookup[a.id]=this.createNode(a.id))},this);for(a=this.nodes.length-1;0<=a;a--){var c=this.nodes[a];c.degree=c.getDegree();c.radius=n(c.marker&&c.marker.radius,this.options.marker&&this.options.marker.radius,0);this.nodeLookup[c.id]||c.remove()}this.data.forEach(function(a){a.formatPrefix=
"link"});this.indexateNodes()},getPointsCollection:function(){return this.nodes||[]},indexateNodes:function(){this.nodes.forEach(function(a,b){a.index=b})},markerAttribs:function(a,b){b=l.prototype.markerAttribs.call(this,a,b);k(a.plotY)||(b.y=0);b.x=(a.plotX||0)-(b.width/2||0);return b},translate:function(){this.processedXData||this.processData();this.generatePoints();this.deferLayout();this.nodes.forEach(function(a){a.isInside=!0;a.linksFrom.forEach(function(a){a.shapeType="path";a.y=1})})},deferLayout:function(){var a=
this.options.layoutAlgorithm,b=this.chart.graphLayoutsStorage,c=this.chart.graphLayoutsLookup,d=this.chart.options.chart;if(this.visible){b||(this.chart.graphLayoutsStorage=b={},this.chart.graphLayoutsLookup=c=[]);var f=b[a.type];f||(a.enableSimulation=k(d.forExport)?!d.forExport:a.enableSimulation,b[a.type]=f=new e.layouts[a.type],f.init(a),c.splice(f.index,0,f));this.layout=f;f.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight);f.addElementsToCollection([this],f.series);f.addElementsToCollection(this.nodes,
f.nodes);f.addElementsToCollection(this.points,f.links)}},render:function(){var a=this.points,b=this.chart.hoverPoint,c=[];this.points=this.nodes;m.line.prototype.render.call(this);this.points=a;a.forEach(function(a){a.fromNode&&a.toNode&&(a.renderLink(),a.redrawLink())});b&&b.series===this&&this.redrawHalo(b);this.chart.hasRendered&&!this.options.dataLabels.allowOverlap&&(this.nodes.concat(this.points).forEach(function(a){a.dataLabel&&c.push(a.dataLabel)}),this.chart.hideOverlappingLabels(c))},drawDataLabels:function(){var a=
this.options.dataLabels.textPath;l.prototype.drawDataLabels.apply(this,arguments);this.points=this.data;this.options.dataLabels.textPath=this.options.dataLabels.linkTextPath;l.prototype.drawDataLabels.apply(this,arguments);this.points=this.nodes;this.options.dataLabels.textPath=a},pointAttribs:function(a,b){var c=b||a&&a.state||"normal";b=l.prototype.pointAttribs.call(this,a,c);c=this.options.states[c];a&&!a.isNode&&(b=a.getLinkAttributes(),c&&(b={stroke:c.linkColor||b.stroke,dashstyle:c.linkDashStyle||
b.dashstyle,opacity:n(c.linkOpacity,b.opacity),"stroke-width":c.linkColor||b["stroke-width"]}));return b},redrawHalo:f.redrawHalo,onMouseDown:f.onMouseDown,onMouseMove:f.onMouseMove,onMouseUp:f.onMouseUp,setState:function(a,b){b?(this.points=this.nodes.concat(this.data),l.prototype.setState.apply(this,arguments),this.points=this.data):l.prototype.setState.apply(this,arguments);this.layout.simulation||a||this.render()}},{setState:b.setNodeState,init:function(){a.prototype.init.apply(this,arguments);
this.series.options.draggable&&!this.series.chart.styledMode&&(d(this,"mouseOver",function(){h(this.series.chart.container,{cursor:"move"})}),d(this,"mouseOut",function(){h(this.series.chart.container,{cursor:"default"})}));return this},getDegree:function(){var a=this.isNode?this.linksFrom.length+this.linksTo.length:0;return 0===a?1:a},getLinkAttributes:function(){var a=this.series.options.link,b=this.options;return{"stroke-width":n(b.width,a.width),stroke:b.color||a.color,dashstyle:b.dashStyle||
a.dashStyle,opacity:n(b.opacity,a.opacity,1)}},renderLink:function(){if(!this.graphic&&(this.graphic=this.series.chart.renderer.path(this.getLinkPath()).add(this.series.group),!this.series.chart.styledMode)){var a=this.series.pointAttribs(this);this.graphic.attr(a);(this.dataLabels||[]).forEach(function(b){b&&b.attr({opacity:a.opacity})})}},redrawLink:function(){var a=this.getLinkPath();if(this.graphic){this.shapeArgs={d:a};if(!this.series.chart.styledMode){var b=this.series.pointAttribs(this);this.graphic.attr(b);
(this.dataLabels||[]).forEach(function(a){a&&a.attr({opacity:b.opacity})})}this.graphic.animate(this.shapeArgs);var c=a[0];a=a[1];"M"===c[0]&&"L"===a[0]&&(this.plotX=(c[1]+a[1])/2,this.plotY=(c[2]+a[2])/2)}},getMass:function(){var a=this.fromNode.mass,b=this.toNode.mass,c=a+b;return{fromNode:1-a/c,toNode:1-b/c}},getLinkPath:function(){var a=this.fromNode,b=this.toNode;a.plotX>b.plotX&&(a=this.toNode,b=this.fromNode);return[["M",a.plotX||0,a.plotY||0],["L",b.plotX||0,b.plotY||0]]},isValid:function(){return!this.isNode||
k(this.id)},remove:function(a,b){var c=this.series,d=c.options.nodes||[],e,f=d.length;if(this.isNode){c.points=[];[].concat(this.linksFrom).concat(this.linksTo).forEach(function(a){e=a.fromNode.linksFrom.indexOf(a);-1<e&&a.fromNode.linksFrom.splice(e,1);e=a.toNode.linksTo.indexOf(a);-1<e&&a.toNode.linksTo.splice(e,1);l.prototype.removePoint.call(c,c.data.indexOf(a),!1,!1)});c.points=c.data.slice();for(c.nodes.splice(c.nodes.indexOf(this),1);f--;)if(d[f].id===this.options.id){c.options.nodes.splice(f,
1);break}this&&this.destroy();c.isDirty=!0;c.isDirtyData=!0;a&&c.chart.redraw(a)}else c.removePoint(c.data.indexOf(this),a,b)},destroy:function(){this.isNode&&this.linksFrom.concat(this.linksTo).forEach(function(a){a.destroyElements&&a.destroyElements()});this.series.layout.removeElementFromCollection(this,this.series.layout[this.isNode?"nodes":"links"]);return a.prototype.destroy.apply(this,arguments)}});""});m(e,"masters/modules/networkgraph.src.js",[],function(){})});
//# sourceMappingURL=networkgraph.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+14
View File
@@ -0,0 +1,14 @@
/*
Highcharts JS v8.2.0 (2020-08-20)
Plugin for displaying a message when there is no data visible in chart.
(c) 2010-2019 Highsoft AS
Author: 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/no-data-to-display",["highcharts"],function(d){a(d);a.Highcharts=d;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function d(a,c,d,e){a.hasOwnProperty(c)||(a[c]=e.apply(null,d))}a=a?a._modules:{};d(a,"Extensions/NoDataToDisplay.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,c){var d=c.addEvent,e=c.extend,
f=c.getOptions;c=a.Chart.prototype;f=f();e(f.lang,{noData:"No data to display"});f.noData={attr:{zIndex:1},position:{x:0,y:0,align:"center",verticalAlign:"middle"},style:{fontWeight:"bold",fontSize:"12px",color:"#666666"}};c.showNoData=function(a){var b=this.options;a=a||b&&b.lang.noData;b=b&&b.noData;!this.noDataLabel&&this.renderer&&(this.noDataLabel=this.renderer.label(a,0,0,null,null,null,b.useHTML,null,"no-data"),this.styledMode||this.noDataLabel.attr(b.attr).css(b.style),this.noDataLabel.add(),
this.noDataLabel.align(e(this.noDataLabel.getBBox(),b.position),!1,"plotBox"))};c.hideNoData=function(){this.noDataLabel&&(this.noDataLabel=this.noDataLabel.destroy())};c.hasData=function(){for(var a=this.series||[],b=a.length;b--;)if(a[b].hasData()&&!a[b].options.isInternal)return!0;return this.loadingShown};d(a.Chart,"render",function(){this.hasData()?this.hideNoData():this.showNoData()})});d(a,"masters/modules/no-data-to-display.src.js",[],function(){})});
//# sourceMappingURL=no-data-to-display.js.map

Some files were not shown because too many files have changed in this diff Show More