최초 커밋

This commit is contained in:
2025-10-01 09:29:34 +09:00
commit a8b84ff39a
1677 changed files with 954149 additions and 0 deletions

View File

@@ -0,0 +1,204 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
interface Chart {
/**
* Dismiss popup content in chart, including export menu and tooltip.
*/
dismissPopupContent(): void;
/**
* Apply context to a format string from lang options of the chart.
*
* @param langKey
* Key (using dot notation) into lang option structure.
*
* @param context
* Context to apply to the format string.
*
* @return The formatted string.
*/
langFormat(langKey: string, context: Dictionary<any>): string;
}
/**
* Options for the keyboard navigation handler.
*/
interface KeyboardNavigationHandlerOptionsObject {
/**
* Function to run on initialization of module.
*/
init: Function;
/**
* An array containing pairs of an array of keycodes, mapped to a
* handler function. When the keycode is received, the handler is called
* with the keycode as parameter.
*/
keyCodeMap: Array<[Array<number>, Function]>;
/**
* Function to run before moving to next/prev module. Receives moving
* direction as parameter: +1 for next, -1 for previous.
*/
terminate?: Function;
/**
* Function to run to validate module. Should return false if module
* should not run, true otherwise. Receives chart as parameter.
*/
validate?: Function;
}
interface PointAccessibilityOptionsObject {
/**
* Provide a description of the data point, announced to screen readers.
*/
description?: string;
}
interface PointOptionsObject {
accessibility?: PointAccessibilityOptionsObject;
}
/**
* The AccessibilityComponent base class, representing a part of the chart
* that has accessibility logic connected to it. This class can be inherited
* from to create a custom accessibility component for a chart.
*
* Components should take care to destroy added elements and unregister
* event handlers on destroy. This is handled automatically if using
* this.addEvent and this.createElement.
*/
class AccessibilityComponent {
/**
* Called when accessibility is disabled or chart is destroyed.
*/
static destroy(): void;
/**
* Get keyboard navigation handler for this component.
*/
static getKeyboardNavigation(): KeyboardNavigationHandler;
/**
* Called on component initialization.
*/
static init(): void;
/**
* Called on every chart render.
*/
static onChartRender(): void;
/**
* Called on updates to the chart, including options changes. Note that
* this is also called on first render of chart.
*/
static onChartUpdate(): void;
}
/**
* Define a keyboard navigation handler for use with a
* Highcharts.AccessibilityComponent instance. This functions as an
* abstraction layer for keyboard navigation, and defines a map of keyCodes
* to handler functions.
*/
class KeyboardNavigationHandler {
/**
* Define a keyboard navigation handler for use with a
* Highcharts.AccessibilityComponent instance. This functions as an
* abstraction layer for keyboard navigation, and defines a map of
* keyCodes to handler functions.
*
* @param chart
* The chart this module should act on.
*
* @param options
* Options for the keyboard navigation handler.
*/
constructor(chart: Chart, options: KeyboardNavigationHandlerOptionsObject);
}
/**
* i18n formatting function. Extends Highcharts.format() functionality by
* also handling arrays and plural conditionals. Arrays can be indexed as
* follows:
*
* - Format: 'This is the first index: {myArray[0]}. The last:
* {myArray[-1]}.'
*
* - Context: { myArray: [0, 1, 2, 3, 4, 5] }
*
* - Result: 'This is the first index: 0. The last: 5.'
*
* They can also be iterated using the #each() function. This will repeat
* the contents of the bracket expression for each element. Example:
*
* - Format: 'List contains: {#each(myArray)cm }'
*
* - Context: { myArray: [0, 1, 2] }
*
* - Result: 'List contains: 0cm 1cm 2cm '
*
* The #each() function optionally takes a length parameter. If positive,
* this parameter specifies the max number of elements to iterate through.
* If negative, the function will subtract the number from the length of the
* array. Use this to stop iterating before the array ends. Example:
*
* - Format: 'List contains: {#each(myArray, -1) }and {myArray[-1]}.'
*
* - Context: { myArray: [0, 1, 2, 3] }
*
* - Result: 'List contains: 0, 1, 2, and 3.'
*
* Use the #plural() function to pick a string depending on whether or not a
* context object is 1. Arguments are #plural(obj, plural, singular).
* Example:
*
* - Format: 'Has {numPoints} {#plural(numPoints, points, point}.'
*
* - Context: { numPoints: 5 }
*
* - Result: 'Has 5 points.'
*
* Optionally there are additional parameters for dual and none:
* #plural(obj, plural, singular, dual, none). Example:
*
* - Format: 'Has {#plural(numPoints, many points, one point, two points,
* none}.'
*
* - Context: { numPoints: 2 }
*
* - Result: 'Has two points.'
*
* The dual or none parameters will take precedence if they are supplied.
*
* @param formatString
* The string to format.
*
* @param context
* Context to apply to the format string.
*
* @param chart
* A `Chart` instance with a time object and numberFormatter, passed
* on to format().
*
* @return The formatted string.
*/
function i18nFormat(formatString: string, context: Dictionary<any>, chart: Chart): string;
/**
* If we have a clear root option node for old and new options and a mapping
* between, we can use this generic function for the copy and warn logic.
*/
function deprecateFromOptionsMap(): void;
/**
* Put accessible info on series and points of a series.
*
* @param series
* The series to add info on.
*/
function describeSeries(series: Series): void;
function getAxisDescription(axis: Axis): string;
function getChartTitle(): string;
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,173 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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(t){a(t);a.Highcharts=t;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function t(a,f,l,m){a.hasOwnProperty(f)||(a[f]=m.apply(null,l))}a=a?a._modules:{};t(a,"modules/accessibility/utils/htmlUtilities.js",[a["parts/Utilities.js"],a["parts/Globals.js"]],function(a,f){function q(a){return a.replace(/&/g,
"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")}var m=a.merge,p=f.win,e=p.document;return{addClass:function(a,g){a.classList?a.classList.add(g):0>a.className.indexOf(g)&&(a.className+=g)},escapeStringForHTML:q,getElement:function(a){return e.getElementById(a)},getFakeMouseEvent:function(a){if("function"===typeof p.MouseEvent)return new p.MouseEvent(a);if(e.createEvent){var g=e.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 g=a.childNodes.length;g--;)a.appendChild(a.childNodes[g])},setElAttrs:function(a,g){Object.keys(g).forEach(function(e){var c=g[e];null===c?a.removeAttribute(e):(c=q(""+c),a.setAttribute(e,c))})},stripHTMLTagsFromString:function(a){return"string"===typeof a?a.replace(/<\/?[^>]+(>|$)/g,""):a},visuallyHideElement:function(a){m(!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"})}}});t(a,"modules/accessibility/utils/chartUtilities.js",[a["modules/accessibility/utils/htmlUtilities.js"],a["parts/Utilities.js"]],function(a,f){function q(a){if(a.points&&a.points.length&&a.points[0].graphic)return a.points[0].graphic.element}function m(a){var g=
q(a);return g&&g.parentNode||a.graph&&a.graph.element||a.group&&a.group.element}function p(a,e){e.setAttribute("aria-hidden",!1);e!==a.renderTo&&e.parentNode&&(Array.prototype.forEach.call(e.parentNode.childNodes,function(a){a.hasAttribute("aria-hidden")||a.setAttribute("aria-hidden",!0)}),p(a,e.parentNode))}var e=a.stripHTMLTagsFromString,h=f.find;return{getChartTitle:function(a){return e(a.options.title.text||a.langFormat("accessibility.defaultChartTitle",{chart:a}))},getAxisDescription:function(a){return e(a&&
(a.userOptions&&a.userOptions.accessibility&&a.userOptions.accessibility.description||a.axisTitle&&a.axisTitle.textStr||a.options.id||a.categories&&"categories"||a.isDatetimeAxis&&"Time"||"values"))},getPointFromXY:function(a,e,c){for(var d=a.length,b;d--;)if(b=h(a[d].points||[],function(b){return b.x===e&&b.y===c}))return b},getSeriesFirstPointElement:q,getSeriesFromName:function(a,e){return e?(a.series||[]).filter(function(a){return a.name===e}):a.series},getSeriesA11yElement:m,unhideChartElementFromAT:p,
hideSeriesFromAT:function(a){(a=m(a))&&a.setAttribute("aria-hidden",!0)}}});t(a,"modules/accessibility/KeyboardNavigationHandler.js",[a["parts/Utilities.js"]],function(a){function q(a,q){this.chart=a;this.keyCodeMap=q.keyCodeMap||[];this.validate=q.validate;this.init=q.init;this.terminate=q.terminate;this.response={success:1,prev:2,next:3,noHandler:4,fail:5}}var l=a.find;q.prototype={run:function(a){var q=a.which||a.keyCode,e=this.response.noHandler,h=l(this.keyCodeMap,function(a){return-1<a[0].indexOf(q)});
h?e=h[1].call(this,q,a):9===q&&(e=this.response[a.shiftKey?"prev":"next"]);return e}};return q});t(a,"modules/accessibility/utils/EventProvider.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,f){var q=f.addEvent;f=f.extend;var m=function(){this.eventRemovers=[]};f(m.prototype,{addEvent:function(){var f=q.apply(a,arguments);this.eventRemovers.push(f);return f},removeAddedEvents:function(){this.eventRemovers.forEach(function(a){a()});this.eventRemovers=[]}});return m});t(a,"modules/accessibility/utils/DOMElementProvider.js",
[a["parts/Globals.js"],a["parts/Utilities.js"],a["modules/accessibility/utils/htmlUtilities.js"]],function(a,f,l){var q=a.win.document;a=f.extend;var p=l.removeElement;l=function(){this.elements=[]};a(l.prototype,{createElement:function(){var a=q.createElement.apply(q,arguments);this.elements.push(a);return a},destroyCreatedElements:function(){this.elements.forEach(function(a){p(a)});this.elements=[]}});return l});t(a,"modules/accessibility/AccessibilityComponent.js",[a["parts/Globals.js"],a["parts/Utilities.js"],
a["modules/accessibility/utils/htmlUtilities.js"],a["modules/accessibility/utils/chartUtilities.js"],a["modules/accessibility/utils/EventProvider.js"],a["modules/accessibility/utils/DOMElementProvider.js"]],function(a,f,l,m,p,e){function h(){}var g=a.win,n=g.document,c=a.fireEvent;a=f.extend;var d=f.merge,b=l.removeElement,r=l.getFakeMouseEvent,k=m.unhideChartElementFromAT;h.prototype={initBase:function(b){this.chart=b;this.eventProvider=new p;this.domElementProvider=new e;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,a){var d=a.type;n.createEvent&&(b.dispatchEvent||b.fireEvent)?b.dispatchEvent?b.dispatchEvent(a):b.fireEvent(d,a):c(b,d,a)},fakeClickEvent:function(b){if(b){var a=r("click");this.fireEventOnWrappedOrUnwrappedElement(b,
a)}},addProxyGroup:function(b){this.createOrUpdateProxyContainer();var a=this.createElement("div");Object.keys(b||{}).forEach(function(d){null!==b[d]&&a.setAttribute(d,b[d])});this.chart.a11yProxyContainer.appendChild(a);return a},createOrUpdateProxyContainer:function(){var b=this.chart,a=b.renderer.box;b.a11yProxyContainer=b.a11yProxyContainer||this.createProxyContainerElement();a.nextSibling!==b.a11yProxyContainer&&b.container.insertBefore(b.a11yProxyContainer,a.nextSibling)},createProxyContainerElement:function(){var b=
n.createElement("div");b.className="highcharts-a11y-proxy-container";return b},createProxyButton:function(b,a,r,c,e){var x=b.element,v=this.createElement("button"),u=d({"aria-label":x.getAttribute("aria-label")},r);b=this.getElementPosition(c||b);Object.keys(u).forEach(function(b){null!==u[b]&&v.setAttribute(b,u[b])});v.className="highcharts-a11y-proxy-button";e&&this.addEvent(v,"click",e);this.setProxyButtonStyle(v,b);this.proxyMouseEventsForButton(x,v);a.appendChild(v);u["aria-hidden"]||k(this.chart,
v);return v},getElementPosition:function(b){var a=b.element;return(b=this.chart.renderTo)&&a&&a.getBoundingClientRect?(a=a.getBoundingClientRect(),b=b.getBoundingClientRect(),{x:a.left-b.left,y:a.top-b.top,width:a.right-a.left,height:a.bottom-a.top}):{x:0,y:0,width:1,height:1}},setProxyButtonStyle:function(b,a){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",width:(a.width||1)+"px",height:(a.height||1)+"px",left:(a.x||0)+"px",top:(a.y||0)+"px"})},proxyMouseEventsForButton:function(b,a){var d=this;"click touchstart touchend touchcancel touchmove mouseover mouseenter mouseleave mouseout".split(" ").forEach(function(r){d.addEvent(a,r,function(a){var r=d.cloneMouseEvent(a);b&&d.fireEventOnWrappedOrUnwrappedElement(b,r);a.stopPropagation();a.preventDefault()})})},cloneMouseEvent:function(b){if("function"===
typeof g.MouseEvent)return new g.MouseEvent(b.type,b);if(n.createEvent){var a=n.createEvent("MouseEvent");if(a.initMouseEvent)return a.initMouseEvent(b.type,b.bubbles,b.cancelable,b.view||g,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget),a}return r(b.type)},destroyBase:function(){b(this.chart.a11yProxyContainer);this.domElementProvider.destroyCreatedElements();this.eventProvider.removeAddedEvents()}};a(h.prototype,{init:function(){},
getKeyboardNavigation:function(){},onChartUpdate:function(){},onChartRender:function(){},destroy:function(){}});return h});t(a,"modules/accessibility/KeyboardNavigation.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["modules/accessibility/utils/htmlUtilities.js"],a["modules/accessibility/utils/EventProvider.js"]],function(a,f,l,m){function q(a,b){this.init(a,b)}var e=a.win,h=e.document,g=f.addEvent,n=f.fireEvent,c=l.getElement;g(h,"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 a=this;n(this,"dismissPopupContent",{},function(){a.tooltip&&a.tooltip.hide(0);a.hideExportMenu()})};q.prototype={init:function(a,b){var d=this,k=this.eventProvider=new m;this.chart=a;this.components=b;this.modules=[];this.currentModuleIx=0;k.addEvent(a.renderTo,"keydown",function(b){return d.onKeydown(b)});k.addEvent(a.container,"focus",function(b){return d.onFocus(b)});k.addEvent(h,"mouseup",
function(){return d.onMouseUp()});k.addEvent(a.renderTo,"mouseover",function(){d.pointerIsOverChart=!0});k.addEvent(a.renderTo,"mouseout",function(){d.pointerIsOverChart=!1});this.update();this.modules.length&&this.modules[0].init(1)},update:function(a){var b=this.chart.options.accessibility;b=b&&b.keyboardNavigation;var d=this.components;this.updateContainerTabindex();b&&b.enabled&&a&&a.length?(this.modules=a.reduce(function(b,a){a=d[a].getKeyboardNavigation();return b.concat(a)},[]),this.updateExitAnchor()):
(this.modules=[],this.currentModuleIx=0,this.removeExitAnchor())},onFocus:function(a){var b,d=this.chart;a.relatedTarget&&d.container.contains(a.relatedTarget)||(null===(b=this.modules[0])||void 0===b?void 0:b.init(1))},onMouseUp:function(){if(!this.keyboardReset&&!this.pointerIsOverChart){var a=this.chart,b=this.modules&&this.modules[this.currentModuleIx||0];b&&b.terminate&&b.terminate();a.focusElement&&a.focusElement.removeFocusBorder();this.currentModuleIx=0;this.keyboardReset=!0}},onKeydown:function(a){a=
a||e.event;var b,d=this.modules&&this.modules.length&&this.modules[this.currentModuleIx];this.keyboardReset=!1;if(d){var k=d.run(a);k===d.response.success?b=!0:k===d.response.prev?b=this.prev():k===d.response.next&&(b=this.next());b&&(a.preventDefault(),a.stopPropagation())}},prev:function(){return this.move(-1)},next:function(){return this.move(1)},move:function(a){var b=this.modules&&this.modules[this.currentModuleIx];b&&b.terminate&&b.terminate(a);this.chart.focusElement&&this.chart.focusElement.removeFocusBorder();
this.currentModuleIx+=a;if(b=this.modules&&this.modules[this.currentModuleIx]){if(b.validate&&!b.validate())return this.move(a);if(b.init)return b.init(a),!0}this.currentModuleIx=0;0<a?(this.exiting=!0,this.exitAnchor.focus()):this.chart.container.focus();return!1},updateExitAnchor:function(){var a=c("highcharts-end-of-chart-marker-"+this.chart.index);this.removeExitAnchor();a?(this.makeElementAnExitAnchor(a),this.exitAnchor=a):this.createExitAnchor()},updateContainerTabindex:function(){var a=this.chart.options.accessibility;
a=a&&a.keyboardNavigation;a=!(a&&!1===a.enabled);var b=this.chart.container,r=b.getAttribute("tabIndex");a&&!r?b.setAttribute("tabindex","0"):a||"0"!==r||b.removeAttribute("tabindex")},makeElementAnExitAnchor:function(a){a.setAttribute("class","highcharts-exit-anchor");a.setAttribute("tabindex","0");a.setAttribute("aria-hidden",!1);this.addExitAnchorEventsToEl(a)},createExitAnchor:function(){var a=this.chart,b=this.exitAnchor=h.createElement("div");a.renderTo.appendChild(b);this.makeElementAnExitAnchor(b)},
removeExitAnchor:function(){this.exitAnchor&&this.exitAnchor.parentNode&&(this.exitAnchor.parentNode.removeChild(this.exitAnchor),delete this.exitAnchor)},addExitAnchorEventsToEl:function(a){var b=this.chart,d=this;this.eventProvider.addEvent(a,"focus",function(a){a=a||e.event;a.relatedTarget&&b.container.contains(a.relatedTarget)||d.exiting?d.exiting=!1:(b.renderTo.focus(),a.preventDefault(),d.modules&&d.modules.length&&(d.currentModuleIx=d.modules.length-1,(a=d.modules[d.currentModuleIx])&&a.validate&&
!a.validate()?d.prev():a&&a.init(-1)))})},destroy:function(){this.removeExitAnchor();this.eventProvider.removeAddedEvents();"0"===this.chart.container.getAttribute("tabindex")&&this.chart.container.removeAttribute("tabindex")}};return q});t(a,"modules/accessibility/components/LegendComponent.js",[a["parts/Globals.js"],a["parts/Legend.js"],a["parts/Utilities.js"],a["modules/accessibility/AccessibilityComponent.js"],a["modules/accessibility/KeyboardNavigationHandler.js"],a["modules/accessibility/utils/htmlUtilities.js"]],
function(a,f,l,m,p,e){var h=l.addEvent,g=l.extend,n=l.fireEvent,c=e.stripHTMLTagsFromString,d=e.removeElement;a.Chart.prototype.highlightLegendItem=function(b){var a=this.legend.allItems,d=this.highlightedLegendItemIx;if(a[b]){a[d]&&n(a[d].legendGroup.element,"mouseout");d=this.legend;var c=d.allItems[b].pageIx,e=d.currentPage;"undefined"!==typeof c&&c+1!==e&&d.scroll(1+c-e);this.setFocusToElement(a[b].legendItem,a[b].a11yProxyElement);n(a[b].legendGroup.element,"mouseover");return!0}return!1};h(f,
"afterColorizeItem",function(a){var b=a.item;this.chart.options.accessibility.enabled&&b&&b.a11yProxyElement&&b.a11yProxyElement.setAttribute("aria-pressed",a.visible?"false":"true")});a=function(){};a.prototype=new m;g(a.prototype,{init:function(){var a=this;this.addEvent(f,"afterScroll",function(){this.chart===a.chart&&a.updateProxies()})},updateLegendItemProxyVisibility:function(){var a=this.chart.legend,d=a.currentPage||1;(a.allItems||[]).forEach(function(a){var b=(a.pageIx||0)!==d-1;a.a11yProxyElement&&
(a.a11yProxyElement.style.visibility=b?"hidden":"visible")})},onChartRender:function(){this.legendProxyButtonClicked?delete this.legendProxyButtonClicked:this.updateProxies()},updateProxies:function(){d(this.legendProxyGroup);var a=this.chart,c=a.legend&&a.legend.allItems,k=a.options.legend.accessibility||{};!c||!c.length||a.colorAxis&&a.colorAxis.length||!1===k.enabled||(this.addLegendProxyGroup(),this.proxyLegendItems(),this.updateLegendItemProxyVisibility())},addLegendProxyGroup:function(){var a=
this.chart.options.accessibility,d=this.chart.langFormat("accessibility.legend.legendLabel",{});this.legendProxyGroup=this.addProxyGroup({"aria-label":d,role:"all"===a.landmarkVerbosity?"region":null})},proxyLegendItems:function(){var a=this;(this.chart.legend&&this.chart.legend.allItems||[]).forEach(function(b){b.legendItem&&b.legendItem.element&&a.proxyLegendItem(b)})},proxyLegendItem:function(a){var b=this,d=this.chart.langFormat("accessibility.legend.legendItem",{chart:this.chart,itemName:c(a.name)});
a.a11yProxyElement=this.createProxyButton(a.legendItem,this.legendProxyGroup,{tabindex:-1,"aria-pressed":!a.visible,"aria-label":d},a.legendGroup.div?a.legendItem:a.legendGroup,function(){b.legendProxyButtonClicked=!0})},getKeyboardNavigation:function(){var a=this.keyCodes,d=this;return new p(this.chart,{keyCodeMap:[[[a.left,a.right,a.up,a.down],function(a){return d.onKbdArrowKey(this,a)}],[[a.enter,a.space],function(){return d.onKbdClick(this)}]],validate:function(){return d.shouldHaveLegendNavigation()},
init:function(a){return d.onKbdNavigationInit(a)}})},onKbdArrowKey:function(a,d){var b=this.keyCodes,c=a.response,r=this.chart,v=r.options.accessibility,e=r.legend.allItems.length;d=d===b.left||d===b.up?-1:1;return r.highlightLegendItem(this.highlightedLegendItemIx+d)?(this.highlightedLegendItemIx+=d,c.success):1<e&&v.keyboardNavigation.wrapAround?(a.init(d),c.success):c[0<d?"next":"prev"]},onKbdClick:function(a){var b=this.chart.legend.allItems[this.highlightedLegendItemIx];b&&b.a11yProxyElement&&
n(b.a11yProxyElement,"click");return a.response.success},shouldHaveLegendNavigation:function(){var a=this.chart,d=a.colorAxis&&a.colorAxis.length,c=(a.options.legend||{}).accessibility||{};return!!(a.legend&&a.legend.allItems&&a.legend.display&&!d&&c.enabled&&c.keyboardNavigation&&c.keyboardNavigation.enabled)},onKbdNavigationInit:function(a){var b=this.chart,d=b.legend.allItems.length-1;a=0<a?0:d;b.highlightLegendItem(a);this.highlightedLegendItemIx=a}});return a});t(a,"modules/accessibility/components/MenuComponent.js",
[a["parts/Globals.js"],a["parts/Utilities.js"],a["modules/accessibility/AccessibilityComponent.js"],a["modules/accessibility/KeyboardNavigationHandler.js"],a["modules/accessibility/utils/chartUtilities.js"],a["modules/accessibility/utils/htmlUtilities.js"]],function(a,f,l,m,p,e){function h(a){return a.exportSVGElements&&a.exportSVGElements[0]}f=f.extend;var g=p.unhideChartElementFromAT,n=e.removeElement,c=e.getFakeMouseEvent;a.Chart.prototype.showExportMenu=function(){var a=h(this);if(a&&(a=a.element,
a.onclick))a.onclick(c("click"))};a.Chart.prototype.hideExportMenu=function(){var a=this.exportDivElements;a&&this.exportContextMenu&&(a.forEach(function(a){if("highcharts-menu-item"===a.className&&a.onmouseout)a.onmouseout(c("mouseout"))}),this.highlightedExportItemIx=0,this.exportContextMenu.hideMenu(),this.container.focus())};a.Chart.prototype.highlightExportItem=function(a){var b=this.exportDivElements&&this.exportDivElements[a],d=this.exportDivElements&&this.exportDivElements[this.highlightedExportItemIx];
if(b&&"LI"===b.tagName&&(!b.children||!b.children.length)){var k=!!(this.renderTo.getElementsByTagName("g")[0]||{}).focus;b.focus&&k&&b.focus();if(d&&d.onmouseout)d.onmouseout(c("mouseout"));if(b.onmouseover)b.onmouseover(c("mouseover"));this.highlightedExportItemIx=a;return!0}return!1};a.Chart.prototype.highlightLastExportItem=function(){var a;if(this.exportDivElements)for(a=this.exportDivElements.length;a--;)if(this.highlightExportItem(a))return!0;return!1};a=function(){};a.prototype=new l;f(a.prototype,
{init:function(){var a=this.chart,b=this;this.addEvent(a,"exportMenuShown",function(){b.onMenuShown()});this.addEvent(a,"exportMenuHidden",function(){b.onMenuHidden()})},onMenuHidden:function(){var a=this.chart.exportContextMenu;a&&a.setAttribute("aria-hidden","true");this.isExportMenuShown=!1;this.setExportButtonExpandedState("false")},onMenuShown:function(){var a=this.chart,b=a.exportContextMenu;b&&(this.addAccessibleContextMenuAttribs(),g(a,b));this.isExportMenuShown=!0;this.setExportButtonExpandedState("true")},
setExportButtonExpandedState:function(a){var b=this.exportButtonProxy;b&&b.setAttribute("aria-expanded",a)},onChartRender:function(){var a=this.chart,b=a.options.accessibility;n(this.exportProxyGroup);var c=a.options.exporting,k=h(a);c&&!1!==c.enabled&&c.accessibility&&c.accessibility.enabled&&k&&k.element&&(this.exportProxyGroup=this.addProxyGroup("all"===b.landmarkVerbosity?{"aria-label":a.langFormat("accessibility.exporting.exportRegionLabel",{chart:a}),role:"region"}:{}),b=h(this.chart),this.exportButtonProxy=
this.createProxyButton(b,this.exportProxyGroup,{"aria-label":a.langFormat("accessibility.exporting.menuButtonLabel",{chart:a}),"aria-expanded":"false"}))},addAccessibleContextMenuAttribs:function(){var a=this.chart,b=a.exportDivElements;b&&b.length&&(b.forEach(function(a){"LI"!==a.tagName||a.children&&a.children.length?a.setAttribute("aria-hidden","true"):a.setAttribute("tabindex",-1)}),b=b[0].parentNode,b.removeAttribute("aria-hidden"),b.setAttribute("aria-label",a.langFormat("accessibility.exporting.chartMenuLabel",
{chart:a})))},getKeyboardNavigation:function(){var a=this.keyCodes,b=this.chart,c=this;return new m(b,{keyCodeMap:[[[a.left,a.up],function(){return c.onKbdPrevious(this)}],[[a.right,a.down],function(){return c.onKbdNext(this)}],[[a.enter,a.space],function(){return c.onKbdClick(this)}],[[a.esc],function(){return this.response.prev}]],validate:function(){return b.exportChart&&!1!==b.options.exporting.enabled&&!1!==b.options.exporting.accessibility.enabled},init:function(){var a=c.exportButtonProxy,
d=b.exportingGroup;d&&a&&b.setFocusToElement(d,a)},terminate:function(){b.hideExportMenu()}})},onKbdPrevious:function(a){var b=this.chart,d=b.options.accessibility;a=a.response;for(var c=b.highlightedExportItemIx||0;c--;)if(b.highlightExportItem(c))return a.success;return d.keyboardNavigation.wrapAround?(b.highlightLastExportItem(),a.success):a.prev},onKbdNext:function(a){var b=this.chart,c=b.options.accessibility;a=a.response;for(var d=(b.highlightedExportItemIx||0)+1;d<b.exportDivElements.length;++d)if(b.highlightExportItem(d))return a.success;
return c.keyboardNavigation.wrapAround?(b.highlightExportItem(0),a.success):a.next},onKbdClick:function(a){var b=this.chart,c=b.exportDivElements[b.highlightedExportItemIx],d=h(b).element;this.isExportMenuShown?this.fakeClickEvent(c):(this.fakeClickEvent(d),b.highlightExportItem(0));return a.response.success}});return a});t(a,"modules/accessibility/components/SeriesComponent/SeriesKeyboardNavigation.js",[a["parts/Globals.js"],a["parts/Point.js"],a["parts/Utilities.js"],a["modules/accessibility/KeyboardNavigationHandler.js"],
a["modules/accessibility/utils/EventProvider.js"],a["modules/accessibility/utils/chartUtilities.js"]],function(a,f,l,m,p,e){function h(a){var b=a.index,c=a.series.points,d=c.length;if(c[b]!==a)for(;d--;){if(c[d]===a)return d}else return b}function g(a){var b=a.chart.options.accessibility.keyboardNavigation.seriesNavigation,c=a.options.accessibility||{},d=c.keyboardNavigation;return d&&!1===d.enabled||!1===c.enabled||!1===a.options.enableMouseTracking||!a.visible||b.pointNavigationEnabledThreshold&&
b.pointNavigationEnabledThreshold<=a.points.length}function n(a){var b=a.series.chart.options.accessibility;return a.isNull&&b.keyboardNavigation.seriesNavigation.skipNullPoints||!1===a.visible||g(a.series)}function c(a,b,c,d){var e=Infinity,v=b.points.length,w=function(a){return!(k(a.plotX)&&k(a.plotY))};if(!w(a)){for(;v--;){var u=b.points[v];if(!w(u)&&(u=(a.plotX-u.plotX)*(a.plotX-u.plotX)*(c||1)+(a.plotY-u.plotY)*(a.plotY-u.plotY)*(d||1),u<e)){e=u;var r=v}}return k(r)?b.points[r]:void 0}}function d(a){var b=
!1;delete a.highlightedPoint;return b=a.series.reduce(function(a,b){return a||b.highlightFirstValidPoint()},!1)}function b(a,b){this.keyCodes=b;this.chart=a}var r=l.extend,k=l.defined,x=e.getPointFromXY,q=e.getSeriesFromName;a.Series.prototype.keyboardMoveVertical=!0;["column","pie"].forEach(function(b){a.seriesTypes[b]&&(a.seriesTypes[b].prototype.keyboardMoveVertical=!1)});f.prototype.highlight=function(){var a=this.series.chart;if(this.isNull)a.tooltip&&a.tooltip.hide(0);else this.onMouseOver();
this.graphic&&a.setFocusToElement(this.graphic);a.highlightedPoint=this;return this};a.Chart.prototype.highlightAdjacentPoint=function(a){var b=this.series,c=this.highlightedPoint,d=c&&h(c)||0,k=c&&c.series.points,e=this.series&&this.series[this.series.length-1];e=e&&e.points&&e.points[e.points.length-1];if(!b[0]||!b[0].points)return!1;if(c){if(b=b[c.series.index+(a?1:-1)],d=k[d+(a?1:-1)],!d&&b&&(d=b.points[a?0:b.points.length-1]),!d)return!1}else d=a?b[0].points[0]:e;return n(d)?(b=d.series,g(b)?
this.highlightedPoint=a?b.points[b.points.length-1]:b.points[0]:this.highlightedPoint=d,this.highlightAdjacentPoint(a)):d.highlight()};a.Series.prototype.highlightFirstValidPoint=function(){var a=this.chart.highlightedPoint,b=(a&&a.series)===this?h(a):0;a=this.points;var c=a.length;if(a&&c){for(var d=b;d<c;++d)if(!n(a[d]))return a[d].highlight();for(;0<=b;--b)if(!n(a[b]))return a[b].highlight()}return!1};a.Chart.prototype.highlightAdjacentSeries=function(a){var b,d=this.highlightedPoint;var e=(b=
this.series&&this.series[this.series.length-1])&&b.points&&b.points[b.points.length-1];if(!this.highlightedPoint)return b=a?this.series&&this.series[0]:b,(e=a?b&&b.points&&b.points[0]:e)?e.highlight():!1;b=this.series[d.series.index+(a?-1:1)];if(!b)return!1;e=c(d,b,4);if(!e)return!1;if(g(b))return e.highlight(),a=this.highlightAdjacentSeries(a),a?a:(d.highlight(),!1);e.highlight();return e.series.highlightFirstValidPoint()};a.Chart.prototype.highlightAdjacentPointVertical=function(a){var b=this.highlightedPoint,
d=Infinity,c;if(!k(b.plotX)||!k(b.plotY))return!1;this.series.forEach(function(e){g(e)||e.points.forEach(function(r){if(k(r.plotY)&&k(r.plotX)&&r!==b){var w=r.plotY-b.plotY,g=Math.abs(r.plotX-b.plotX);g=Math.abs(w)*Math.abs(w)+g*g*4;e.yAxis&&e.yAxis.reversed&&(w*=-1);!(0>=w&&a||0<=w&&!a||5>g||n(r))&&g<d&&(d=g,c=r)}})});return c?c.highlight():!1};r(b.prototype,{init:function(){var b=this,c=this.chart,e=this.eventProvider=new p;e.addEvent(a.Series,"destroy",function(){return b.onSeriesDestroy(this)});
e.addEvent(c,"afterDrilldown",function(){d(this);this.focusElement&&this.focusElement.removeFocusBorder()});e.addEvent(c,"drilldown",function(a){a=a.point;var d=a.series;b.lastDrilledDownPoint={x:a.x,y:a.y,seriesName:d?d.name:""}});e.addEvent(c,"drillupall",function(){setTimeout(function(){b.onDrillupAll()},10)})},onDrillupAll:function(){var a=this.lastDrilledDownPoint,b=this.chart,d=a&&q(b,a.seriesName),c;a&&d&&k(a.x)&&k(a.y)&&(c=x(d,a.x,a.y));b.container&&b.container.focus();c&&c.highlight&&c.highlight();
b.focusElement&&b.focusElement.removeFocusBorder()},getKeyboardNavigationHandler:function(){var a=this,b=this.keyCodes,d=this.chart,c=d.inverted;return new m(d,{keyCodeMap:[[c?[b.up,b.down]:[b.left,b.right],function(b){return a.onKbdSideways(this,b)}],[c?[b.left,b.right]:[b.up,b.down],function(b){return a.onKbdVertical(this,b)}],[[b.enter,b.space],function(){d.highlightedPoint&&d.highlightedPoint.firePointEvent("click");return this.response.success}]],init:function(b){return a.onHandlerInit(this,
b)},terminate:function(){return a.onHandlerTerminate()}})},onKbdSideways:function(a,b){var d=this.keyCodes;return this.attemptHighlightAdjacentPoint(a,b===d.right||b===d.down)},onKbdVertical:function(a,b){var d=this.chart,c=this.keyCodes;b=b===c.down||b===c.right;c=d.options.accessibility.keyboardNavigation.seriesNavigation;if(c.mode&&"serialize"===c.mode)return this.attemptHighlightAdjacentPoint(a,b);d[d.highlightedPoint&&d.highlightedPoint.series.keyboardMoveVertical?"highlightAdjacentPointVertical":
"highlightAdjacentSeries"](b);return a.response.success},onHandlerInit:function(a,b){var c=this.chart;if(0<b)d(c);else{b=c.series.length;for(var e;b--&&!(c.highlightedPoint=c.series[b].points[c.series[b].points.length-1],e=c.series[b].highlightFirstValidPoint()););}return a.response.success},onHandlerTerminate:function(){var a=this.chart,b=a.highlightedPoint;a.tooltip&&a.tooltip.hide(0);b&&(b.onMouseOut(),delete a.highlightedPoint)},attemptHighlightAdjacentPoint:function(a,b){var c=this.chart,d=c.options.accessibility.keyboardNavigation.wrapAround;
return c.highlightAdjacentPoint(b)?a.response.success:d?a.init(b?1:-1):a.response[b?"next":"prev"]},onSeriesDestroy:function(a){var b=this.chart;b.highlightedPoint&&b.highlightedPoint.series===a&&(delete b.highlightedPoint,b.focusElement&&b.focusElement.removeFocusBorder())},destroy:function(){this.eventProvider.removeAddedEvents()}});return b});t(a,"modules/accessibility/components/AnnotationsA11y.js",[a["parts/Utilities.js"],a["modules/accessibility/utils/htmlUtilities.js"]],function(a,f){function q(a){return(a.annotations||
[]).reduce(function(a,b){var c;!1!==(null===(c=b.options)||void 0===c?void 0:c.visible)&&(a=a.concat(b.labels));return a},[])}function m(a){var c,b,e,k,g=null===(b=null===(c=a.options)||void 0===c?void 0:c.accessibility)||void 0===b?void 0:b.description;return g?g:(null===(k=null===(e=a.graphic)||void 0===e?void 0:e.text)||void 0===k?void 0:k.textStr)||""}function p(a){var c,b,e=null===(b=null===(c=a.options)||void 0===c?void 0:c.accessibility)||void 0===b?void 0:b.description;if(e)return e;c=a.chart;
b=m(a);e=a.points.filter(function(a){return!!a.graphic}).map(function(a){var b,c;if(!(c=null===(b=null===a||void 0===a?void 0:a.accessibility)||void 0===b?void 0:b.valueDescription)){var d,e;c=(null===(e=null===(d=null===a||void 0===a?void 0:a.graphic)||void 0===d?void 0:d.element)||void 0===e?void 0:e.getAttribute("aria-label"))||""}a=(null===a||void 0===a?void 0:a.series.name)||"";return(a?a+", ":"")+"data point "+c}).filter(function(a){return!!a});var k=e.length;a="accessibility.screenReaderSection.annotations.description"+
(1<k?"MultiplePoints":k?"SinglePoint":"NoPoints");b={annotationText:b,numPoints:k,annotationPoint:e[0],additionalAnnotationPoints:e.slice(1)};return c.langFormat(a,b)}function e(a){return q(a).map(function(a){return(a=g(n(p(a))))?"<li>"+a+"</li>":""})}var h=a.inArray,g=f.escapeStringForHTML,n=f.stripHTMLTagsFromString;return{getAnnotationsInfoHTML:function(a){var c=a.annotations;return c&&c.length?"<ul>"+e(a).join(" ")+"</ul>":""},getAnnotationLabelDescription:p,getAnnotationListItems:e,getPointAnnotationTexts:function(a){var c=
q(a.series.chart).filter(function(b){return-1<h(a,b.points)});return c.length?c.map(function(a){return""+m(a)}):[]}}});t(a,"modules/accessibility/components/SeriesComponent/SeriesDescriber.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["modules/accessibility/components/AnnotationsA11y.js"],a["modules/accessibility/utils/htmlUtilities.js"],a["modules/accessibility/utils/chartUtilities.js"],a["parts/Tooltip.js"]],function(a,f,l,m,p,e){function h(a){var b=a.index;return a.series&&a.series.data&&
F(b)?D(a.series.data,function(a){return!!(a&&"undefined"!==typeof a.index&&a.index>b&&a.graphic&&a.graphic.element)})||null:null}function g(a){var b=a.chart.options.accessibility.series.pointDescriptionEnabledThreshold;return!!(!1!==b&&a.points&&a.points.length>=b)}function n(a){var b=a.options.accessibility||{};return!g(a)&&!b.exposeAsGroupOnly}function c(a){var b=a.chart.options.accessibility.keyboardNavigation.seriesNavigation;return!(!a.points||!(a.points.length<b.pointNavigationEnabledThreshold||
!1===b.pointNavigationEnabledThreshold))}function d(a,b){var c=a.series.chart,d=c.options.accessibility.point||{};a=a.series.tooltipOptions||{};c=c.options.lang;return E(b)?A(b,d.valueDecimals||a.valueDecimals||-1,c.decimalPoint,c.accessibility.thousandsSep||c.thousandsSep):b}function b(a){var b=(a.options.accessibility||{}).description;return b&&a.chart.langFormat("accessibility.series.description",{description:b,series:a})||""}function r(a,b){return a.chart.langFormat("accessibility.series."+b+
"Description",{name:J(a[b]),series:a})}function k(a){var b=a.series,c=b.chart,d=c.options.accessibility.point||{};if(b.xAxis&&b.xAxis.isDatetimeAxis)return b=e.prototype.getXDateFormat.call({getDateFormat:e.prototype.getDateFormat,chart:c},a,c.options.tooltip,b.xAxis),d=d.dateFormatter&&d.dateFormatter(a)||d.dateFormat||b,c.time.dateFormat(d,a.x,void 0)}function x(a){var b=k(a),c=(a.series.xAxis||{}).categories&&F(a.category)&&(""+a.category).replace("<br/>"," "),d=a.id&&0>a.id.indexOf("highcharts-"),
e="x, "+a.x;return a.name||b||c||(d?a.id:e)}function q(a,b,c){var e=b||"",k=c||"";return a.series.pointArrayMap.reduce(function(b,c){b+=b.length?", ":"";var w=d(a,z(a[c],a.options[c]));return b+(c+": "+e+w+k)},"")}function v(a){var b=a.series,c=b.chart.options.accessibility.point||{},e=b.tooltipOptions||{},k=c.valuePrefix||e.valuePrefix||"";c=c.valueSuffix||e.valueSuffix||"";e=d(a,a["undefined"!==typeof a.value?"value":"y"]);return a.isNull?b.chart.langFormat("accessibility.series.nullPointValue",
{point:a}):b.pointArrayMap?q(a,k,c):k+e+c}function u(a){var b=a.series,c=b.chart,d=c.options.accessibility.point.valueDescriptionFormat,e=(b=z(b.xAxis&&b.xAxis.options.accessibility&&b.xAxis.options.accessibility.enabled,!c.angular))?x(a):"";a={point:a,index:F(a.index)?a.index+1:"",xDescription:e,value:v(a),separator:b?", ":""};return w(d,a,c)}function t(a){var b=a.series,c=b.chart,d=u(a),e=a.options&&a.options.accessibility&&a.options.accessibility.description;e=e?" "+e:"";b=1<c.series.length&&b.name?
" "+b.name+".":"";c=a.series.chart;var k=K(a),w={point:a,annotations:k};c=k.length?c.langFormat("accessibility.series.pointAnnotationsDescription",w):"";a.accessibility=a.accessibility||{};a.accessibility.valueDescription=d;return d+e+b+(c?" "+c:"")}function C(a){var b=n(a),d=c(a);(b||d)&&a.points.forEach(function(a){var c;if(!(c=a.graphic&&a.graphic.element)&&(c=a.series&&a.series.is("sunburst"),c=a.isNull&&!c)){var d=a.series,e=h(a);d=(c=e&&e.graphic)?c.parentGroup:d.graph||d.group;e=e?{x:z(a.plotX,
e.plotX,0),y:z(a.plotY,e.plotY,0)}:{x:z(a.plotX,0),y:z(a.plotY,0)};e=a.series.chart.renderer.rect(e.x,e.y,1,1);e.attr({"class":"highcharts-a11y-dummy-point",fill:"none",opacity:0,"fill-opacity":0,"stroke-opacity":0});d&&d.element?(a.graphic=e,a.hasDummyGraphic=!0,e.add(d),d.element.insertBefore(e.element,c?c.element:null),c=e.element):c=void 0}c&&(c.setAttribute("tabindex","-1"),b?(e=a.series,d=e.chart.options.accessibility.point||{},e=e.options.accessibility||{},a=G(H(e.pointDescriptionFormatter&&
e.pointDescriptionFormatter(a)||d.descriptionFormatter&&d.descriptionFormatter(a)||t(a))),c.setAttribute("role","img"),c.setAttribute("aria-label",a)):c.setAttribute("aria-hidden",!0))})}function y(a){var c=a.chart,d=c.types||[],e=b(a),k=function(b){return c[b]&&1<c[b].length&&a[b]},w=r(a,"xAxis"),g=r(a,"yAxis"),n={name:a.name||"",ix:a.index+1,numSeries:c.series&&c.series.length,numPoints:a.points&&a.points.length,series:a};d=1<d.length?"Combination":"";return(c.langFormat("accessibility.series.summary."+
a.type+d,n)||c.langFormat("accessibility.series.summary.default"+d,n))+(e?" "+e:"")+(k("yAxis")?" "+g:"")+(k("xAxis")?" "+w:"")}var A=a.numberFormat,w=a.format,D=f.find,E=f.isNumber,z=f.pick,F=f.defined,K=l.getPointAnnotationTexts,G=m.escapeStringForHTML,L=m.reverseChildNodes,H=m.stripHTMLTagsFromString,J=p.getAxisDescription,M=p.getSeriesFirstPointElement,N=p.getSeriesA11yElement,O=p.unhideChartElementFromAT;return{describeSeries:function(a){var b=a.chart,c=M(a),d=N(a),e=b.is3d&&b.is3d();if(d){d.lastChild!==
c||e||L(d);C(a);O(b,d);e=a.chart;b=e.options.chart||{};c=1<e.series.length;e=e.options.accessibility.series.describeSingleSeries;var k=(a.options.accessibility||{}).exposeAsGroupOnly;b.options3d&&b.options3d.enabled&&c||!(c||e||k||g(a))?d.setAttribute("aria-label",""):(b=a.chart.options.accessibility,c=b.landmarkVerbosity,(a.options.accessibility||{}).exposeAsGroupOnly?d.setAttribute("role","img"):"all"===c&&d.setAttribute("role","region"),d.setAttribute("tabindex","-1"),d.setAttribute("aria-label",
G(H(b.series.descriptionFormatter&&b.series.descriptionFormatter(a)||y(a)))))}},defaultPointDescriptionFormatter:t,defaultSeriesDescriptionFormatter:y,getPointA11yTimeDescription:k,getPointXDescription:x,getPointValue:v,getPointValueDescription:u}});t(a,"modules/accessibility/utils/Announcer.js",[a["parts/Globals.js"],a["modules/accessibility/utils/DOMElementProvider.js"],a["modules/accessibility/utils/htmlUtilities.js"]],function(a,f,l){var q=l.visuallyHideElement;l=function(){function a(a,h){this.chart=
a;this.domElementProvider=new f;this.announceRegion=this.addAnnounceRegion(h)}a.prototype.destroy=function(){this.domElementProvider.destroyCreatedElements()};a.prototype.announce=function(a){var e=this;this.announceRegion.innerHTML=a;this.clearAnnouncementRegionTimer&&clearTimeout(this.clearAnnouncementRegionTimer);this.clearAnnouncementRegionTimer=setTimeout(function(){e.announceRegion.innerHTML="";delete e.clearAnnouncementRegionTimer},1E3)};a.prototype.addAnnounceRegion=function(a){var e=this.chart.renderTo,
g=this.domElementProvider.createElement("div");g.setAttribute("aria-hidden",!1);g.setAttribute("aria-live",a);q(g);e.insertBefore(g,e.firstChild);return g};return a}();return a.Announcer=l});t(a,"modules/accessibility/components/SeriesComponent/NewDataAnnouncer.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["modules/accessibility/utils/chartUtilities.js"],a["modules/accessibility/components/SeriesComponent/SeriesDescriber.js"],a["modules/accessibility/utils/Announcer.js"],a["modules/accessibility/utils/EventProvider.js"]],
function(a,f,l,m,p,e){function h(a){var b=a.series.data.filter(function(b){return a.x===b.x&&a.y===b.y});return 1===b.length?b[0]:a}function g(a,b){var c=(a||[]).concat(b||[]).reduce(function(a,b){a[b.name+b.index]=b;return a},{});return Object.keys(c).map(function(a){return c[a]})}var n=f.extend,c=f.defined,d=l.getChartTitle,b=m.defaultPointDescriptionFormatter,r=m.defaultSeriesDescriptionFormatter;f=function(a){this.chart=a};n(f.prototype,{init:function(){var a=this.chart,b=a.options.accessibility.announceNewData.interruptUser?
"assertive":"polite";this.lastAnnouncementTime=0;this.dirty={allSeries:{}};this.eventProvider=new e;this.announcer=new p(a,b);this.addEventListeners()},destroy:function(){this.eventProvider.removeAddedEvents();this.announcer.destroy()},addEventListeners:function(){var b=this,c=this.chart,d=this.eventProvider;d.addEvent(c,"afterDrilldown",function(){b.lastAnnouncementTime=0});d.addEvent(a.Series,"updatedData",function(){b.onSeriesUpdatedData(this)});d.addEvent(c,"afterAddSeries",function(a){b.onSeriesAdded(a.series)});
d.addEvent(a.Series,"addPoint",function(a){b.onPointAdded(a.point)});d.addEvent(c,"redraw",function(){b.announceDirtyData()})},onSeriesUpdatedData:function(a){var b=this.chart;a.chart===b&&b.options.accessibility.announceNewData.enabled&&(this.dirty.hasDirty=!0,this.dirty.allSeries[a.name+a.index]=a)},onSeriesAdded:function(a){this.chart.options.accessibility.announceNewData.enabled&&(this.dirty.hasDirty=!0,this.dirty.allSeries[a.name+a.index]=a,this.dirty.newSeries=c(this.dirty.newSeries)?void 0:
a)},onPointAdded:function(a){var b=a.series.chart;this.chart===b&&b.options.accessibility.announceNewData.enabled&&(this.dirty.newPoint=c(this.dirty.newPoint)?void 0:a)},announceDirtyData:function(){var a=this;if(this.chart.options.accessibility.announceNewData&&this.dirty.hasDirty){var b=this.dirty.newPoint;b&&(b=h(b));this.queueAnnouncement(Object.keys(this.dirty.allSeries).map(function(b){return a.dirty.allSeries[b]}),this.dirty.newSeries,b);this.dirty={allSeries:{}}}},queueAnnouncement:function(a,
b,c){var d=this,e=this.chart.options.accessibility.announceNewData;if(e.enabled){var k=+new Date;e=Math.max(0,e.minAnnounceInterval-(k-this.lastAnnouncementTime));a=g(this.queuedAnnouncement&&this.queuedAnnouncement.series,a);if(b=this.buildAnnouncementMessage(a,b,c))this.queuedAnnouncement&&clearTimeout(this.queuedAnnouncementTimer),this.queuedAnnouncement={time:k,message:b,series:a},this.queuedAnnouncementTimer=setTimeout(function(){d&&d.announcer&&(d.lastAnnouncementTime=+new Date,d.announcer.announce(d.queuedAnnouncement.message),
delete d.queuedAnnouncement,delete d.queuedAnnouncementTimer)},e)}},buildAnnouncementMessage:function(c,e,g){var k=this.chart,n=k.options.accessibility.announceNewData;if(n.announcementFormatter&&(c=n.announcementFormatter(c,e,g),!1!==c))return c.length?c:null;c=a.charts&&1<a.charts.length?"Multiple":"Single";c=e?"newSeriesAnnounce"+c:g?"newPointAnnounce"+c:"newDataAnnounce";n=d(k);return k.langFormat("accessibility.announceNewData."+c,{chartTitle:n,seriesDesc:e?r(e):null,pointDesc:g?b(g):null,point:g,
series:e})}});return f});t(a,"modules/accessibility/components/SeriesComponent/forcedMarkers.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,f){function q(a){p(!0,a,{marker:{enabled:!0,states:{normal:{opacity:0}}}})}var m=f.addEvent,p=f.merge;return function(){m(a.Series,"render",function(){var a=this.options,h=this.chart.options.accessibility.enabled,g=!1!==(this.options.accessibility&&this.options.accessibility.enabled);var n=this.chart.options.accessibility;n=this.points.length<
n.series.pointDescriptionEnabledThreshold||!1===n.series.pointDescriptionEnabledThreshold;var c=this.chart.options.accessibility.keyboardNavigation.seriesNavigation;c=this.points.length<c.pointNavigationEnabledThreshold||!1===c.pointNavigationEnabledThreshold;if(h&&g&&(n||c)){if(a.marker&&!1===a.marker.enabled&&(this.a11yMarkersForced=!0,q(this.options)),this._hasPointMarkers&&this.points&&this.points.length)for(a=this.points,h=a.length;h--;)g=a[h].options,g.marker&&(g.marker.enabled?p(!0,g.marker,
{states:{normal:{opacity:g.marker.states&&g.marker.states.normal&&g.marker.states.normal.opacity||1}}}):q(g))}else this.a11yMarkersForced&&this.resetMarkerOptions&&(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}}}}))});m(a.Series,"afterSetOptions",function(a){this.resetA11yMarkerOptions=p(a.options.marker||{},this.userOptions.marker||{})})}});t(a,"modules/accessibility/components/SeriesComponent/SeriesComponent.js",
[a["parts/Globals.js"],a["parts/Utilities.js"],a["modules/accessibility/AccessibilityComponent.js"],a["modules/accessibility/components/SeriesComponent/SeriesKeyboardNavigation.js"],a["modules/accessibility/components/SeriesComponent/NewDataAnnouncer.js"],a["modules/accessibility/components/SeriesComponent/forcedMarkers.js"],a["modules/accessibility/utils/chartUtilities.js"],a["modules/accessibility/components/SeriesComponent/SeriesDescriber.js"],a["parts/Tooltip.js"]],function(a,f,l,m,p,e,h,g,n){f=
f.extend;var c=h.hideSeriesFromAT,d=g.describeSeries;a.SeriesAccessibilityDescriber=g;e();a=function(){};a.prototype=new l;f(a.prototype,{init:function(){this.newDataAnnouncer=new p(this.chart);this.newDataAnnouncer.init();this.keyboardNavigation=new m(this.chart,this.keyCodes);this.keyboardNavigation.init();this.hideTooltipFromATWhenShown();this.hideSeriesLabelsFromATWhenShown()},hideTooltipFromATWhenShown:function(){var a=this;this.addEvent(n,"refresh",function(){this.chart===a.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(a){a.labelBySeries&&a.labelBySeries.attr("aria-hidden",!0)})})},onChartRender:function(){this.chart.series.forEach(function(a){!1!==(a.options.accessibility&&a.options.accessibility.enabled)&&a.visible?d(a):c(a)})},getKeyboardNavigation:function(){return this.keyboardNavigation.getKeyboardNavigationHandler()},
destroy:function(){this.newDataAnnouncer.destroy();this.keyboardNavigation.destroy()}});return a});t(a,"modules/accessibility/components/ZoomComponent.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["modules/accessibility/AccessibilityComponent.js"],a["modules/accessibility/KeyboardNavigationHandler.js"],a["modules/accessibility/utils/chartUtilities.js"],a["modules/accessibility/utils/htmlUtilities.js"]],function(a,f,l,m,p,e){var h=f.extend,g=f.pick,n=p.unhideChartElementFromAT,c=e.setElAttrs,
d=e.removeElement;a.Axis.prototype.panStep=function(a,c){var b=c||3;c=this.getExtremes();var d=(c.max-c.min)/b*a;b=c.max+d;d=c.min+d;var e=b-d;0>a&&d<c.dataMin?(d=c.dataMin,b=d+e):0<a&&b>c.dataMax&&(b=c.dataMax,d=b-e);this.setExtremes(d,b)};a=function(){};a.prototype=new l;h(a.prototype,{init:function(){var a=this,c=this.chart;["afterShowResetZoom","afterDrilldown","drillupall"].forEach(function(b){a.addEvent(c,b,function(){a.updateProxyOverlays()})})},onChartUpdate:function(){var a=this.chart,c=
this;a.mapNavButtons&&a.mapNavButtons.forEach(function(b,d){n(a,b.element);c.setMapNavButtonAttrs(b.element,"accessibility.zoom.mapZoom"+(d?"Out":"In"))})},setMapNavButtonAttrs:function(a,d){var b=this.chart;d=b.langFormat(d,{chart:b});c(a,{tabindex:-1,role:"button","aria-label":d})},onChartRender:function(){this.updateProxyOverlays()},updateProxyOverlays:function(){var a=this.chart;d(this.drillUpProxyGroup);d(this.resetZoomProxyGroup);a.resetZoomButton&&this.recreateProxyButtonAndGroup(a.resetZoomButton,
"resetZoomProxyButton","resetZoomProxyGroup",a.langFormat("accessibility.zoom.resetZoomButton",{chart:a}));a.drillUpButton&&this.recreateProxyButtonAndGroup(a.drillUpButton,"drillUpProxyButton","drillUpProxyGroup",a.langFormat("accessibility.drillUpButton",{chart:a,buttonText:a.getDrilldownBackText()}))},recreateProxyButtonAndGroup:function(a,c,e,g){d(this[e]);this[e]=this.addProxyGroup();this[c]=this.createProxyButton(a,this[e],{"aria-label":g,tabindex:-1})},getMapZoomNavigation:function(){var a=
this.keyCodes,c=this.chart,d=this;return new m(c,{keyCodeMap:[[[a.up,a.down,a.left,a.right],function(a){return d.onMapKbdArrow(this,a)}],[[a.tab],function(a,b){return d.onMapKbdTab(this,b)}],[[a.space,a.enter],function(){return d.onMapKbdClick(this)}]],validate:function(){return!!(c.mapZoom&&c.mapNavButtons&&c.mapNavButtons.length)},init:function(a){return d.onMapNavInit(a)}})},onMapKbdArrow:function(a,c){var b=this.keyCodes;this.chart[c===b.up||c===b.down?"yAxis":"xAxis"][0].panStep(c===b.left||
c===b.up?-1:1);return a.response.success},onMapKbdTab:function(a,c){var b=this.chart;a=a.response;var d=(c=c.shiftKey)&&!this.focusedMapNavButtonIx||!c&&this.focusedMapNavButtonIx;b.mapNavButtons[this.focusedMapNavButtonIx].setState(0);if(d)return b.mapZoom(),a[c?"prev":"next"];this.focusedMapNavButtonIx+=c?-1:1;c=b.mapNavButtons[this.focusedMapNavButtonIx];b.setFocusToElement(c.box,c.element);c.setState(2);return a.success},onMapKbdClick:function(a){this.fakeClickEvent(this.chart.mapNavButtons[this.focusedMapNavButtonIx].element);
return a.response.success},onMapNavInit:function(a){var b=this.chart,c=b.mapNavButtons[0],d=b.mapNavButtons[1];c=0<a?c:d;b.setFocusToElement(c.box,c.element);c.setState(2);this.focusedMapNavButtonIx=0<a?0:1},simpleButtonNavigation:function(a,c,d){var b=this.keyCodes,e=this,n=this.chart;return new m(n,{keyCodeMap:[[[b.tab,b.up,b.down,b.left,b.right],function(a,c){return this.response[a===b.tab&&c.shiftKey||a===b.left||a===b.up?"prev":"next"]}],[[b.space,b.enter],function(){var a=d(this,n);return g(a,
this.response.success)}]],validate:function(){return n[a]&&n[a].box&&e[c]},init:function(){n.setFocusToElement(n[a].box,e[c])}})},getKeyboardNavigation:function(){return[this.simpleButtonNavigation("resetZoomButton","resetZoomProxyButton",function(a,c){c.zoomOut()}),this.simpleButtonNavigation("drillUpButton","drillUpProxyButton",function(a,c){c.drillUp();return a.response.prev}),this.getMapZoomNavigation()]}});return a});t(a,"modules/accessibility/components/RangeSelectorComponent.js",[a["parts/Globals.js"],
a["parts/Utilities.js"],a["modules/accessibility/AccessibilityComponent.js"],a["modules/accessibility/KeyboardNavigationHandler.js"],a["modules/accessibility/utils/chartUtilities.js"],a["modules/accessibility/utils/htmlUtilities.js"]],function(a,f,l,m,p,e){f=f.extend;var h=p.unhideChartElementFromAT,g=e.setElAttrs;a.Chart.prototype.highlightRangeSelectorButton=function(a){var c=this.rangeSelector.buttons,d=this.highlightedRangeSelectorItemIx;"undefined"!==typeof d&&c[d]&&c[d].setState(this.oldRangeSelectorItemState||
0);this.highlightedRangeSelectorItemIx=a;return c[a]?(this.setFocusToElement(c[a].box,c[a].element),this.oldRangeSelectorItemState=c[a].state,c[a].setState(2),!0):!1};a=function(){};a.prototype=new l;f(a.prototype,{onChartUpdate:function(){var a=this.chart,c=this,d=a.rangeSelector;d&&(d.buttons&&d.buttons.length&&d.buttons.forEach(function(b){h(a,b.element);c.setRangeButtonAttrs(b)}),d.maxInput&&d.minInput&&["minInput","maxInput"].forEach(function(b,e){if(b=d[b])h(a,b),c.setRangeInputAttrs(b,"accessibility.rangeSelector."+
(e?"max":"min")+"InputLabel")}))},setRangeButtonAttrs:function(a){var c=this.chart;c=c.langFormat("accessibility.rangeSelector.buttonText",{chart:c,buttonText:a.text&&a.text.textStr});g(a.element,{tabindex:-1,role:"button","aria-label":c})},setRangeInputAttrs:function(a,c){var d=this.chart;g(a,{tabindex:-1,role:"textbox","aria-label":d.langFormat(c,{chart:d})})},getRangeSelectorButtonNavigation:function(){var a=this.chart,c=this.keyCodes,d=this;return new m(a,{keyCodeMap:[[[c.left,c.right,c.up,c.down],
function(a){return d.onButtonNavKbdArrowKey(this,a)}],[[c.enter,c.space],function(){return d.onButtonNavKbdClick(this)}]],validate:function(){return a.rangeSelector&&a.rangeSelector.buttons&&a.rangeSelector.buttons.length},init:function(b){var c=a.rangeSelector.buttons.length-1;a.highlightRangeSelectorButton(0<b?0:c)}})},onButtonNavKbdArrowKey:function(a,c){var d=a.response,b=this.keyCodes,e=this.chart,g=e.options.accessibility.keyboardNavigation.wrapAround;c=c===b.left||c===b.up?-1:1;return e.highlightRangeSelectorButton(e.highlightedRangeSelectorItemIx+
c)?d.success:g?(a.init(c),d.success):d[0<c?"next":"prev"]},onButtonNavKbdClick:function(a){a=a.response;var c=this.chart;3!==c.oldRangeSelectorItemState&&this.fakeClickEvent(c.rangeSelector.buttons[c.highlightedRangeSelectorItemIx].element);return a.success},getRangeSelectorInputNavigation:function(){var a=this.chart,c=this.keyCodes,d=this;return new m(a,{keyCodeMap:[[[c.tab,c.up,c.down],function(a,e){return d.onInputKbdMove(this,a===c.tab&&e.shiftKey||a===c.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(a){d.onInputNavInit(a)},terminate:function(){d.onInputNavTerminate()}})},onInputKbdMove:function(a,c){var d=this.chart;a=a.response;var b=d.highlightedInputRangeIx+=c;if(1<b||0>b)return a[0<c?"next":"prev"];d.rangeSelector[b?"maxInput":"minInput"].focus();return a.success},onInputNavInit:function(a){var c=
this.chart;a=0<a?0:1;c.highlightedInputRangeIx=a;c.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});t(a,"modules/accessibility/components/InfoRegionsComponent.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["modules/accessibility/AccessibilityComponent.js"],
a["modules/accessibility/utils/Announcer.js"],a["modules/accessibility/components/AnnotationsA11y.js"],a["modules/accessibility/utils/chartUtilities.js"],a["modules/accessibility/utils/htmlUtilities.js"]],function(a,f,l,m,p,e,h){function g(a){return a.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 n=a.win.document,c=f.extend,d=f.format,b=f.pick,
r=p.getAnnotationsInfoHTML,k=e.unhideChartElementFromAT,q=e.getChartTitle,t=e.getAxisDescription,v=h.addClass,u=h.setElAttrs,B=h.escapeStringForHTML,C=h.stripHTMLTagsFromString,y=h.getElement,A=h.visuallyHideElement;a.Chart.prototype.getTypeDescription=function(a){var b=a[0],c=this.series&&this.series[0]||{};c={numSeries:this.series.length,numPoints:c.points&&c.points.length,chart:this,mapTitle:c.mapTitle};if(!b)return this.langFormat("accessibility.chartTypes.emptyChart",c);if("map"===b)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);a=a[0];b=this.langFormat("accessibility.seriesTypeDescriptions."+a,c);var d=this.series&&2>this.series.length?"Single":"Multiple";return(this.langFormat("accessibility.chartTypes."+a+d,c)||this.langFormat("accessibility.chartTypes.default"+d,c))+(b?" "+b:"")};f=function(){};f.prototype=
new l;c(f.prototype,{init:function(){var a=this.chart,b=this;this.initRegionsDefinitions();this.addEvent(a,"afterGetTable",function(a){b.onDataTableCreated(a)});this.addEvent(a,"afterViewData",function(a){b.dataTableDiv=a;setTimeout(function(){b.focusDataTable()},300)});this.announcer=new m(a,"assertive")},initRegionsDefinitions:function(){var a=this;this.screenReaderSections={before:{element:null,buildContent:function(b){var c=b.options.accessibility.screenReaderSection.beforeChartFormatter;return c?
c(b):a.defaultBeforeChartFormatter(b)},insertIntoDOM:function(a,b){b.renderTo.insertBefore(a,b.renderTo.firstChild)},afterInserted:function(){"undefined"!==typeof a.sonifyButtonId&&a.initSonifyButton(a.sonifyButtonId);"undefined"!==typeof a.dataTableButtonId&&a.initDataTableButton(a.dataTableButtonId)}},after:{element:null,buildContent:function(b){var c=b.options.accessibility.screenReaderSection.afterChartFormatter;return c?c(b):a.defaultAfterChartFormatter()},insertIntoDOM:function(a,b){b.renderTo.insertBefore(a,
b.container.nextSibling)}}}},onChartRender:function(){var a=this;this.linkedDescriptionElement=this.getLinkedDescriptionElement();this.setLinkedDescriptionAttrs();Object.keys(this.screenReaderSections).forEach(function(b){a.updateScreenReaderSection(b)})},getLinkedDescriptionElement:function(){var a=this.chart.options.accessibility.linkedDescription;if(a){if("string"!==typeof a)return a;a=d(a,this.chart);a=n.querySelectorAll(a);if(1===a.length)return a[0]}},setLinkedDescriptionAttrs:function(){var a=
this.linkedDescriptionElement;a&&(a.setAttribute("aria-hidden","true"),v(a,"highcharts-linked-description"))},updateScreenReaderSection:function(a){var b=this.chart,c=this.screenReaderSections[a],d=c.buildContent(b),e=c.element=c.element||this.createElement("div"),g=e.firstChild||this.createElement("div");this.setScreenReaderSectionAttribs(e,a);g.innerHTML=d;e.appendChild(g);c.insertIntoDOM(e,b);A(g);k(b,g);c.afterInserted&&c.afterInserted()},setScreenReaderSectionAttribs:function(a,b){var c=this.chart,
d=c.langFormat("accessibility.screenReaderSection."+b+"RegionLabel",{chart:c});u(a,{id:"highcharts-screen-reader-region-"+b+"-"+c.index,"aria-label":d});a.style.position="relative";"all"===c.options.accessibility.landmarkVerbosity&&d&&a.setAttribute("role","region")},defaultBeforeChartFormatter:function(){var b=this.chart,c=b.options.accessibility.screenReaderSection.beforeChartFormat,d=this.getAxesDescription(),e="highcharts-a11y-sonify-data-btn-"+b.index,h="hc-linkto-highcharts-data-table-"+b.index,
f=r(b),k=b.langFormat("accessibility.screenReaderSection.annotations.heading",{chart:b});d={chartTitle:q(b),typeDescription:this.getTypeDescriptionText(),chartSubtitle:this.getSubtitleText(),chartLongdesc:this.getLongdescText(),xAxisDescription:d.xAxis,yAxisDescription:d.yAxis,playAsSoundButton:b.sonify?this.getSonifyButtonText(e):"",viewTableButton:b.getCSV?this.getDataTableButtonText(h):"",annotationsTitle:f?k:"",annotationsList:f};b=a.i18nFormat(c,d,b);this.dataTableButtonId=h;this.sonifyButtonId=
e;return g(B(b)).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 g(B(b)).replace(/<(\w+)[^>]*?>\s*<\/\1>/g,"")},getLinkedDescription:function(){var a=this.linkedDescriptionElement;return C(a&&a.innerHTML||"")},getLongdescText:function(){var a=this.chart.options,b=a.caption;b=b&&b.text;var c=this.getLinkedDescription();
return a.accessibility.description||c||b||""},getTypeDescriptionText:function(){var a=this.chart;return a.types?a.options.accessibility.typeDescription||a.getTypeDescription(a.types):""},getDataTableButtonText:function(a){var b=this.chart;b=b.langFormat("accessibility.table.viewAsDataTableButtonText",{chart:b,chartTitle:q(b)});return'<a id="'+a+'">'+b+"</a>"},getSonifyButtonText:function(a){var b,c=this.chart;if(!1===(null===(b=c.options.sonification)||void 0===b?void 0:b.enabled))return"";b=c.langFormat("accessibility.sonification.playAsSoundButtonText",
{chart:c,chartTitle:q(c)});return'<button id="'+a+'">'+b+"</button>"},getSubtitleText:function(){var a=this.chart.options.subtitle;return C(a&&a.text||"")},getEndOfChartMarkerText:function(){var a=this.chart,b=a.langFormat("accessibility.screenReaderSection.endOfChartMarker",{chart:a});return'<div id="highcharts-end-of-chart-marker-'+a.index+'">'+b+"</div>"},onDataTableCreated:function(a){var b=this.chart;b.options.accessibility.enabled&&(this.viewDataTableButton&&this.viewDataTableButton.setAttribute("aria-expanded",
"true"),a.html=a.html.replace("<table ",'<table tabindex="0" summary="'+b.langFormat("accessibility.table.tableSummary",{chart:b})+'"'))},focusDataTable:function(){var a=this.dataTableDiv;(a=a&&a.getElementsByTagName("table")[0])&&a.focus&&a.focus()},initSonifyButton:function(a){var b=this,c=this.sonifyButton=y(a),d=this.chart,e=function(a){null===c||void 0===c?void 0:c.setAttribute("aria-hidden","true");null===c||void 0===c?void 0:c.setAttribute("aria-label","");a.preventDefault();a.stopPropagation();
a=d.langFormat("accessibility.sonification.playAsSoundClickAnnouncement",{chart:d});b.announcer.announce(a);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&&(u(c,{tabindex:"-1"}),c.onclick=function(a){var b;((null===(b=d.options.accessibility)||void 0===b?void 0:b.screenReaderSection.onPlayAsSoundClick)||e).call(this,a,d)})},initDataTableButton:function(a){var b=this.viewDataTableButton=
y(a),c=this.chart;a=a.replace("hc-linkto-","");b&&(u(b,{role:"button",tabindex:"-1","aria-expanded":!!y(a),href:"#"+a}),b.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,g=c("xAxis",!a.angular&&e&&d);c=c("yAxis",e&&d);d={};
g&&(d.xAxis=this.getAxisDescriptionText("xAxis"));c&&(d.yAxis=this.getAxisDescriptionText("yAxis"));return d},getAxisDescriptionText:function(a){var b=this,c=this.chart,d=c[a];return c.langFormat("accessibility.axis."+a+"Description"+(1<d.length?"Plural":"Singular"),{chart:c,names:d.map(function(a){return t(a)}),ranges:d.map(function(a){return b.getAxisRangeDescription(a)}),numAxes:d.length})},getAxisRangeDescription:function(a){var b=a.options||{};return b.accessibility&&"undefined"!==typeof b.accessibility.rangeDescription?
b.accessibility.rangeDescription:a.categories?this.getCategoryAxisRangeDesc(a):!a.isDatetimeAxis||0!==a.min&&0!==a.dataMin?this.getAxisFromToDescription(a):this.getAxisTimeLengthDesc(a)},getCategoryAxisRangeDesc:function(a){var b=this.chart;return a.dataMax&&a.dataMin?b.langFormat("accessibility.axis.rangeCategories",{chart:b,axis:a,numCategories:a.dataMax-a.dataMin+1}):""},getAxisTimeLengthDesc:function(a){var b=this.chart,c={},d="Seconds";c.Seconds=((a.max||0)-(a.min||0))/1E3;c.Minutes=c.Seconds/
60;c.Hours=c.Minutes/60;c.Days=c.Hours/24;["Minutes","Hours","Days"].forEach(function(a){2<c[a]&&(d=a)});var e=c[d].toFixed("Seconds"!==d&&"Minutes"!==d?1:0);return b.langFormat("accessibility.axis.timeRange"+d,{chart:b,axis:a,range:e.replace(".0","")})},getAxisFromToDescription:function(a){var b=this.chart,c=b.options.accessibility.screenReaderSection.axisRangeDateFormat,d=function(d){return a.isDatetimeAxis?b.time.dateFormat(c,a[d]):a[d]};return b.langFormat("accessibility.axis.rangeFromTo",{chart:b,
axis:a,rangeFrom:d("min"),rangeTo:d("max")})},destroy:function(){var a;null===(a=this.announcer)||void 0===a?void 0:a.destroy()}});return f});t(a,"modules/accessibility/components/ContainerComponent.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["modules/accessibility/utils/htmlUtilities.js"],a["modules/accessibility/utils/chartUtilities.js"],a["modules/accessibility/AccessibilityComponent.js"]],function(a,f,l,m,p){var e=a.win.document;a=f.extend;var h=l.stripHTMLTagsFromString,g=m.unhideChartElementFromAT,
n=m.getChartTitle;l=function(){};l.prototype=new p;a(l.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=h(a.langFormat("accessibility.svgContainerTitle",{chartTitle:n(a)}));if(b.length){var g=this.svgTitleElement=this.svgTitleElement||e.createElementNS("http://www.w3.org/2000/svg","title");
g.textContent=b;g.id=d;a.renderTo.insertBefore(g,a.renderTo.firstChild)}},setSVGContainerLabel:function(){var a=this.chart,d=h(a.langFormat("accessibility.svgContainerLabel",{chartTitle:n(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:n(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:n(a),chart:a}))},makeCreditsAccessible:function(){var a=this.chart,d=a.credits;d&&(d.textStr&&d.element.setAttribute("aria-label",h(a.langFormat("accessibility.credits",{creditsStr:d.textStr}))),g(a,d.element))},destroy:function(){this.chart.renderTo.setAttribute("aria-hidden",!0)}});return l});t(a,"modules/accessibility/high-contrast-mode.js",
[a["parts/Globals.js"]],function(a){var f=a.isMS,l=a.win,m=l.document;return{isHighContrastModeActive:function(){var a=/(Edg)/.test(l.navigator.userAgent);if(l.matchMedia&&a)return l.matchMedia("(-ms-high-contrast: active)").matches;if(f&&l.getComputedStyle){a=m.createElement("div");a.style.backgroundImage="url(#)";m.body.appendChild(a);var e=(a.currentStyle||l.getComputedStyle(a)).backgroundImage;m.body.removeChild(a);return"none"===e}return!1},setHighContrastTheme:function(a){a.highContrastModeActive=
!0;var e=a.options.accessibility.highContrastTheme;a.update(e,!1);a.series.forEach(function(a){var g=e.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()}}});t(a,"modules/accessibility/high-contrast-theme.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"}}});t(a,"modules/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}}}});t(a,"modules/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:"Toggle visibility of {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). }"}}}});t(a,"modules/accessibility/options/deprecatedOptions.js",[a["parts/Utilities.js"]],
function(a){function f(a,d,b){g("Highcharts: Deprecated option "+d+" used. This will be removed from future versions of Highcharts. Use "+b+" instead.",!1,a)}function l(a,d,b){for(var c,e=0;e<d.length-1;++e)c=d[e],a=a[c]=n(a[c],{});a[d[d.length-1]]=b}function m(a,d,b,e){function c(a,b){return b.reduce(function(a,b){return a[b]},a)}var g=c(a.options,d),h=c(a.options,b);Object.keys(e).forEach(function(c){var k=g[c];"undefined"!==typeof k&&(l(h,e[c],k),f(a,d.join(".")+"."+c,b.join(".")+"."+e[c].join(".")))})}
function p(a){var c=a.options.chart||{},b=a.options.accessibility||{};["description","typeDescription"].forEach(function(d){c[d]&&(b[d]=c[d],f(a,"chart."+d,"accessibility."+d))})}function e(a){a.axes.forEach(function(c){(c=c.options)&&c.description&&(c.accessibility=c.accessibility||{},c.accessibility.description=c.description,f(a,"axis.description","axis.accessibility.description"))})}function h(a){var c={description:["accessibility","description"],exposeElementToA11y:["accessibility","exposeAsGroupOnly"],
pointDescriptionFormatter:["accessibility","pointDescriptionFormatter"],skipKeyboardNavigation:["accessibility","keyboardNavigation","enabled"]};a.series.forEach(function(b){Object.keys(c).forEach(function(d){var e=b.options[d];"undefined"!==typeof e&&(l(b.options,c[d],"skipKeyboardNavigation"===d?!e:e),f(a,"series."+d,"series."+c[d].join(".")))})})}var g=a.error,n=a.pick;return function(a){p(a);e(a);a.series&&h(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"]})}});t(a,"modules/accessibility/a11y-i18n.js",
[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,f){function l(a,h){var e=a.indexOf("#each("),f=a.indexOf("#plural("),c=a.indexOf("["),d=a.indexOf("]");if(-1<e){c=a.slice(e).indexOf(")")+e;var b=a.substring(0,e);f=a.substring(c+1);c=a.substring(e+6,c).split(",");e=Number(c[1]);a="";if(h=h[c[0]])for(e=isNaN(e)?h.length:e,e=0>e?h.length+e:Math.min(e,h.length),c=0;c<e;++c)a+=b+h[c]+f;return a.length?a:""}if(-1<f){b=a.slice(f).indexOf(")")+f;a=a.substring(f+8,b).split(",");switch(Number(h[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?(h=a,h=h.trim&&h.trim()||h.replace(/^\s+|\s+$/g,"")):h="";return h}return-1<c?(f=a.substring(0,c),a=Number(a.substring(c+1,d)),h=h[f],!isNaN(a)&&h&&(0>a?(b=h[h.length+a],"undefined"===typeof b&&(b=h[0])):(b=h[a],"undefined"===typeof b&&(b=h[h.length-1]))),"undefined"!==typeof b?b:""):"{"+a+"}"}var m=f.format,p=f.pick;a.i18nFormat=function(a,f,g){var e=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}},c=[],d=0;do{var b=e(a,d);var h=a.substring(d,b&&b.begin-1);h.length&&c.push({value:h,type:"constant"});b&&c.push({value:b.statement,type:"statement"});d=b?b.end+1:d+1}while(b);c.forEach(function(a){"statement"===a.type&&(a.value=l(a.value,f))});return m(c.reduce(function(a,b){return a+b.value},""),f,g)};a.Chart.prototype.langFormat=function(e,f){e=e.split(".");for(var g=this.options.lang,h=0;h<e.length;++h)g=g&&g[e[h]];return"string"===
typeof g?a.i18nFormat(g,f,this):""}});t(a,"modules/accessibility/focusBorder.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,f){var l=f.addEvent,m=f.extend,p=f.pick;m(a.SVGElement.prototype,{addFocusBorder:function(a,f){this.focusBorder&&this.removeFocusBorder();var e=this.getBBox();a=p(a,3);e.x+=this.translateX?this.translateX:0;e.y+=this.translateY?this.translateY:0;this.focusBorder=this.renderer.rect(e.x-a,e.y-a,e.width+2*a,e.height+2*a,parseInt((f&&f.borderRadius||0).toString(),
10)).addClass("highcharts-focus-border").attr({zIndex:99}).add(this.parentGroup);this.renderer.styledMode||this.focusBorder.attr({stroke:f&&f.stroke,"stroke-width":f&&f.strokeWidth})},removeFocusBorder:function(){this.focusBorder&&(this.focusBorder.destroy(),delete this.focusBorder)}});a.Chart.prototype.setFocusToElement=function(a,f){var e=this.options.accessibility.keyboardNavigation.focusBorder;(f=f||a.element)&&f.focus&&(f.hcEvents&&f.hcEvents.focusin||l(f,"focusin",function(){}),f.focus(),e.hideBrowserFocusOutline&&
(f.style.outline="none"));e.enabled&&(this.focusElement&&this.focusElement.removeFocusBorder(),a.addFocusBorder(e.margin,{stroke:e.style.color,strokeWidth:e.style.lineWidth,borderRadius:e.style.borderRadius}),this.focusElement=a)}});t(a,"modules/accessibility/accessibility.js",[a["modules/accessibility/utils/chartUtilities.js"],a["parts/Globals.js"],a["modules/accessibility/KeyboardNavigationHandler.js"],a["parts/Point.js"],a["parts/Utilities.js"],a["modules/accessibility/AccessibilityComponent.js"],
a["modules/accessibility/KeyboardNavigation.js"],a["modules/accessibility/components/LegendComponent.js"],a["modules/accessibility/components/MenuComponent.js"],a["modules/accessibility/components/SeriesComponent/SeriesComponent.js"],a["modules/accessibility/components/ZoomComponent.js"],a["modules/accessibility/components/RangeSelectorComponent.js"],a["modules/accessibility/components/InfoRegionsComponent.js"],a["modules/accessibility/components/ContainerComponent.js"],a["modules/accessibility/high-contrast-mode.js"],
a["modules/accessibility/high-contrast-theme.js"],a["modules/accessibility/options/options.js"],a["modules/accessibility/options/langOptions.js"],a["modules/accessibility/options/deprecatedOptions.js"]],function(a,f,l,m,p,e,h,g,n,c,d,b,t,k,x,I,v,u,B){function q(a){this.init(a)}var r=p.addEvent,A=p.extend,w=p.fireEvent,D=p.merge,E=f.win.document;D(!0,f.defaultOptions,v,{accessibility:{highContrastTheme:I},lang:u});f.A11yChartUtilities=a;f.KeyboardNavigationHandler=l;f.AccessibilityComponent=e;q.prototype=
{init:function(a){this.chart=a;E.addEventListener&&a.renderer.isSVG?(B(a),this.initComponents(),this.keyboardNavigation=new h(a,this.components),this.update()):a.renderTo.setAttribute("aria-hidden",!0)},initComponents:function(){var a=this.chart,e=a.options.accessibility;this.components={container:new k,infoRegions:new t,legend:new g,chartMenu:new n,rangeSelector:new b,series:new c,zoom:new d};e.customComponents&&A(this.components,e.customComponents);var f=this.components;this.getComponentOrder().forEach(function(b){f[b].initBase(a);
f[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;w(b,"beforeA11yUpdate");b.types=this.getChartTypes();this.getComponentOrder().forEach(function(c){a[c].onChartUpdate();w(b,"afterA11yComponentUpdate",{name:c,component:a[c]})});this.keyboardNavigation.update(c.keyboardNavigation.order);
!b.highContrastModeActive&&x.isHighContrastModeActive()&&x.setHighContrastTheme(b);w(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)}};f.Chart.prototype.updateA11yEnabled=function(){var a=this.accessibility,b=this.options.accessibility;b&&b.enabled?a?a.update():this.accessibility=new q(this):a?(a.destroy&&a.destroy(),delete this.accessibility):this.renderTo.setAttribute("aria-hidden",!0)};r(f.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()})});
r(f.Chart,"update",function(a){if(a=a.options.accessibility)a.customComponents&&(this.options.accessibility.customComponents=a.customComponents,delete a.customComponents),D(!0,this.options.accessibility,a),this.accessibility&&this.accessibility.destroy&&(this.accessibility.destroy(),delete this.accessibility);this.a11yDirty=!0});r(m,"update",function(){this.series.chart.accessibility&&(this.series.chart.a11yDirty=!0)});["addSeries","init"].forEach(function(a){r(f.Chart,a,function(){this.a11yDirty=
!0})});["update","updatedData","remove"].forEach(function(a){r(f.Series,a,function(){this.chart.accessibility&&(this.chart.a11yDirty=!0)})});["afterDrilldown","drillupall"].forEach(function(a){r(f.Chart,a,function(){this.accessibility&&this.accessibility.update()})});r(f.Chart,"destroy",function(){this.accessibility&&this.accessibility.destroy()})});t(a,"masters/modules/accessibility.src.js",[],function(){})});
//# sourceMappingURL=accessibility.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,204 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
interface Chart {
/**
* Dismiss popup content in chart, including export menu and tooltip.
*/
dismissPopupContent(): void;
/**
* Apply context to a format string from lang options of the chart.
*
* @param langKey
* Key (using dot notation) into lang option structure.
*
* @param context
* Context to apply to the format string.
*
* @return The formatted string.
*/
langFormat(langKey: string, context: Dictionary<any>): string;
}
/**
* Options for the keyboard navigation handler.
*/
interface KeyboardNavigationHandlerOptionsObject {
/**
* Function to run on initialization of module.
*/
init: Function;
/**
* An array containing pairs of an array of keycodes, mapped to a
* handler function. When the keycode is received, the handler is called
* with the keycode as parameter.
*/
keyCodeMap: Array<[Array<number>, Function]>;
/**
* Function to run before moving to next/prev module. Receives moving
* direction as parameter: +1 for next, -1 for previous.
*/
terminate?: Function;
/**
* Function to run to validate module. Should return false if module
* should not run, true otherwise. Receives chart as parameter.
*/
validate?: Function;
}
interface PointAccessibilityOptionsObject {
/**
* Provide a description of the data point, announced to screen readers.
*/
description?: string;
}
interface PointOptionsObject {
accessibility?: PointAccessibilityOptionsObject;
}
/**
* The AccessibilityComponent base class, representing a part of the chart
* that has accessibility logic connected to it. This class can be inherited
* from to create a custom accessibility component for a chart.
*
* Components should take care to destroy added elements and unregister
* event handlers on destroy. This is handled automatically if using
* this.addEvent and this.createElement.
*/
class AccessibilityComponent {
/**
* Called when accessibility is disabled or chart is destroyed.
*/
static destroy(): void;
/**
* Get keyboard navigation handler for this component.
*/
static getKeyboardNavigation(): KeyboardNavigationHandler;
/**
* Called on component initialization.
*/
static init(): void;
/**
* Called on every chart render.
*/
static onChartRender(): void;
/**
* Called on updates to the chart, including options changes. Note that
* this is also called on first render of chart.
*/
static onChartUpdate(): void;
}
/**
* Define a keyboard navigation handler for use with a
* Highcharts.AccessibilityComponent instance. This functions as an
* abstraction layer for keyboard navigation, and defines a map of keyCodes
* to handler functions.
*/
class KeyboardNavigationHandler {
/**
* Define a keyboard navigation handler for use with a
* Highcharts.AccessibilityComponent instance. This functions as an
* abstraction layer for keyboard navigation, and defines a map of
* keyCodes to handler functions.
*
* @param chart
* The chart this module should act on.
*
* @param options
* Options for the keyboard navigation handler.
*/
constructor(chart: Chart, options: KeyboardNavigationHandlerOptionsObject);
}
/**
* i18n formatting function. Extends Highcharts.format() functionality by
* also handling arrays and plural conditionals. Arrays can be indexed as
* follows:
*
* - Format: 'This is the first index: {myArray[0]}. The last:
* {myArray[-1]}.'
*
* - Context: { myArray: [0, 1, 2, 3, 4, 5] }
*
* - Result: 'This is the first index: 0. The last: 5.'
*
* They can also be iterated using the #each() function. This will repeat
* the contents of the bracket expression for each element. Example:
*
* - Format: 'List contains: {#each(myArray)cm }'
*
* - Context: { myArray: [0, 1, 2] }
*
* - Result: 'List contains: 0cm 1cm 2cm '
*
* The #each() function optionally takes a length parameter. If positive,
* this parameter specifies the max number of elements to iterate through.
* If negative, the function will subtract the number from the length of the
* array. Use this to stop iterating before the array ends. Example:
*
* - Format: 'List contains: {#each(myArray, -1) }and {myArray[-1]}.'
*
* - Context: { myArray: [0, 1, 2, 3] }
*
* - Result: 'List contains: 0, 1, 2, and 3.'
*
* Use the #plural() function to pick a string depending on whether or not a
* context object is 1. Arguments are #plural(obj, plural, singular).
* Example:
*
* - Format: 'Has {numPoints} {#plural(numPoints, points, point}.'
*
* - Context: { numPoints: 5 }
*
* - Result: 'Has 5 points.'
*
* Optionally there are additional parameters for dual and none:
* #plural(obj, plural, singular, dual, none). Example:
*
* - Format: 'Has {#plural(numPoints, many points, one point, two points,
* none}.'
*
* - Context: { numPoints: 2 }
*
* - Result: 'Has two points.'
*
* The dual or none parameters will take precedence if they are supplied.
*
* @param formatString
* The string to format.
*
* @param context
* Context to apply to the format string.
*
* @param chart
* A `Chart` instance with a time object and numberFormatter, passed
* on to format().
*
* @return The formatted string.
*/
function i18nFormat(formatString: string, context: Dictionary<any>, chart: Chart): string;
/**
* If we have a clear root option node for old and new options and a mapping
* between, we can use this generic function for the copy and warn logic.
*/
function deprecateFromOptionsMap(): void;
/**
* Put accessible info on series and points of a series.
*
* @param series
* The series to add info on.
*/
function describeSeries(series: Series): void;
function getAxisDescription(axis: Axis): string;
function getChartTitle(): string;
}
export default factory;
export let Highcharts: typeof _Highcharts;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,39 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
interface Chart {
/**
* Add an annotation to the chart after render time.
*
* @param options
* The annotation options for the new, detailed annotation.
*
* @return - The newly generated annotation.
*/
addAnnotation(options: AnnotationsOptions, redraw?: boolean): Annotation;
/**
* Remove an annotation from the chart.
*
* @param idOrAnnotation
* The annotation's id or direct annotation object.
*/
removeAnnotation(idOrAnnotation: (number|string|Annotation)): void;
}
interface Point {
mock?: boolean;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,142 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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(r){d(r);d.Highcharts=r;return d}):d("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(d){function r(k,b,d,m){k.hasOwnProperty(b)||(k[b]=m.apply(null,d))}d=d?d._modules:{};r(d,"annotations/eventEmitterMixin.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(k,b){var d=b.addEvent,
m=b.inArray,p=b.objectEach,g=b.pick,f=b.removeEvent,c=k.fireEvent;return{addEvents:function(){var a=this;d(a.graphic.element,"mousedown",function(c){a.onMouseDown(c)});p(a.options.events,function(c,n){var e=function(e){"click"===n&&a.cancelClick||c.call(a,a.chart.pointer.normalize(e),a.target)};if(-1===m(n,a.nonDOMEvents||[]))a.graphic.on(n,e);else d(a,n,e)});a.options.draggable&&(d(a,"drag",a.onDrag),a.graphic.renderer.styledMode||a.graphic.css({cursor:{x:"ew-resize",y:"ns-resize",xy:"move"}[a.options.draggable]}));
a.isUpdating||c(a,"add")},removeDocEvents:function(){this.removeDrag&&(this.removeDrag=this.removeDrag());this.removeMouseUp&&(this.removeMouseUp=this.removeMouseUp())},onMouseDown:function(a){var l=this,n=l.chart.pointer;a.preventDefault&&a.preventDefault();if(2!==a.button){a=n.normalize(a);var e=a.chartX;var h=a.chartY;l.cancelClick=!1;l.chart.hasDraggedAnnotation=!0;l.removeDrag=d(k.doc,"mousemove",function(a){l.hasDragged=!0;a=n.normalize(a);a.prevChartX=e;a.prevChartY=h;c(l,"drag",a);e=a.chartX;
h=a.chartY});l.removeMouseUp=d(k.doc,"mouseup",function(a){l.cancelClick=l.hasDragged;l.hasDragged=!1;l.chart.hasDraggedAnnotation=!1;c(g(l.target,l),"afterUpdate");l.onMouseUp(a)})}},onMouseUp:function(a){var c=this.chart;a=this.target||this;var n=c.options.annotations;c=c.annotations.indexOf(a);this.removeDocEvents();n[c]=a.options},onDrag:function(a){if(this.chart.isInsidePlot(a.chartX-this.chart.plotLeft,a.chartY-this.chart.plotTop)){var c=this.mouseMoveToTranslation(a);"x"===this.options.draggable&&
(c.y=0);"y"===this.options.draggable&&(c.x=0);this.points.length?this.translate(c.x,c.y):(this.shapes.forEach(function(a){a.translate(c.x,c.y)}),this.labels.forEach(function(a){a.translate(c.x,c.y)}));this.redraw(!1)}},mouseMoveToRadians:function(a,c,n){var e=a.prevChartY-n,h=a.prevChartX-c;n=a.chartY-n;a=a.chartX-c;this.chart.inverted&&(c=h,h=e,e=c,c=a,a=n,n=c);return Math.atan2(n,a)-Math.atan2(e,h)},mouseMoveToTranslation:function(a){var c=a.chartX-a.prevChartX;a=a.chartY-a.prevChartY;if(this.chart.inverted){var n=
a;a=c;c=n}return{x:c,y:a}},mouseMoveToScale:function(a,c,n){c=(a.chartX-c||1)/(a.prevChartX-c||1);a=(a.chartY-n||1)/(a.prevChartY-n||1);this.chart.inverted&&(n=a,a=c,c=n);return{x:c,y:a}},destroy:function(){this.removeDocEvents();f(this);this.hcEvents=null}}});r(d,"annotations/ControlPoint.js",[d["parts/Utilities.js"],d["annotations/eventEmitterMixin.js"]],function(k,b){var d=k.extend,m=k.merge,p=k.pick;k=function(b,f,c,a){this.chart=b;this.target=f;this.options=c;this.index=p(c.index,a)};d(k.prototype,
b);k.prototype.nonDOMEvents=["drag"];k.prototype.setVisibility=function(b){this.graphic.attr("visibility",b?"visible":"hidden");this.options.visible=b};k.prototype.render=function(){var b=this.chart,f=this.options;this.graphic=b.renderer.symbol(f.symbol,0,0,f.width,f.height).add(b.controlPointsGroup).css(f.style);this.setVisibility(f.visible);this.addEvents()};k.prototype.redraw=function(b){this.graphic[b?"animate":"attr"](this.options.positioner.call(this,this.target))};k.prototype.destroy=function(){b.destroy.call(this);
this.graphic&&(this.graphic=this.graphic.destroy());this.options=this.target=this.chart=null};k.prototype.update=function(b){var f=this.chart,c=this.target,a=this.index;b=m(!0,this.options,b);this.destroy();this.constructor(f,c,b,a);this.render(f.controlPointsGroup);this.redraw()};return k});r(d,"annotations/MockPoint.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(k,b){var d=b.defined;b=b.extend;var m=function(b,g,f){this.series={visible:!0,chart:b,getPlotBox:k.Series.prototype.getPlotBox};
this.target=g||null;this.options=f;this.applyOptions(this.getOptions())};m.fromPoint=function(b){return new m(b.series.chart,null,{x:b.x,y:b.y,xAxis:b.series.xAxis,yAxis:b.series.yAxis})};m.pointToPixels=function(b,g){var f=b.series,c=f.chart,a=b.plotX,l=b.plotY;c.inverted&&(b.mock?(a=b.plotY,l=b.plotX):(a=c.plotWidth-b.plotY,l=c.plotHeight-b.plotX));f&&!g&&(b=f.getPlotBox(),a+=b.translateX,l+=b.translateY);return{x:a,y:l}};m.pointToOptions=function(b){return{x:b.x,y:b.y,xAxis:b.series.xAxis,yAxis:b.series.yAxis}};
b(m.prototype,{mock:!0,hasDynamicOptions:function(){return"function"===typeof this.options},getOptions:function(){return this.hasDynamicOptions()?this.options(this.target):this.options},applyOptions:function(b){this.command=b.command;this.setAxis(b,"x");this.setAxis(b,"y");this.refresh()},setAxis:function(b,g){g+="Axis";b=b[g];var f=this.series.chart;this.series[g]=b instanceof k.Axis?b:d(b)?f[g][b]||f.get(b):null},toAnchor:function(){var b=[this.plotX,this.plotY,0,0];this.series.chart.inverted&&
(b[0]=this.plotY,b[1]=this.plotX);return b},getLabelConfig:function(){return{x:this.x,y:this.y,point:this}},isInsidePane:function(){var b=this.plotX,g=this.plotY,f=this.series.xAxis,c=this.series.yAxis,a=!0;f&&(a=d(b)&&0<=b&&b<=f.len);c&&(a=a&&d(g)&&0<=g&&g<=c.len);return a},refresh:function(){var b=this.series,g=b.xAxis;b=b.yAxis;var f=this.getOptions();g?(this.x=f.x,this.plotX=g.toPixels(f.x,!0)):(this.x=null,this.plotX=f.x);b?(this.y=f.y,this.plotY=b.toPixels(f.y,!0)):(this.y=null,this.plotY=f.y);
this.isInside=this.isInsidePane()},translate:function(b,g,f,c){this.hasDynamicOptions()||(this.plotX+=f,this.plotY+=c,this.refreshOptions())},scale:function(b,g,f,c){if(!this.hasDynamicOptions()){var a=this.plotY*c;this.plotX=(1-f)*b+this.plotX*f;this.plotY=(1-c)*g+a;this.refreshOptions()}},rotate:function(b,g,f){if(!this.hasDynamicOptions()){var c=Math.cos(f);f=Math.sin(f);var a=this.plotX,l=this.plotY;a-=b;l-=g;this.plotX=a*c-l*f+b;this.plotY=a*f+l*c+g;this.refreshOptions()}},refreshOptions:function(){var b=
this.series,g=b.xAxis;b=b.yAxis;this.x=this.options.x=g?this.options.x=g.toValue(this.plotX,!0):this.plotX;this.y=this.options.y=b?b.toValue(this.plotY,!0):this.plotY}});return m});r(d,"annotations/controllable/controllableMixin.js",[d["parts/Utilities.js"],d["annotations/ControlPoint.js"],d["annotations/MockPoint.js"],d["parts/Tooltip.js"]],function(k,b,d,m){var p=k.isObject,g=k.isString,f=k.merge,c=k.splat;return{init:function(a,c,b){this.annotation=a;this.chart=a.chart;this.options=c;this.points=
[];this.controlPoints=[];this.index=b;this.linkPoints();this.addControlPoints()},attr:function(){this.graphic.attr.apply(this.graphic,arguments)},getPointsOptions:function(){var a=this.options;return a.points||a.point&&c(a.point)},attrsFromOptions:function(a){var c=this.constructor.attrsMap,b={},e,h=this.chart.styledMode;for(e in a){var q=c[e];!q||h&&-1!==["fill","stroke","stroke-width"].indexOf(q)||(b[q]=a[e])}return b},anchor:function(a){var c=a.series.getPlotBox();a=a.mock?a.toAnchor():m.prototype.getAnchor.call({chart:a.series.chart},
a);a={x:a[0]+(this.options.x||0),y:a[1]+(this.options.y||0),height:a[2]||0,width:a[3]||0};return{relativePosition:a,absolutePosition:f(a,{x:a.x+c.translateX,y:a.y+c.translateY})}},point:function(a,c){if(a&&a.series)return a;c&&null!==c.series||(p(a)?c=new d(this.chart,this,a):g(a)?c=this.chart.get(a)||null:"function"===typeof a&&(c=a.call(c,this),c=c.series?c:new d(this.chart,this,a)));return c},linkPoints:function(){var a=this.getPointsOptions(),c=this.points,b=a&&a.length||0,e;for(e=0;e<b;e++){var h=
this.point(a[e],c[e]);if(!h){c.length=0;return}h.mock&&h.refresh();c[e]=h}return c},addControlPoints:function(){var a=this.options.controlPoints;(a||[]).forEach(function(c,n){c=f(this.options.controlPointOptions,c);c.index||(c.index=n);a[n]=c;this.controlPoints.push(new b(this.chart,this,c))},this)},shouldBeDrawn:function(){return!!this.points.length},render:function(a){this.controlPoints.forEach(function(a){a.render()})},redraw:function(a){this.controlPoints.forEach(function(c){c.redraw(a)})},transform:function(a,
c,b,e,h){if(this.chart.inverted){var l=c;c=b;b=l}this.points.forEach(function(l,n){this.transformPoint(a,c,b,e,h,n)},this)},transformPoint:function(a,c,b,e,h,q){var l=this.points[q];l.mock||(l=this.points[q]=d.fromPoint(l));l[a](c,b,e,h)},translate:function(a,c){this.transform("translate",null,null,a,c)},translatePoint:function(a,c,b){this.transformPoint("translate",null,null,a,c,b)},translateShape:function(a,c){var b=this.annotation.chart,e=this.annotation.userOptions,h=b.annotations.indexOf(this.annotation);
b=b.options.annotations[h];this.translatePoint(a,c,0);b[this.collection][this.index].point=this.options.point;e[this.collection][this.index].point=this.options.point},rotate:function(a,c,b){this.transform("rotate",a,c,b)},scale:function(a,c,b,e){this.transform("scale",a,c,b,e)},setControlPointsVisibility:function(a){this.controlPoints.forEach(function(c){c.setVisibility(a)})},destroy:function(){this.graphic&&(this.graphic=this.graphic.destroy());this.tracker&&(this.tracker=this.tracker.destroy());
this.controlPoints.forEach(function(a){a.destroy()});this.options=this.controlPoints=this.points=this.chart=null;this.annotation&&(this.annotation=null)},update:function(a){var c=this.annotation;a=f(!0,this.options,a);var b=this.graphic.parentGroup;this.destroy();this.constructor(c,a);this.render(b);this.redraw()}}});r(d,"annotations/controllable/markerMixin.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(k,b){var d=b.addEvent,m=b.defined,p=b.merge,g=b.objectEach,f=b.uniqueKey,c={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}]}};k.SVGRenderer.prototype.addMarker=function(a,c){var b={id:a},e={stroke:c.color||"none",fill:c.color||"rgba(0, 0, 0, 0.75)"};b.children=c.children.map(function(c){return p(e,c)});c=this.definition(p(!0,
{markerWidth:20,markerHeight:20,refX:0,refY:0,orient:"auto"},c,b));c.id=a;return c};b=function(c){return function(a){this.attr(c,"url(#"+a+")")}};b={markerEndSetter:b("marker-end"),markerStartSetter:b("marker-start"),setItemMarkers:function(c){var a=c.options,b=c.chart,e=b.options.defs,h=a.fill,q=m(h)&&"none"!==h?h:a.stroke;["markerStart","markerEnd"].forEach(function(h){var l=a[h],n;if(l){for(n in e){var v=e[n];if(l===v.id&&"marker"===v.tagName){var t=v;break}}t&&(l=c[h]=b.renderer.addMarker((a.id||
f())+"-"+t.id,p(t,{color:q})),c.attr(h,l.attr("id")))}})}};d(k.Chart,"afterGetContainer",function(){this.options.defs=p(c,this.options.defs||{});g(this.options.defs,function(c){"marker"===c.tagName&&!1!==c.render&&this.renderer.addMarker(c.id,c)},this)});return b});r(d,"annotations/controllable/ControllablePath.js",[d["parts/Globals.js"],d["parts/Utilities.js"],d["annotations/controllable/controllableMixin.js"],d["annotations/controllable/markerMixin.js"]],function(k,b,d,m){var p=b.extend;b=b.merge;
var g="rgba(192,192,192,"+(k.svg?.0001:.002)+")";k=function(b,c,a){this.init(b,c,a);this.collection="shapes"};k.attrsMap={dashStyle:"dashstyle",strokeWidth:"stroke-width",stroke:"stroke",fill:"fill",zIndex:"zIndex"};b(!0,k.prototype,d,{type:"path",setMarkers:m.setItemMarkers,toD:function(){var b=this.options.d;if(b)return"function"===typeof b?b.call(this):b;var c=this.points,a=c.length,l=a,n=c[0],e=l&&this.anchor(n).absolutePosition,h=0,q=2;for(b=e&&["M",e.x,e.y];++h<a&&l;)n=c[h],l=n.command||"L",
e=this.anchor(n).absolutePosition,"Z"===l?b[++q]=l:(l!==c[h-1].command&&(b[++q]=l),b[++q]=e.x,b[++q]=e.y),l=n.series.visible;return l?this.chart.renderer.crispLine(b,this.graphic.strokeWidth()):null},shouldBeDrawn:function(){return d.shouldBeDrawn.call(this)||!!this.options.d},render:function(b){var c=this.options,a=this.attrsFromOptions(c);this.graphic=this.annotation.chart.renderer.path(["M",0,0]).attr(a).add(b);c.className&&this.graphic.addClass(c.className);this.tracker=this.annotation.chart.renderer.path(["M",
0,0]).addClass("highcharts-tracker-line").attr({zIndex:2}).add(b);this.annotation.chart.styledMode||this.tracker.attr({"stroke-linejoin":"round",stroke:g,fill:g,"stroke-width":this.graphic.strokeWidth()+2*c.snap});d.render.call(this);p(this.graphic,{markerStartSetter:m.markerStartSetter,markerEndSetter:m.markerEndSetter});this.setMarkers(this)},redraw:function(b){var c=this.toD(),a=b?"animate":"attr";c?(this.graphic[a]({d:c}),this.tracker[a]({d:c})):(this.graphic.attr({d:"M 0 -9000000000"}),this.tracker.attr({d:"M 0 -9000000000"}));
this.graphic.placed=this.tracker.placed=!!c;d.redraw.call(this,b)}});return k});r(d,"annotations/controllable/ControllableRect.js",[d["parts/Utilities.js"],d["annotations/controllable/controllableMixin.js"],d["annotations/controllable/ControllablePath.js"]],function(d,b,u){d=d.merge;var k=function(b,g,f){this.init(b,g,f);this.collection="shapes"};k.attrsMap=d(u.attrsMap,{width:"width",height:"height"});d(!0,k.prototype,b,{type:"rect",translate:b.translateShape,render:function(d){var g=this.attrsFromOptions(this.options);
this.graphic=this.annotation.chart.renderer.rect(0,-9E9,0,0).attr(g).add(d);b.render.call(this)},redraw:function(d){var g=this.anchor(this.points[0]).absolutePosition;if(g)this.graphic[d?"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;b.redraw.call(this,d)}});return k});r(d,"annotations/controllable/ControllableCircle.js",[d["parts/Utilities.js"],d["annotations/controllable/controllableMixin.js"],d["annotations/controllable/ControllablePath.js"]],
function(d,b,u){d=d.merge;var k=function(b,d,f){this.init(b,d,f);this.collection="shapes"};k.attrsMap=d(u.attrsMap,{r:"r"});d(!0,k.prototype,b,{type:"circle",translate:b.translateShape,render:function(d){var g=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.circle(0,-9E9,0).attr(g).add(d);b.render.call(this)},redraw:function(d){var g=this.anchor(this.points[0]).absolutePosition;if(g)this.graphic[d?"animate":"attr"]({x:g.x,y:g.y,r:this.options.r});else this.graphic.attr({x:0,
y:-9E9});this.graphic.placed=!!g;b.redraw.call(this,d)},setRadius:function(b){this.options.r=b}});return k});r(d,"annotations/controllable/ControllableLabel.js",[d["parts/Globals.js"],d["parts/Utilities.js"],d["annotations/controllable/controllableMixin.js"],d["annotations/MockPoint.js"],d["parts/Tooltip.js"]],function(d,b,u,m,p){var g=b.extend,f=b.format,c=b.isNumber,a=b.merge,l=b.pick,n=function(c,a,b){this.init(c,a,b);this.collection="labels"};n.shapesWithoutBackground=["connector"];n.alignedPosition=
function(c,a){var e=c.align,b=c.verticalAlign,h=(a.x||0)+(c.x||0),l=(a.y||0)+(c.y||0),n,d;"right"===e?n=1:"center"===e&&(n=2);n&&(h+=(a.width-(c.width||0))/n);"bottom"===b?d=1:"middle"===b&&(d=2);d&&(l+=(a.height-(c.height||0))/d);return{x:Math.round(h),y:Math.round(l)}};n.justifiedOptions=function(c,a,b,l){var e=b.align,h=b.verticalAlign,n=a.box?0:a.padding||0,q=a.getBBox();a={align:e,verticalAlign:h,x:b.x,y:b.y,width:a.width,height:a.height};b=l.x-c.plotLeft;var d=l.y-c.plotTop;l=b+n;0>l&&("right"===
e?a.align="left":a.x=-l);l=b+q.width-n;l>c.plotWidth&&("left"===e?a.align="right":a.x=c.plotWidth-l);l=d+n;0>l&&("bottom"===h?a.verticalAlign="top":a.y=-l);l=d+q.height-n;l>c.plotHeight&&("top"===h?a.verticalAlign="bottom":a.y=c.plotHeight-l);return a};n.attrsMap={backgroundColor:"fill",borderColor:"stroke",borderWidth:"stroke-width",zIndex:"zIndex",borderRadius:"r",padding:"padding"};a(!0,n.prototype,u,{translatePoint:function(c,a){u.translatePoint.call(this,c,a,0)},translate:function(c,a){var b=
this.annotation.chart,e=this.annotation.userOptions,h=b.annotations.indexOf(this.annotation);h=b.options.annotations[h];b.inverted&&(b=c,c=a,a=b);this.options.x+=c;this.options.y+=a;h[this.collection][this.index].x=this.options.x;h[this.collection][this.index].y=this.options.y;e[this.collection][this.index].x=this.options.x;e[this.collection][this.index].y=this.options.y},render:function(c){var a=this.options,b=this.attrsFromOptions(a),e=a.style;this.graphic=this.annotation.chart.renderer.label("",
0,-9999,a.shape,null,null,a.useHTML,null,"annotation-label").attr(b).add(c);this.annotation.chart.styledMode||("contrast"===e.color&&(e.color=this.annotation.chart.renderer.getContrast(-1<n.shapesWithoutBackground.indexOf(a.shape)?"#FFFFFF":a.backgroundColor)),this.graphic.css(a.style).shadow(a.shadow));a.className&&this.graphic.addClass(a.className);this.graphic.labelrank=a.labelrank;u.render.call(this)},redraw:function(c){var a=this.options,b=this.text||a.format||a.text,e=this.graphic,l=this.points[0];
e.attr({text:b?f(b,l.getLabelConfig(),this.annotation.chart):a.formatter.call(l,this)});a=this.anchor(l);(b=this.position(a))?(e.alignAttr=b,b.anchorX=a.absolutePosition.x,b.anchorY=a.absolutePosition.y,e[c?"animate":"attr"](b)):e.attr({x:0,y:-9999});e.placed=!!b;u.redraw.call(this,c)},anchor:function(){var a=u.anchor.apply(this,arguments),c=this.options.x||0,b=this.options.y||0;a.absolutePosition.x-=c;a.absolutePosition.y-=b;a.relativePosition.x-=c;a.relativePosition.y-=b;return a},position:function(a){var c=
this.graphic,b=this.annotation.chart,e=this.points[0],d=this.options,f=a.absolutePosition,k=a.relativePosition;if(a=e.series.visible&&m.prototype.isInsidePane.call(e)){if(d.distance)var t=p.prototype.getPosition.call({chart:b,distance:l(d.distance,16)},c.width,c.height,{plotX:k.x,plotY:k.y,negative:e.negative,ttBelow:e.ttBelow,h:k.height||k.width});else d.positioner?t=d.positioner.call(this):(e={x:f.x,y:f.y,width:0,height:0},t=n.alignedPosition(g(d,{width:c.width,height:c.height}),e),"justify"===
this.options.overflow&&(t=n.alignedPosition(n.justifiedOptions(b,c,d,t),e)));d.crop&&(d=t.x-b.plotLeft,e=t.y-b.plotTop,a=b.isInsidePlot(d,e)&&b.isInsidePlot(d+c.width,e+c.height))}return a?t:null}});d.SVGRenderer.prototype.symbols.connector=function(a,b,l,n,d){var e=d&&d.anchorX;d=d&&d.anchorY;var h=l/2;if(c(e)&&c(d)){var f=["M",e,d];var g=b-d;0>g&&(g=-n-g);g<l&&(h=e<a+l/2?g:l-g);d>b+n?f.push("L",a+h,b+n):d<b?f.push("L",a+h,b):e<a?f.push("L",a,b+n/2):e>a+l&&f.push("L",a+l,b+n/2)}return f||[]};return n});
r(d,"annotations/controllable/ControllableImage.js",[d["parts/Utilities.js"],d["annotations/controllable/controllableMixin.js"],d["annotations/controllable/ControllableLabel.js"]],function(d,b,u){d=d.merge;var k=function(b,d,f){this.init(b,d,f);this.collection="shapes"};k.attrsMap={width:"width",height:"height",zIndex:"zIndex"};d(!0,k.prototype,b,{type:"image",translate:b.translateShape,render:function(d){var g=this.attrsFromOptions(this.options),f=this.options;this.graphic=this.annotation.chart.renderer.image(f.src,
0,-9E9,f.width,f.height).attr(g).add(d);this.graphic.width=f.width;this.graphic.height=f.height;b.render.call(this)},redraw:function(d){var g=this.anchor(this.points[0]);if(g=u.prototype.position.call(this,g))this.graphic[d?"animate":"attr"]({x:g.x,y:g.y});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!g;b.redraw.call(this,d)}});return k});r(d,"annotations/annotations.src.js",[d["parts/Globals.js"],d["parts/Utilities.js"],d["annotations/controllable/controllableMixin.js"],d["annotations/controllable/ControllableRect.js"],
d["annotations/controllable/ControllableCircle.js"],d["annotations/controllable/ControllablePath.js"],d["annotations/controllable/ControllableImage.js"],d["annotations/controllable/ControllableLabel.js"],d["annotations/eventEmitterMixin.js"],d["annotations/MockPoint.js"],d["annotations/ControlPoint.js"]],function(d,b,u,m,p,g,f,c,a,l,n){var e=b.addEvent,h=b.defined,q=b.destroyObjectProperties,k=b.erase,C=b.extend,w=b.find,x=b.merge,t=b.pick,z=b.splat;b=b.wrap;var A=d.fireEvent,D=d.reduce,B=d.Chart.prototype,
y=d.Annotation=function(a,c){this.chart=a;this.points=[];this.controlPoints=[];this.coll="annotations";this.labels=[];this.shapes=[];this.options=x(this.defaultOptions,c);this.userOptions=c;c=this.getLabelsAndShapesOptions(this.options,c);this.options.labels=c.labels;this.options.shapes=c.shapes;this.init(a,this.options)};x(!0,y.prototype,u,a,{nonDOMEvents:["add","afterUpdate","drag","remove"],defaultOptions:{visible:!0,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 h(this.y)?this.y:"Annotation label"},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},init:function(){this.linkPoints();this.addControlPoints();this.addShapes();this.addLabels();this.addClipPaths();this.setLabelCollector()},getLabelsAndShapesOptions:function(a,c){var b={};["labels","shapes"].forEach(function(e){a[e]&&(b[e]=z(c[e]).map(function(c,b){return x(a[e][b],c)}))});return b},addShapes:function(){(this.options.shapes||[]).forEach(function(a,c){a=this.initShape(a,c);x(!0,this.options.shapes[c],a.options)},this)},addLabels:function(){(this.options.labels||
[]).forEach(function(a,c){a=this.initLabel(a,c);x(!0,this.options.labels[c],a.options)},this)},addClipPaths:function(){this.setClipAxes();this.clipXAxis&&this.clipYAxis&&(this.clipRect=this.chart.renderer.clipRect(this.getClipBox()))},setClipAxes:function(){var a=this.chart.xAxis,c=this.chart.yAxis,b=D((this.options.labels||[]).concat(this.options.shapes||[]),function(b,e){return[a[e&&e.point&&e.point.xAxis]||b[0],c[e&&e.point&&e.point.yAxis]||b[1]]},[]);this.clipXAxis=b[0];this.clipYAxis=b[1]},getClipBox:function(){return{x:this.clipXAxis.left,
y:this.clipYAxis.top,width:this.clipXAxis.width,height:this.clipYAxis.height}},setLabelCollector:function(){var a=this;a.labelCollector=function(){return a.labels.reduce(function(a,c){c.options.allowOverlap||a.push(c.graphic);return a},[])};a.chart.labelCollectors.push(a.labelCollector)},setOptions:function(a){this.options=x(this.defaultOptions,a)},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);u.redraw.call(this,a)},redrawItems:function(a,c){for(var b=a.length;b--;)this.redrawItem(a[b],c)},render:function(){var a=this.chart.renderer;this.graphic=a.g("annotation").attr({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.clipRect&&this.graphic.clip(this.clipRect);
this.addEvents();u.render.call(this)},setVisibility:function(a){var c=this.options;a=t(a,!c.visible);this.graphic.attr("visibility",a?"visible":"hidden");a||this.setControlPointsVisibility(!1);c.visible=a},setControlPointsVisibility:function(a){var c=function(c){c.setControlPointsVisibility(a)};u.setControlPointsVisibility.call(this,a);this.shapes.forEach(c);this.labels.forEach(c)},destroy:function(){var c=this.chart,b=function(a){a.destroy()};this.labels.forEach(b);this.shapes.forEach(b);this.clipYAxis=
this.clipXAxis=null;k(c.labelCollectors,this.labelCollector);a.destroy.call(this);u.destroy.call(this);q(this,c)},remove:function(){return this.chart.removeAnnotation(this)},update:function(a){var c=this.chart,b=this.getLabelsAndShapesOptions(this.userOptions,a),e=c.annotations.indexOf(this);a=x(!0,this.userOptions,a);a.labels=b.labels;a.shapes=b.shapes;this.destroy();this.constructor(c,a);c.options.annotations[e]=a;this.isUpdating=!0;this.redraw();this.isUpdating=!1;A(this,"afterUpdate")},initShape:function(a,
c){a=x(this.options.shapeOptions,{controlPointOptions:this.options.controlPointOptions},a);c=new y.shapesMap[a.type](this,a,c);c.itemType="shape";this.shapes.push(c);return c},initLabel:function(a,b){a=x(this.options.labelOptions,{controlPointOptions:this.options.controlPointOptions},a);b=new c(this,a,b);b.itemType="label";this.labels.push(b);return b},redrawItem:function(a,c){a.linkPoints();a.shouldBeDrawn()?(a.graphic||this.renderItem(a),a.redraw(t(c,!0)&&a.graphic.placed),a.points.length&&this.adjustVisibility(a)):
this.destroyItem(a)},adjustVisibility:function(a){var c=!1,b=a.graphic;a.points.forEach(function(a){!1!==a.series.visible&&!1!==a.visible&&(c=!0)});c?"hidden"===b.visibility&&b.show():b.hide()},destroyItem:function(a){k(this[a.itemType+"s"],a);a.destroy()},renderItem:function(a){a.render("label"===a.itemType?this.labelsGroup:this.shapesGroup)}});y.shapesMap={rect:m,circle:p,path:g,image:f};y.types={};y.MockPoint=l;y.ControlPoint=n;d.extendAnnotation=function(a,c,b,e){c=c||y;x(!0,a.prototype,c.prototype,
b);a.prototype.defaultOptions=x(a.prototype.defaultOptions,e||{})};C(B,{initAnnotation:function(a){a=new (y.types[a.type]||y)(this,a);this.annotations.push(a);return a},addAnnotation:function(a,c){a=this.initAnnotation(a);this.options.annotations.push(a.options);t(c,!0)&&a.redraw();return a},removeAnnotation:function(a){var c=this.annotations,b="annotations"===a.coll?a:w(c,function(c){return c.options.id===a});b&&(A(b,"remove"),k(this.options.annotations,b.options),k(c,b),b.destroy())},drawAnnotations:function(){this.plotBoxClip.attr(this.plotBox);
this.annotations.forEach(function(a){a.redraw()})}});B.collectionsWithUpdate.push("annotations");B.collectionsWithInit.annotations=[B.addAnnotation];B.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(c,b){c=a.initAnnotation(c);a.options.annotations[b]=c.options});a.drawAnnotations();
e(a,"redraw",a.drawAnnotations);e(a,"destroy",function(){a.plotBoxClip.destroy();a.controlPointsGroup.destroy()})});b(d.Pointer.prototype,"onContainerMouseDown",function(a){this.chart.hasDraggedAnnotation||a.apply(this,Array.prototype.slice.call(arguments,1))})});r(d,"annotations/types/CrookedLine.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var k=b.merge,m=d.Annotation,p=m.MockPoint,g=m.ControlPoint;b=function(){m.apply(this,arguments)};d.extendAnnotation(b,null,{setClipAxes:function(){this.clipXAxis=
this.chart.xAxis[this.options.typeOptions.xAxis];this.clipYAxis=this.chart.yAxis[this.options.typeOptions.yAxis]},getPointsOptions:function(){var b=this.options.typeOptions;return b.points.map(function(c){c.xAxis=b.xAxis;c.yAxis=b.yAxis;return c})},getControlPointsOptions:function(){return this.getPointsOptions()},addControlPoints:function(){this.getControlPointsOptions().forEach(function(b,c){c=new g(this.chart,this,k(this.options.controlPointOptions,b.controlPoint),c);this.controlPoints.push(c);
b.controlPoint=c.options},this)},addShapes:function(){var b=this.options.typeOptions,c=this.initShape(k(b.line,{type:"path",points:this.points.map(function(a,c){return function(a){return a.annotation.points[c]}})}),!1);b.line=c.options}},{typeOptions:{xAxis:0,yAxis:0,line:{fill:"none"}},controlPointOptions:{positioner:function(b){var c=this.graphic;b=p.pointToPixels(b.points[this.index]);return{x:b.x-c.width/2,y:b.y-c.height/2}},events:{drag:function(b,c){c.chart.isInsidePlot(b.chartX-c.chart.plotLeft,
b.chartY-c.chart.plotTop)&&(b=this.mouseMoveToTranslation(b),c.translatePoint(b.x,b.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 m.types.crookedLine=b});r(d,"annotations/types/ElliottWave.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var k=b.merge;b=d.Annotation;var m=b.types.crookedLine,p=function(){m.apply(this,arguments)};d.extendAnnotation(p,m,{addLabels:function(){this.getPointsOptions().forEach(function(b,
d){var c=this.initLabel(k(b.label,{text:this.options.typeOptions.labels[d],point:function(a){return a.annotation.points[d]}}),!1);b.label=c.options},this)}},{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 b.types.elliottWave=p});r(d,"annotations/types/Tunnel.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var k=b.merge;
b=d.Annotation;var m=b.types.crookedLine,p=b.ControlPoint,g=b.MockPoint,f=function(){m.apply(this,arguments)};d.extendAnnotation(f,m,{getPointsOptions:function(){var c=m.prototype.getPointsOptions.call(this);c[2]=this.heightPointOptions(c[1]);c[3]=this.heightPointOptions(c[0]);return c},getControlPointsOptions:function(){return this.getPointsOptions().slice(0,2)},heightPointOptions:function(c){c=k(c);c.y+=this.options.typeOptions.height;return c},addControlPoints:function(){m.prototype.addControlPoints.call(this);
var c=this.options,a=new p(this.chart,this,k(c.controlPointOptions,c.typeOptions.heightControlPoint),2);this.controlPoints.push(a);c.typeOptions.heightControlPoint=a.options},addShapes:function(){this.addLine();this.addBackground()},addLine:function(){var c=this.initShape(k(this.options.typeOptions.line,{type:"path",points:[this.points[0],this.points[1],function(a){a=g.pointToOptions(a.annotation.points[2]);a.command="M";return a},this.points[3]]}),!1);this.options.typeOptions.line=c.options},addBackground:function(){var c=
this.initShape(k(this.options.typeOptions.background,{type:"path",points:this.points.slice()}));this.options.typeOptions.background=c.options},translateSide:function(c,a,b){b=Number(b);var d=0===b?3:2;this.translatePoint(c,a,b);this.translatePoint(c,a,d)},translateHeight:function(c){this.translatePoint(0,c,2);this.translatePoint(0,c,3);this.options.typeOptions.height=this.points[3].y-this.points[0].y}},{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 a=g.pointToPixels(c.points[2]);c=g.pointToPixels(c.points[3]);var b=(a.x+c.x)/2;return{x:b-this.graphic.width/2,y:(c.y-a.y)/(c.x-a.x)*(b-a.x)+a.y-this.graphic.height/2}},events:{drag:function(c,a){a.chart.isInsidePlot(c.chartX-a.chart.plotLeft,c.chartY-a.chart.plotTop)&&(a.translateHeight(this.mouseMoveToTranslation(c).y),a.redraw(!1))}}}},controlPointOptions:{events:{drag:function(c,a){a.chart.isInsidePlot(c.chartX-a.chart.plotLeft,c.chartY-
a.chart.plotTop)&&(c=this.mouseMoveToTranslation(c),a.translateSide(c.x,c.y,this.index),a.redraw(!1))}}}});return b.types.tunnel=f});r(d,"annotations/types/InfinityLine.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var k=b.merge;b=d.Annotation;var m=b.MockPoint,p=b.types.crookedLine,g=function(){p.apply(this,arguments)};g.findEdgeCoordinate=function(c,a,b,d){var e="x"===b?"y":"x";return(a[b]-c[b])*(d-c[e])/(a[e]-c[e])+c[b]};g.findEdgePoint=function(c,a){var b=c.series.xAxis,d=
a.series.yAxis,e=m.pointToPixels(c),h=m.pointToPixels(a),q=h.x-e.x,k=h.y-e.y;a=b.left;var f=a+b.width;b=d.top;d=b+d.height;var w=0>q?a:f,p=0>k?b:d;f={x:0===q?e.x:w,y:0===k?e.y:p};0!==q&&0!==k&&(q=g.findEdgeCoordinate(e,h,"y",w),e=g.findEdgeCoordinate(e,h,"x",p),q>=b&&q<=d?(f.x=w,f.y=q):(f.x=e,f.y=p));f.x-=a;f.y-=b;c.series.chart.inverted&&(c=f.x,f.x=f.y,f.y=c);return f};var f=function(c,a){return function(b){b=b.annotation;var d=b.points,e=b.options.typeOptions.type;"horizontalLine"===e?d=[d[0],new m(b.chart,
d[0].target,{x:d[0].x+1,y:d[0].y,xAxis:d[0].options.xAxis,yAxis:d[0].options.yAxis})]:"verticalLine"===e&&(d=[d[0],new m(b.chart,d[0].target,{x:d[0].x,y:d[0].y+1,xAxis:d[0].options.xAxis,yAxis:d[0].options.yAxis})]);return g.findEdgePoint(d[c],d[a])}};g.endEdgePoint=f(0,1);g.startEdgePoint=f(1,0);d.extendAnnotation(g,p,{addShapes:function(){var c=this.options.typeOptions,a=[this.points[0],g.endEdgePoint];c.type.match(/Line/g)&&(a[0]=g.startEdgePoint);a=this.initShape(k(c.line,{type:"path",points:a}),
!1);c.line=a.options}});return b.types.infinityLine=g});r(d,"annotations/types/Fibonacci.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var k=b.merge;b=d.Annotation;var m=b.MockPoint,p=b.types.tunnel,g=function(c,a){return function(){var b=this.annotation,d=this.anchor(b.startRetracements[c]).absolutePosition,e=this.anchor(b.endRetracements[c]).absolutePosition;d=["M",Math.round(d.x),Math.round(d.y),"L",Math.round(e.x),Math.round(e.y)];a&&(e=this.anchor(b.endRetracements[c-1]).absolutePosition,
b=this.anchor(b.startRetracements[c-1]).absolutePosition,d.push("L",Math.round(e.x),Math.round(e.y),"L",Math.round(b.x),Math.round(b.y)));return d}},f=function(){this.startRetracements=[];this.endRetracements=[];p.apply(this,arguments)};f.levels=[0,.236,.382,.5,.618,.786,1];d.extendAnnotation(f,p,{linkPoints:function(){p.prototype.linkPoints.call(this);this.linkRetracementsPoints()},linkRetracementsPoints:function(){var c=this.points,a=c[0].y-c[3].y,b=c[1].y-c[2].y,d=c[0].x,e=c[1].x;f.levels.forEach(function(h,
l){var n=c[1].y-b*h;this.linkRetracementPoint(l,d,c[0].y-a*h,this.startRetracements);this.linkRetracementPoint(l,e,n,this.endRetracements)},this)},linkRetracementPoint:function(c,a,b,d){var e=d[c],h=this.options.typeOptions;e?(e.options.x=a,e.options.y=b,e.refresh()):d[c]=new m(this.chart,this,{x:a,y:b,xAxis:h.xAxis,yAxis:h.yAxis})},addShapes:function(){f.levels.forEach(function(c,a){this.initShape({type:"path",d:g(a)},!1);0<a&&this.initShape({type:"path",fill:this.options.typeOptions.backgroundColors[a-
1],strokeWidth:0,d:g(a,!0)})},this)},addLabels:function(){f.levels.forEach(function(c,a){var b=this.options.typeOptions;c=this.initLabel(k(b.labels[a],{point:function(c){return m.pointToOptions(c.annotation.startRetracements[a])},text:c.toString()}));b.labels[a]=c.options},this)}},{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 b.types.fibonacci=f});r(d,"annotations/types/Pitchfork.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var k=b.merge;b=d.Annotation;var m=b.MockPoint,p=b.types.infinityLine,g=function(){p.apply(this,arguments)};g.findEdgePoint=function(c,a,b){a=Math.atan2(b.plotY-a.plotY,b.plotX-a.plotX);
return{x:c.plotX+1E7*Math.cos(a),y:c.plotY+1E7*Math.sin(a)}};g.middleLineEdgePoint=function(c){var a=c.annotation;return p.findEdgePoint(a.points[0],new m(a.chart,c,a.midPointOptions()))};var f=function(c){return function(a){var b=a.annotation,d=b.points;return g.findEdgePoint(d[c],d[0],new m(b.chart,a,b.midPointOptions()))}};g.topLineEdgePoint=f(1);g.bottomLineEdgePoint=f(0);d.extendAnnotation(g,p,{midPointOptions:function(){var c=this.points;return{x:(c[1].x+c[2].x)/2,y:(c[1].y+c[2].y)/2,xAxis:c[0].series.xAxis,
yAxis:c[0].series.yAxis}},addShapes:function(){this.addLines();this.addBackgrounds()},addLines:function(){this.initShape({type:"path",points:[this.points[0],g.middleLineEdgePoint]},!1);this.initShape({type:"path",points:[this.points[1],g.topLineEdgePoint]},!1);this.initShape({type:"path",points:[this.points[2],g.bottomLineEdgePoint]},!1)},addBackgrounds:function(){var c=this.shapes,a=this.options.typeOptions,b=this.initShape(k(a.innerBackground,{type:"path",points:[function(a){var c=a.annotation;
a=c.points;c=c.midPointOptions();return{x:(a[1].x+c.x)/2,y:(a[1].y+c.y)/2,xAxis:c.xAxis,yAxis:c.yAxis}},c[1].points[1],c[2].points[1],function(a){var c=a.annotation;a=c.points;c=c.midPointOptions();return{x:(c.x+a[2].x)/2,y:(c.y+a[2].y)/2,xAxis:c.xAxis,yAxis:c.yAxis}}]}));c=this.initShape(k(a.outerBackground,{type:"path",points:[this.points[1],c[1].points[1],c[2].points[1],this.points[2]]}));a.innerBackground=b.options;a.outerBackground=c.options}},{typeOptions:{innerBackground:{fill:"rgba(130, 170, 255, 0.4)",
strokeWidth:0},outerBackground:{fill:"rgba(156, 229, 161, 0.4)",strokeWidth:0}}});return b.types.pitchfork=g});r(d,"annotations/types/VerticalLine.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var k=b.merge;b=d.Annotation;var m=b.MockPoint,p=function(){d.Annotation.apply(this,arguments)};p.connectorFirstPoint=function(b){b=b.annotation;var d=b.points[0],c=m.pointToPixels(d,!0),a=c.y,l=b.options.typeOptions.label.offset;b.chart.inverted&&(a=c.x);return{x:d.x,xAxis:d.series.xAxis,
y:a+l}};p.connectorSecondPoint=function(b){var d=b.annotation;b=d.options.typeOptions;var c=d.points[0],a=b.yOffset;d=m.pointToPixels(c,!0)[d.chart.inverted?"x":"y"];0>b.label.offset&&(a*=-1);return{x:c.x,xAxis:c.series.xAxis,y:d+a}};d.extendAnnotation(p,null,{getPointsOptions:function(){return[this.options.typeOptions.point]},addShapes:function(){var b=this.options.typeOptions,d=this.initShape(k(b.connector,{type:"path",points:[p.connectorFirstPoint,p.connectorSecondPoint]}),!1);b.connector=d.options},
addLabels:function(){var b=this.options.typeOptions,d=b.label,c=0,a=d.offset,l=0>d.offset?"bottom":"top",n="center";this.chart.inverted&&(c=d.offset,a=0,l="middle",n=0>d.offset?"right":"left");d=this.initLabel(k(d,{verticalAlign:l,align:n,x:c,y:a}));b.label=d.options}},{typeOptions:{yOffset:10,label:{offset:-40,point:function(b){return b.annotation.points[0]},allowOverlap:!0,backgroundColor:"none",borderWidth:0,crop:!0,overflow:"none",shape:"rect",text:"{y:.2f}"},connector:{strokeWidth:1,markerEnd:"arrow"}}});
return b.types.verticalLine=p});r(d,"annotations/types/Measure.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var k=b.extend,m=b.isNumber,p=b.merge,g=d.Annotation,f=g.ControlPoint;b=function(){g.apply(this,arguments)};g.types.measure=b;d.extendAnnotation(b,null,{init:function(){g.prototype.init.apply(this,arguments);this.resizeY=this.resizeX=this.offsetY=this.offsetX=0;this.calculations.init.call(this);this.addValues();this.addShapes()},setClipAxes:function(){this.clipXAxis=this.chart.xAxis[this.options.typeOptions.xAxis];
this.clipYAxis=this.chart.yAxis[this.options.typeOptions.yAxis]},pointsOptions:function(){return this.options.points},shapePointsOptions:function(){var c=this.options.typeOptions,a=c.xAxis;c=c.yAxis;return[{x:this.xAxisMin,y:this.yAxisMin,xAxis:a,yAxis:c},{x:this.xAxisMax,y:this.yAxisMin,xAxis:a,yAxis:c},{x:this.xAxisMax,y:this.yAxisMax,xAxis:a,yAxis:c},{x:this.xAxisMin,y:this.yAxisMax,xAxis:a,yAxis:c}]},addControlPoints:function(){var c=this.options.typeOptions.selectType;var a=new f(this.chart,
this,this.options.controlPointOptions,0);this.controlPoints.push(a);"xy"!==c&&(a=new f(this.chart,this,this.options.controlPointOptions,1),this.controlPoints.push(a))},addValues:function(c){var a=this.options.typeOptions,b=a.label.formatter;this.calculations.recalculate.call(this,c);a.label.enabled&&(0<this.labels.length?this.labels[0].text=b&&b.call(this)||this.calculations.defaultFormatter.call(this):this.initLabel(k({shape:"rect",backgroundColor:"none",color:"black",borderWidth:0,dashStyle:"dash",
overflow:"none",align:"left",vertical:"top",crop:!0,point:function(c){c=c.annotation;var b=c.chart,d=b.inverted,l=b.yAxis[a.yAxis],k=b.plotTop,n=b.plotLeft;return{x:(d?k:10)+b.xAxis[a.xAxis].toPixels(c.xAxisMin,!d),y:(d?-n+10:k)+l.toPixels(c.yAxisMin)}},text:b&&b.call(this)||this.calculations.defaultFormatter.call(this)},a.label)))},addShapes:function(){this.addCrosshairs();this.addBackground()},addBackground:function(){"undefined"!==typeof this.shapePointsOptions()[0].x&&this.initShape(k({type:"path",
points:this.shapePointsOptions()},this.options.typeOptions.background),!1)},addCrosshairs:function(){var c=this.chart,a=this.options.typeOptions,b=this.options.typeOptions.point,d=c.xAxis[a.xAxis],e=c.yAxis[a.yAxis],h=c.inverted;c=d.toPixels(this.xAxisMin);d=d.toPixels(this.xAxisMax);var q=e.toPixels(this.yAxisMin),f=e.toPixels(this.yAxisMax),g={point:b,type:"path"};b=[];e=[];h&&(h=c,c=q,q=h,h=d,d=f,f=h);a.crosshairX.enabled&&(b=["M",c,q+(f-q)/2,"L",d,q+(f-q)/2]);a.crosshairY.enabled&&(e=["M",c+(d-
c)/2,q,"L",c+(d-c)/2,f]);0<this.shapes.length?(this.shapes[0].options.d=b,this.shapes[1].options.d=e):(c=p(g,a.crosshairX),a=p(g,a.crosshairY),this.initShape(k({d:b},c),!1),this.initShape(k({d:e},a),!1))},onDrag:function(c){var a=this.mouseMoveToTranslation(c),b=this.options.typeOptions.selectType;c="y"===b?0:a.x;a="x"===b?0:a.y;this.translate(c,a);this.offsetX+=c;this.offsetY+=a;this.redraw(!1,!1,!0)},resize:function(c,a,b,d){var e=this.shapes[2];"x"===d?0===b?(e.translatePoint(c,0,0),e.translatePoint(c,
a,3)):(e.translatePoint(c,0,1),e.translatePoint(c,a,2)):"y"===d?0===b?(e.translatePoint(0,a,0),e.translatePoint(0,a,1)):(e.translatePoint(0,a,2),e.translatePoint(0,a,3)):(e.translatePoint(c,0,1),e.translatePoint(c,a,2),e.translatePoint(0,a,3));this.calculations.updateStartPoints.call(this,!1,!0,b,c,a);this.options.typeOptions.background.height=Math.abs(this.startYMax-this.startYMin);this.options.typeOptions.background.width=Math.abs(this.startXMax-this.startXMin)},redraw:function(c,a,b){this.linkPoints();
this.graphic||this.render();b&&this.calculations.updateStartPoints.call(this,!0,!1);this.clipRect&&this.clipRect.animate(this.getClipBox());this.addValues(a);this.addCrosshairs();this.redrawItems(this.shapes,c);this.redrawItems(this.labels,c);this.controlPoints.forEach(function(a){a.redraw()})},translate:function(c,a){this.shapes.forEach(function(b){b.translate(c,a)});this.options.typeOptions.point.x=this.startXMin;this.options.typeOptions.point.y=this.startYMin},calculations:{init:function(){var c=
this.options.typeOptions,a=this.chart,b=this.calculations.getPointPos,d=a.inverted,e=a.xAxis[c.xAxis],h=a.yAxis[c.yAxis],k=c.background,f=d?k.height:k.width;k=d?k.width:k.height;var g=c.selectType,w=d?a.plotLeft:a.plotTop;a=d?a.plotTop:a.plotLeft;this.startXMin=c.point.x;this.startYMin=c.point.y;m(f)?this.startXMax=this.startXMin+f:this.startXMax=b(e,this.startXMin,parseFloat(f));m(k)?this.startYMax=this.startYMin-k:this.startYMax=b(h,this.startYMin,parseFloat(k));"x"===g?(this.startYMin=h.toValue(w),
this.startYMax=h.toValue(w+h.len)):"y"===g&&(this.startXMin=e.toValue(a),this.startXMax=e.toValue(a+e.len))},recalculate:function(c){var a=this.calculations,b=this.options.typeOptions,d=this.chart.xAxis[b.xAxis];b=this.chart.yAxis[b.yAxis];var e=this.calculations.getPointPos,h=this.offsetX,k=this.offsetY;this.xAxisMin=e(d,this.startXMin,h);this.xAxisMax=e(d,this.startXMax,h);this.yAxisMin=e(b,this.startYMin,k);this.yAxisMax=e(b,this.startYMax,k);this.min=a.min.call(this);this.max=a.max.call(this);
this.average=a.average.call(this);this.bins=a.bins.call(this);c&&this.resize(0,0)},getPointPos:function(c,a,b){return c.toValue(c.toPixels(a)+b)},updateStartPoints:function(c,a,b,d,e){var h=this.options.typeOptions,k=h.selectType,l=this.chart.xAxis[h.xAxis];h=this.chart.yAxis[h.yAxis];var f=this.calculations.getPointPos,g=this.startXMin,n=this.startXMax,t=this.startYMin,z=this.startYMax,A=this.offsetX,D=this.offsetY;a&&("x"===k?0===b?this.startXMin=f(l,g,d):this.startXMax=f(l,n,d):"y"===k?0===b?this.startYMin=
f(h,t,e):this.startYMax=f(h,z,e):(this.startXMax=f(l,n,d),this.startYMax=f(h,z,e)));c&&(this.startXMin=f(l,g,A),this.startXMax=f(l,n,A),this.startYMin=f(h,t,D),this.startYMax=f(h,z,D),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(c,a,b,d){return{xAxisMin:Math.min(a,c),xAxisMax:Math.max(a,c),yAxisMin:Math.min(d,b),yAxisMax:Math.max(d,b)}},min:function(){var c=Infinity,a=
this.chart.series,b=this.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),d=!1;a.forEach(function(a){a.visible&&"highcharts-navigator-series"!==a.options.id&&a.points.forEach(function(a){!a.isNull&&a.y<c&&a.x>b.xAxisMin&&a.x<=b.xAxisMax&&a.y>b.yAxisMin&&a.y<=b.yAxisMax&&(c=a.y,d=!0)})});d||(c="");return c},max:function(){var c=-Infinity,a=this.chart.series,b=this.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),d=!1;a.forEach(function(a){a.visible&&
"highcharts-navigator-series"!==a.options.id&&a.points.forEach(function(a){!a.isNull&&a.y>c&&a.x>b.xAxisMin&&a.x<=b.xAxisMax&&a.y>b.yAxisMin&&a.y<=b.yAxisMax&&(c=a.y,d=!0)})});d||(c="");return c},average:function(){var c="";""!==this.max&&""!==this.min&&(c=(this.max+this.min)/2);return c},bins:function(){var c=0,a=this.chart.series,b=this.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),d=!1;a.forEach(function(a){a.visible&&"highcharts-navigator-series"!==a.options.id&&
a.points.forEach(function(a){!a.isNull&&a.x>b.xAxisMin&&a.x<=b.xAxisMax&&a.y>b.yAxisMin&&a.y<=b.yAxisMax&&(c++,d=!0)})});d||(c="");return c}}},{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(c){var a=
this.index,b=c.chart,d=c.options,e=d.typeOptions,h=e.selectType;d=d.controlPointOptions;var k=b.inverted,f=b.xAxis[e.xAxis];b=b.yAxis[e.yAxis];e=c.xAxisMax;var g=c.yAxisMax,m=c.calculations.getExtremes(c.xAxisMin,c.xAxisMax,c.yAxisMin,c.yAxisMax);"x"===h&&(g=(m.yAxisMax-m.yAxisMin)/2,0===a&&(e=c.xAxisMin));"y"===h&&(e=m.xAxisMin+(m.xAxisMax-m.xAxisMin)/2,0===a&&(g=c.yAxisMin));k?(c=b.toPixels(g),a=f.toPixels(e)):(c=f.toPixels(e),a=b.toPixels(g));return{x:c-d.width/2,y:a-d.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 g.types.measure=b});r(d,"mixins/navigation.js",[],function(){return{initUpdate:function(d){d.navigation||(d.navigation={updates:[],update:function(b,d){this.updates.forEach(function(k){k.update.call(k.context,b,d)})}})},addUpdate:function(d,b){b.navigation||this.initUpdate(b);b.navigation.updates.push({update:d,
context:b})}}});r(d,"annotations/navigationBindings.js",[d["parts/Globals.js"],d["parts/Utilities.js"],d["mixins/navigation.js"]],function(d,b,r){function k(b){var c=b.prototype.defaultOptions.events&&b.prototype.defaultOptions.events.click;q(!0,b.prototype.defaultOptions.events,{click:function(b){var d=this,e=d.chart.navigationBindings,h=e.activeAnnotation;c&&c.click.call(d,b);h!==d?(e.deselectAnnotation(),e.activeAnnotation=d,d.setControlPointsVisibility(!0),a(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(),a(e,"closePopup"));b.activeAnnotation=!0}})}var p=b.addEvent,g=b.attr,f=b.extend,c=b.format,a=b.fireEvent,l=b.isArray,n=b.isFunction,
e=b.isNumber,h=b.isObject,q=b.merge,v=b.objectEach,C=b.pick,w=d.doc,x=d.win;d.NavigationBindings=function(a,b){this.chart=a;this.options=b;this.eventsToUnbind=[];this.container=w.getElementsByClassName(this.options.bindingsClassName)};d.NavigationBindings.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:[]};
d.NavigationBindings.annotationsNonEditable={rectangle:["crosshairX","crosshairY","label"]};f(d.NavigationBindings.prototype,{initEvents:function(){var a=this,b=a.chart,c=a.container,d=a.options;a.boundClassNames={};v(d.bindings,function(b){a.boundClassNames[b.className]=b});[].forEach.call(c,function(b){a.eventsToUnbind.push(p(b,"click",function(b){var d=a.getButtonEvents(c,b);d&&a.bindingsButtonClick(d.button,d.events,b)}))});v(d.events||{},function(b,c){n(b)&&a.eventsToUnbind.push(p(a,c,b))});
a.eventsToUnbind.push(p(b.container,"click",function(c){!b.cancelClick&&b.isInsidePlot(c.chartX-b.plotLeft,c.chartY-b.plotTop)&&a.bindingsChartClick(this,c)}));a.eventsToUnbind.push(p(b.container,"mousemove",function(b){a.bindingsContainerMouseMove(this,b)}))},initUpdate:function(){var a=this;r.addUpdate(function(b){a.update(b)},this.chart)},bindingsButtonClick:function(b,c,d){var e=this.chart;this.selectedButtonElement&&(a(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=b;a(this,"selectButton",{button:b});c.init&&c.init.call(this,b,d);(c.start||c.steps)&&e.renderer.boxWrapper.addClass("highcharts-draw-mode")},bindingsChartClick:function(b,c){b=this.chart;var d=this.selectedButton;b=b.renderer.boxWrapper;var e;if(e=this.activeAnnotation&&!c.activeAnnotation&&c.target.parentNode){a:{e=
c.target;var h=x.Element.prototype,f=h.matches||h.msMatchesSelector||h.webkitMatchesSelector,g=null;if(h.closest)g=h.closest.call(e,".highcharts-popup");else{do{if(f.call(e,".highcharts-popup"))break a;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType)}e=g}e=!e}e&&(a(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]:
(a(this,"deselectButton",{button:this.selectedButtonElement}),b.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]):(a(this,"deselectButton",{button:this.selectedButtonElement}),b.removeClass("highcharts-draw-mode"),this.steps=!1,this.selectedButton=null,
d.end&&d.end.call(this,c,this.currentUserDetails))))},bindingsContainerMouseMove:function(a,b){this.mouseMoveEvent&&this.mouseMoveEvent(b,this.currentUserDetails)},fieldsToOptions:function(a,b){v(a,function(a,c){var d=parseFloat(a),h=c.split("."),f=b,g=h.length-1;!e(d)||a.match(/px/g)||c.match(/format/g)||(a=d);""!==a&&"undefined"!==a&&h.forEach(function(b,c){var d=C(h[c+1],"");g===c?f[b]=a:(f[b]||(f[b]=d.match(/\d/g)?[]:{}),f=f[b])})});return b},deselectAnnotation:function(){this.activeAnnotation&&
(this.activeAnnotation.setControlPointsVisibility(!1),this.activeAnnotation=!1)},annotationToFields:function(a){function b(d,e,f,q){if(f&&-1===t.indexOf(e)&&(0<=(f.indexOf&&f.indexOf(e))||f[e]||!0===f))if(l(d))q[e]=[],d.forEach(function(a,c){h(a)?(q[e][c]={},v(a,function(a,d){b(a,d,g[e],q[e][c])})):b(a,0,g[e],q[e])});else if(h(d)){var m={};l(q)?(q.push(m),m[e]={},m=m[e]):q[e]=m;v(d,function(a,c){b(a,c,0===e?f:g[e],m)})}else"format"===e?q[e]=[c(d,a.labels[0].points[0]).toString(),"text"]:l(q)?q.push([d,
k(d)]):q[e]=[d,k(d)]}var e=a.options,f=d.NavigationBindings.annotationsEditable,g=f.nestedOptions,k=this.utils.getFieldType,q=C(e.type,e.shapes&&e.shapes[0]&&e.shapes[0].type,e.labels&&e.labels[0]&&e.labels[0].itemType,"label"),t=d.NavigationBindings.annotationsNonEditable[e.langKey]||[],m={langKey:e.langKey,type:q};v(e,function(a,c){"typeOptions"===c?(m[c]={},v(e[c],function(a,d){b(a,d,g,m[c],!0)})):b(a,c,f[q],m)});return m},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},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},update:function(a){this.options=q(!0,this.options,a);this.removeEvents();this.initEvents()},removeEvents:function(){this.eventsToUnbind.forEach(function(a){a()})},destroy:function(){this.removeEvents()},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]}}});d.Chart.prototype.initNavigationBindings=function(){var a=this.options;a&&a.navigation&&a.navigation.bindings&&(this.navigationBindings=new d.NavigationBindings(this,a.navigation),this.navigationBindings.initEvents(),
this.navigationBindings.initUpdate())};p(d.Chart,"load",function(){this.initNavigationBindings()});p(d.Chart,"destroy",function(){this.navigationBindings&&this.navigationBindings.destroy()});p(d.NavigationBindings,"deselectButton",function(){this.selectedButtonElement=null});p(d.Annotation,"remove",function(){this.chart.navigationBindings&&this.chart.navigationBindings.deselectAnnotation()});d.Annotation&&(k(d.Annotation),v(d.Annotation.types,function(a){k(a)}));d.setOptions({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",shapes:[{type:"circle",point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,y:a.yAxis[0].value},r:5,controlPoints:[{positioner:function(a){var b=d.Annotation.MockPoint.pointToPixels(a.points[0]);a=a.options.r;return{x:b.x+a*Math.cos(Math.PI/
4)-this.graphic.width/2,y:b.y+a*Math.sin(Math.PI/4)-this.graphic.height/2}},events:{drag:function(a,b){var c=b.annotation;a=this.mouseMoveToTranslation(a);b.setRadius(Math.max(b.options.r+a.y/Math.sin(Math.PI/4),5));c.options.shapes[0]=c.userOptions.shapes[0]=b.options;b.redraw(!1)}}}]}]},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),c=this.chart.options.navigation,e=b.xAxis[0].value;b=b.yAxis[0].value;return this.chart.addAnnotation(q({langKey:"rectangle",shapes:[{type:"path",points:[{xAxis:0,yAxis:0,x:e,y:b},{xAxis:0,yAxis:0,x:e,y:b},{xAxis:0,yAxis:0,x:e,y:b},{xAxis:0,yAxis:0,x:e,
y:b}]}],controlPoints:[{positioner:function(a){a=d.Annotation.MockPoint.pointToPixels(a.shapes[0].points[2]);return{x:a.x-4,y:a.y-4}},events:{drag:function(b){var c=this.chart.pointer.getCoordinates(a),d=c.xAxis[0].value;c=c.yAxis[0].value;var e=b.options.shapes[0].points;e[1].x=d;e[2].x=d;e[2].y=c;e[3].y=c;b.options.shapes[0].points=e;b.redraw(!1)}}}]},c.annotationsOptions,c.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",labelOptions:{format:"{y:.2f}"},labels:[{point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,y:a.yAxis[0].value},overflow:"none",crop:!0,controlPoints:[{symbol:"triangle-down",positioner:function(a){if(!a.graphic.placed)return{x:0,
y:-9E7};a=d.Annotation.MockPoint.pointToPixels(a.points[0]);return{x:a.x-this.graphic.width/2,y:a.y-this.graphic.height/2}},events:{drag:function(a,b){a=this.mouseMoveToTranslation(a);b.translatePoint(a.x,a.y);b.annotation.labels[0].options=b.options;b.redraw(!1)}}},{symbol:"square",positioner:function(a){return a.graphic.placed?{x:a.graphic.alignAttr.x-this.graphic.width/2,y:a.graphic.alignAttr.y-this.graphic.height/2}:{x:0,y:-9E7}},events:{drag:function(a,b){a=this.mouseMoveToTranslation(a);b.translate(a.x,
a.y);b.annotation.labels[0].options=b.options;b.redraw(!1)}}}]}]},b.annotationsOptions,b.bindings.labelAnnotation.annotationsOptions))}}},events:{},annotationsOptions:{}}})});r(d,"annotations/popup.js",[d["parts/Globals.js"],d["parts/Utilities.js"]],function(d,b){var k=b.addEvent,m=b.createElement,p=b.defined,g=b.isArray,f=b.isObject,c=b.isString,a=b.objectEach,l=b.pick;b=b.wrap;var n=/\d/g;b(d.Pointer.prototype,"onContainerMouseDown",function(a,b){var d=b.target&&b.target.className;c(d)&&0<=d.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=m("div",{className:"highcharts-popup"},null,a);this.lang=this.getLangpack();this.iconsURL=b;this.addCloseBtn()},addCloseBtn:function(){var a=this;var b=m("div",{className:"highcharts-popup-close"},null,this.container);b.style["background-image"]="url("+this.iconsURL+"close.svg)";["click","touchstart"].forEach(function(c){k(b,c,function(){a.closePopup()})})},
addColsContainer:function(a){var b=m("div",{className:"highcharts-popup-lhs-col"},null,a);a=m("div",{className:"highcharts-popup-rhs-col"},null,a);m("div",{className:"highcharts-popup-rhs-col-wrapper"},null,a);return{lhsCol:b,rhsCol:a}},addInput:function(a,b,c,d){var e=a.split(".");e=e[e.length-1];var h=this.lang;b="highcharts-"+b+"-"+e;b.match(n)||m("label",{innerHTML:h[e]||e,htmlFor:b},null,c);m("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 e=this,h=this.closePopup,g=this.getFields;var q=m("button",{innerHTML:b},null,a);["click","touchstart"].forEach(function(a){k(q,a,function(){h.call(e);return d(g(f,c))})});return q},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,h;var f={actionType:b,linkedTo:d&&d.getAttribute("value"),fields:{}};[].forEach.call(c,
function(a){h=a.getAttribute("highcharts-data-name");(e=a.getAttribute("highcharts-data-series-id"))?f.seriesId=a.value:h?f.fields[h]=a.value:f.type=a.value});a&&(f.fields["params.volumeSeriesID"]=a.getAttribute("value"));return f},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 d.getOptions().lang.navigation.popup},annotations:{addToolbar:function(a,
b,c){var d=this,e=this.lang,h=this.popup.container,f=this.showForm;-1===h.className.indexOf("highcharts-annotation-toolbar")&&(h.className+=" highcharts-annotation-toolbar");h.style.top=a.plotTop+10+"px";m("span",{innerHTML:l(e[b.langKey]||b.langKey,b.shapes&&b.shapes[0].type)},null,h);var g=this.addButton(h,e.removeButton||"remove","remove",c,h);g.className+=" highcharts-annotation-remove-button";g.style["background-image"]="url("+this.iconsURL+"destroy.svg)";g=this.addButton(h,e.editButton||"edit",
"edit",function(){f.call(d,"annotation-edit",a,b,c)},h);g.className+=" highcharts-annotation-edit-button";g.style["background-image"]="url("+this.iconsURL+"edit.svg)"},addForm:function(a,b,c,d){var e=this.popup.container,h=this.lang;m("h2",{innerHTML:h[b.langKey]||b.langKey,className:"highcharts-popup-main-title"},null,e);var f=m("div",{className:"highcharts-popup-lhs-col highcharts-popup-lhs-full"},null,e);var g=m("div",{className:"highcharts-popup-bottom-row"},null,e);this.annotations.addFormFields.call(this,
f,a,"",b,[],!0);this.addButton(g,d?h.addButton||"add":h.saveButton||"save",d?"add":"save",c,e)},addFormFields:function(b,c,d,k,l,p){var e=this,h=this.annotations.addFormFields,q=this.addInput,v=this.lang,w,r;a(k,function(a,k){w=""!==d?d+"."+k:k;f(a)&&(!g(a)||g(a)&&f(a[0])?(r=v[k]||k,r.match(n)||l.push([!0,r,b]),h.call(e,b,c,w,a,l,!1)):l.push([e,w,"annotation",b,a]))});p&&(l=l.sort(function(a){return a[1].match(/format/g)?-1:1}),l.forEach(function(a){!0===a[0]?m("span",{className:"highcharts-annotation-title",
innerHTML:a[1]},null,a[2]):q.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 h=b[0].querySelectorAll(".highcharts-popup-rhs-col")[0];this.addButton(h,e.addButton||"add","add",c,h);this.addColsContainer(b[1]);d.addIndicatorList.call(this,a,b[1],"edit");h=b[1].querySelectorAll(".highcharts-popup-rhs-col")[0];
this.addButton(h,e.saveButton||"save","edit",c,h);this.addButton(h,e.removeButton||"remove","remove",c,h)},addIndicatorList:function(b,c,d){var e=this,h=c.querySelectorAll(".highcharts-popup-lhs-col")[0];c=c.querySelectorAll(".highcharts-popup-rhs-col")[0];var f="edit"===d,g=f?b.series:b.options.plotOptions,l=this.indicators.addFormFields,q;var n=m("ul",{className:"highcharts-indicator-list"},null,h);var p=c.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];a(g,function(a,c){var d=a.options;
if(a.params||d&&d.params){var h=e.indicators.getNameType(a,c),v=h.type;q=m("li",{className:"highcharts-indicator-list",innerHTML:h.name},null,n);["click","touchstart"].forEach(function(c){k(q,c,function(){l.call(e,b,f?a:g[v],h.type,p);f&&a.options&&m("input",{type:"hidden",name:"highcharts-id-"+v,value:a.options.id},null,p).setAttribute("highcharts-data-series-id",a.options.id)})})}});0<n.childNodes.length&&n.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 e;m("label",{innerHTML:this.lang[b]||b,htmlFor:a},null,d);var h=m("select",{name:a,className:"highcharts-popup-field"},null,d);h.setAttribute("id","highcharts-select-"+b);c.series.forEach(function(a){e=a.options;!e.params&&e.id&&"highcharts-navigator-series"!==e.id&&m("option",{innerHTML:e.name||e.id,value:e.id},null,h)});p(f)&&(h.value=
f)},addFormFields:function(a,b,c,d){var e=b.params||b.options.params,f=this.indicators.getNameType;d.innerHTML="";m("h3",{className:"highcharts-indicator-title",innerHTML:f(b,c).name},null,d);m("input",{type:"hidden",name:"highcharts-type-"+c,value:c},null,d);this.indicators.listAllSeries.call(this,c,"series",a,d,b.linkedParent&&e.volumeSeriesID);e.volumeSeriesID&&this.indicators.listAllSeries.call(this,c,"volume",a,d,b.linkedParent&&b.linkedParent.options.id);this.indicators.addParamInputs.call(this,
a,"params",e,c,d)},addParamInputs:function(b,c,d,g,k){var e=this,h=this.indicators.addParamInputs,l=this.addInput,m;a(d,function(a,d){m=c+"."+d;f(a)?h.call(e,b,m,a,g,k):"params.volumeSeriesID"!==m&&l.call(e,m,g,k,[a,"text"])})},getAmount:function(){var b=0;a(this.series,function(a){var c=a.options;(a.params||c&&c.params)&&b++});return b}},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",e=this.lang;0===b&&(d+=" highcharts-tab-disabled");b=m("span",{innerHTML:e[a+"Button"]||a,className:d},null,c);b.setAttribute("highcharts-data-tab-type",a);return b},addContentItem:function(){return m("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){k(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")}}};k(d.NavigationBindings,"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.0.4/gfx/stock-icons/"));this.popup.showForm(a.formType,this.chart,a.options,a.onSubmit)});k(d.NavigationBindings,"closePopup",
function(){this.popup&&this.popup.closePopup()})});r(d,"masters/modules/annotations-advanced.src.js",[],function(){})});
//# sourceMappingURL=annotations-advanced.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,39 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
interface Chart {
/**
* Add an annotation to the chart after render time.
*
* @param options
* The annotation options for the new, detailed annotation.
*
* @return - The newly generated annotation.
*/
addAnnotation(options: AnnotationsOptions, redraw?: boolean): Annotation;
/**
* Remove an annotation from the chart.
*
* @param idOrAnnotation
* The annotation's id or direct annotation object.
*/
removeAnnotation(idOrAnnotation: (number|string|Annotation)): void;
}
interface Point {
mock?: boolean;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
interface Chart {
/**
* Add an annotation to the chart after render time.
*
* @param options
* The annotation options for the new, detailed annotation.
*
* @return - The newly generated annotation.
*/
addAnnotation(options: AnnotationsOptions, redraw?: boolean): Annotation;
/**
* Remove an annotation from the chart.
*
* @param idOrAnnotation
* The annotation's id or direct annotation object.
*/
removeAnnotation(idOrAnnotation: (number|string|Annotation)): void;
}
interface Point {
/**
* Indicates if this is a mock point for an annotation.
*/
mock?: boolean;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,103 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
Annotations module
(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/annotations",["highcharts"],function(m){e(m);e.Highcharts=m;return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){function m(d,c,e,k){d.hasOwnProperty(c)||(d[c]=k.apply(null,e))}e=e?e._modules:{};m(e,"annotations/eventEmitterMixin.js",[e["parts/Globals.js"],e["parts/Utilities.js"]],function(d,c){var e=c.addEvent,k=c.inArray,
b=c.objectEach,t=c.pick,q=c.removeEvent,v=d.fireEvent;return{addEvents:function(){var a=this;e(a.graphic.element,"mousedown",function(h){a.onMouseDown(h)});b(a.options.events,function(h,b){var f=function(g){"click"===b&&a.cancelClick||h.call(a,a.chart.pointer.normalize(g),a.target)};if(-1===k(b,a.nonDOMEvents||[]))a.graphic.on(b,f);else e(a,b,f)});a.options.draggable&&(e(a,"drag",a.onDrag),a.graphic.renderer.styledMode||a.graphic.css({cursor:{x:"ew-resize",y:"ns-resize",xy:"move"}[a.options.draggable]}));
a.isUpdating||v(a,"add")},removeDocEvents:function(){this.removeDrag&&(this.removeDrag=this.removeDrag());this.removeMouseUp&&(this.removeMouseUp=this.removeMouseUp())},onMouseDown:function(a){var h=this,b=h.chart.pointer;a.preventDefault&&a.preventDefault();if(2!==a.button){a=b.normalize(a);var f=a.chartX;var g=a.chartY;h.cancelClick=!1;h.chart.hasDraggedAnnotation=!0;h.removeDrag=e(d.doc,"mousemove",function(a){h.hasDragged=!0;a=b.normalize(a);a.prevChartX=f;a.prevChartY=g;v(h,"drag",a);f=a.chartX;
g=a.chartY});h.removeMouseUp=e(d.doc,"mouseup",function(g){h.cancelClick=h.hasDragged;h.hasDragged=!1;h.chart.hasDraggedAnnotation=!1;v(t(h.target,h),"afterUpdate");h.onMouseUp(g)})}},onMouseUp:function(a){var h=this.chart;a=this.target||this;var b=h.options.annotations;h=h.annotations.indexOf(a);this.removeDocEvents();b[h]=a.options},onDrag:function(a){if(this.chart.isInsidePlot(a.chartX-this.chart.plotLeft,a.chartY-this.chart.plotTop)){var h=this.mouseMoveToTranslation(a);"x"===this.options.draggable&&
(h.y=0);"y"===this.options.draggable&&(h.x=0);this.points.length?this.translate(h.x,h.y):(this.shapes.forEach(function(a){a.translate(h.x,h.y)}),this.labels.forEach(function(a){a.translate(h.x,h.y)}));this.redraw(!1)}},mouseMoveToRadians:function(a,h,b){var f=a.prevChartY-b,g=a.prevChartX-h;b=a.chartY-b;a=a.chartX-h;this.chart.inverted&&(h=g,g=f,f=h,h=a,a=b,b=h);return Math.atan2(b,a)-Math.atan2(f,g)},mouseMoveToTranslation:function(a){var h=a.chartX-a.prevChartX;a=a.chartY-a.prevChartY;if(this.chart.inverted){var b=
a;a=h;h=b}return{x:h,y:a}},mouseMoveToScale:function(a,h,b){h=(a.chartX-h||1)/(a.prevChartX-h||1);a=(a.chartY-b||1)/(a.prevChartY-b||1);this.chart.inverted&&(b=a,a=h,h=b);return{x:h,y:a}},destroy:function(){this.removeDocEvents();q(this);this.hcEvents=null}}});m(e,"annotations/ControlPoint.js",[e["parts/Utilities.js"],e["annotations/eventEmitterMixin.js"]],function(d,c){var e=d.extend,k=d.merge,b=d.pick;d=function(c,d,e,a){this.chart=c;this.target=d;this.options=e;this.index=b(e.index,a)};e(d.prototype,
c);d.prototype.nonDOMEvents=["drag"];d.prototype.setVisibility=function(b){this.graphic.attr("visibility",b?"visible":"hidden");this.options.visible=b};d.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()};d.prototype.redraw=function(b){this.graphic[b?"animate":"attr"](this.options.positioner.call(this,this.target))};d.prototype.destroy=function(){c.destroy.call(this);
this.graphic&&(this.graphic=this.graphic.destroy());this.options=this.target=this.chart=null};d.prototype.update=function(b){var c=this.chart,d=this.target,a=this.index;b=k(!0,this.options,b);this.destroy();this.constructor(c,d,b,a);this.render(c.controlPointsGroup);this.redraw()};return d});m(e,"annotations/MockPoint.js",[e["parts/Globals.js"],e["parts/Utilities.js"]],function(d,c){var e=c.defined;c=c.extend;var k=function(b,c,e){this.series={visible:!0,chart:b,getPlotBox:d.Series.prototype.getPlotBox};
this.target=c||null;this.options=e;this.applyOptions(this.getOptions())};k.fromPoint=function(b){return new k(b.series.chart,null,{x:b.x,y:b.y,xAxis:b.series.xAxis,yAxis:b.series.yAxis})};k.pointToPixels=function(b,c){var d=b.series,e=d.chart,a=b.plotX,h=b.plotY;e.inverted&&(b.mock?(a=b.plotY,h=b.plotX):(a=e.plotWidth-b.plotY,h=e.plotHeight-b.plotX));d&&!c&&(b=d.getPlotBox(),a+=b.translateX,h+=b.translateY);return{x:a,y:h}};k.pointToOptions=function(b){return{x:b.x,y:b.y,xAxis:b.series.xAxis,yAxis:b.series.yAxis}};
c(k.prototype,{mock:!0,hasDynamicOptions:function(){return"function"===typeof this.options},getOptions:function(){return this.hasDynamicOptions()?this.options(this.target):this.options},applyOptions:function(b){this.command=b.command;this.setAxis(b,"x");this.setAxis(b,"y");this.refresh()},setAxis:function(b,c){c+="Axis";b=b[c];var q=this.series.chart;this.series[c]=b instanceof d.Axis?b:e(b)?q[c][b]||q.get(b):null},toAnchor:function(){var b=[this.plotX,this.plotY,0,0];this.series.chart.inverted&&
(b[0]=this.plotY,b[1]=this.plotX);return b},getLabelConfig:function(){return{x:this.x,y:this.y,point:this}},isInsidePane:function(){var b=this.plotX,c=this.plotY,d=this.series.xAxis,k=this.series.yAxis,a=!0;d&&(a=e(b)&&0<=b&&b<=d.len);k&&(a=a&&e(c)&&0<=c&&c<=k.len);return a},refresh:function(){var b=this.series,c=b.xAxis;b=b.yAxis;var d=this.getOptions();c?(this.x=d.x,this.plotX=c.toPixels(d.x,!0)):(this.x=null,this.plotX=d.x);b?(this.y=d.y,this.plotY=b.toPixels(d.y,!0)):(this.y=null,this.plotY=d.y);
this.isInside=this.isInsidePane()},translate:function(b,c,d,e){this.hasDynamicOptions()||(this.plotX+=d,this.plotY+=e,this.refreshOptions())},scale:function(b,c,d,e){if(!this.hasDynamicOptions()){var a=this.plotY*e;this.plotX=(1-d)*b+this.plotX*d;this.plotY=(1-e)*c+a;this.refreshOptions()}},rotate:function(b,c,d){if(!this.hasDynamicOptions()){var e=Math.cos(d);d=Math.sin(d);var a=this.plotX,h=this.plotY;a-=b;h-=c;this.plotX=a*e-h*d+b;this.plotY=a*d+h*e+c;this.refreshOptions()}},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 k});m(e,"annotations/controllable/controllableMixin.js",[e["parts/Utilities.js"],e["annotations/ControlPoint.js"],e["annotations/MockPoint.js"],e["parts/Tooltip.js"]],function(d,c,e,k){var b=d.isObject,t=d.isString,q=d.merge,B=d.splat;return{init:function(a,b,c){this.annotation=a;this.chart=a.chart;this.options=b;this.points=
[];this.controlPoints=[];this.index=c;this.linkPoints();this.addControlPoints()},attr:function(){this.graphic.attr.apply(this.graphic,arguments)},getPointsOptions:function(){var a=this.options;return a.points||a.point&&B(a.point)},attrsFromOptions:function(a){var b=this.constructor.attrsMap,c={},f,g=this.chart.styledMode;for(f in a){var l=b[f];!l||g&&-1!==["fill","stroke","stroke-width"].indexOf(l)||(c[l]=a[f])}return c},anchor:function(a){var b=a.series.getPlotBox();a=a.mock?a.toAnchor():k.prototype.getAnchor.call({chart:a.series.chart},
a);a={x:a[0]+(this.options.x||0),y:a[1]+(this.options.y||0),height:a[2]||0,width:a[3]||0};return{relativePosition:a,absolutePosition:q(a,{x:a.x+b.translateX,y:a.y+b.translateY})}},point:function(a,c){if(a&&a.series)return a;c&&null!==c.series||(b(a)?c=new e(this.chart,this,a):t(a)?c=this.chart.get(a)||null:"function"===typeof a&&(c=a.call(c,this),c=c.series?c:new e(this.chart,this,a)));return c},linkPoints:function(){var a=this.getPointsOptions(),b=this.points,c=a&&a.length||0,f;for(f=0;f<c;f++){var g=
this.point(a[f],b[f]);if(!g){b.length=0;return}g.mock&&g.refresh();b[f]=g}return b},addControlPoints:function(){var a=this.options.controlPoints;(a||[]).forEach(function(b,d){b=q(this.options.controlPointOptions,b);b.index||(b.index=d);a[d]=b;this.controlPoints.push(new c(this.chart,this,b))},this)},shouldBeDrawn:function(){return!!this.points.length},render:function(a){this.controlPoints.forEach(function(a){a.render()})},redraw:function(a){this.controlPoints.forEach(function(b){b.redraw(a)})},transform:function(a,
b,c,f,g){if(this.chart.inverted){var l=b;b=c;c=l}this.points.forEach(function(l,d){this.transformPoint(a,b,c,f,g,d)},this)},transformPoint:function(a,b,c,f,g,l){var d=this.points[l];d.mock||(d=this.points[l]=e.fromPoint(d));d[a](b,c,f,g)},translate:function(a,b){this.transform("translate",null,null,a,b)},translatePoint:function(a,b,c){this.transformPoint("translate",null,null,a,b,c)},translateShape:function(a,b){var c=this.annotation.chart,f=this.annotation.userOptions,g=c.annotations.indexOf(this.annotation);
c=c.options.annotations[g];this.translatePoint(a,b,0);c[this.collection][this.index].point=this.options.point;f[this.collection][this.index].point=this.options.point},rotate:function(a,b,c){this.transform("rotate",a,b,c)},scale:function(a,b,c,f){this.transform("scale",a,b,c,f)},setControlPointsVisibility:function(a){this.controlPoints.forEach(function(b){b.setVisibility(a)})},destroy:function(){this.graphic&&(this.graphic=this.graphic.destroy());this.tracker&&(this.tracker=this.tracker.destroy());
this.controlPoints.forEach(function(a){a.destroy()});this.options=this.controlPoints=this.points=this.chart=null;this.annotation&&(this.annotation=null)},update:function(a){var b=this.annotation;a=q(!0,this.options,a);var c=this.graphic.parentGroup;this.destroy();this.constructor(b,a);this.render(c);this.redraw()}}});m(e,"annotations/controllable/markerMixin.js",[e["parts/Globals.js"],e["parts/Utilities.js"]],function(d,c){var e=c.addEvent,k=c.defined,b=c.merge,t=c.objectEach,q=c.uniqueKey,v={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.SVGRenderer.prototype.addMarker=function(a,c){var d={id:a},f={stroke:c.color||"none",fill:c.color||"rgba(0, 0, 0, 0.75)"};d.children=c.children.map(function(a){return b(f,a)});c=this.definition(b(!0,
{markerWidth:20,markerHeight:20,refX:0,refY:0,orient:"auto"},c,d));c.id=a;return c};c=function(a){return function(b){this.attr(a,"url(#"+b+")")}};c={markerEndSetter:c("marker-end"),markerStartSetter:c("marker-start"),setItemMarkers:function(a){var c=a.options,d=a.chart,f=d.options.defs,g=c.fill,l=k(g)&&"none"!==g?g:c.stroke;["markerStart","markerEnd"].forEach(function(g){var p=c[g],e;if(p){for(e in f){var h=f[e];if(p===h.id&&"marker"===h.tagName){var n=h;break}}n&&(p=a[g]=d.renderer.addMarker((c.id||
q())+"-"+n.id,b(n,{color:l})),a.attr(g,p.attr("id")))}})}};e(d.Chart,"afterGetContainer",function(){this.options.defs=b(v,this.options.defs||{});t(this.options.defs,function(a){"marker"===a.tagName&&!1!==a.render&&this.renderer.addMarker(a.id,a)},this)});return c});m(e,"annotations/controllable/ControllablePath.js",[e["parts/Globals.js"],e["parts/Utilities.js"],e["annotations/controllable/controllableMixin.js"],e["annotations/controllable/markerMixin.js"]],function(d,c,e,k){var b=c.extend;c=c.merge;
var t="rgba(192,192,192,"+(d.svg?.0001:.002)+")";d=function(b,c,a){this.init(b,c,a);this.collection="shapes"};d.attrsMap={dashStyle:"dashstyle",strokeWidth:"stroke-width",stroke:"stroke",fill:"fill",zIndex:"zIndex"};c(!0,d.prototype,e,{type:"path",setMarkers:k.setItemMarkers,toD:function(){var b=this.options.d;if(b)return"function"===typeof b?b.call(this):b;var c=this.points,a=c.length,d=a,e=c[0],f=d&&this.anchor(e).absolutePosition,g=0,l=2;for(b=f&&["M",f.x,f.y];++g<a&&d;)e=c[g],d=e.command||"L",
f=this.anchor(e).absolutePosition,"Z"===d?b[++l]=d:(d!==c[g-1].command&&(b[++l]=d),b[++l]=f.x,b[++l]=f.y),d=e.series.visible;return d?this.chart.renderer.crispLine(b,this.graphic.strokeWidth()):null},shouldBeDrawn:function(){return e.shouldBeDrawn.call(this)||!!this.options.d},render:function(c){var d=this.options,a=this.attrsFromOptions(d);this.graphic=this.annotation.chart.renderer.path(["M",0,0]).attr(a).add(c);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(c);this.annotation.chart.styledMode||this.tracker.attr({"stroke-linejoin":"round",stroke:t,fill:t,"stroke-width":this.graphic.strokeWidth()+2*d.snap});e.render.call(this);b(this.graphic,{markerStartSetter:k.markerStartSetter,markerEndSetter:k.markerEndSetter});this.setMarkers(this)},redraw:function(b){var c=this.toD(),a=b?"animate":"attr";c?(this.graphic[a]({d:c}),this.tracker[a]({d:c})):(this.graphic.attr({d:"M 0 -9000000000"}),this.tracker.attr({d:"M 0 -9000000000"}));
this.graphic.placed=this.tracker.placed=!!c;e.redraw.call(this,b)}});return d});m(e,"annotations/controllable/ControllableRect.js",[e["parts/Utilities.js"],e["annotations/controllable/controllableMixin.js"],e["annotations/controllable/ControllablePath.js"]],function(d,c,e){d=d.merge;var k=function(b,c,d){this.init(b,c,d);this.collection="shapes"};k.attrsMap=d(e.attrsMap,{width:"width",height:"height"});d(!0,k.prototype,c,{type:"rect",translate:c.translateShape,render:function(b){var d=this.attrsFromOptions(this.options);
this.graphic=this.annotation.chart.renderer.rect(0,-9E9,0,0).attr(d).add(b);c.render.call(this)},redraw:function(b){var d=this.anchor(this.points[0]).absolutePosition;if(d)this.graphic[b?"animate":"attr"]({x:d.x,y:d.y,width:this.options.width,height:this.options.height});else this.attr({x:0,y:-9E9});this.graphic.placed=!!d;c.redraw.call(this,b)}});return k});m(e,"annotations/controllable/ControllableCircle.js",[e["parts/Utilities.js"],e["annotations/controllable/controllableMixin.js"],e["annotations/controllable/ControllablePath.js"]],
function(d,c,e){d=d.merge;var k=function(b,c,d){this.init(b,c,d);this.collection="shapes"};k.attrsMap=d(e.attrsMap,{r:"r"});d(!0,k.prototype,c,{type:"circle",translate:c.translateShape,render:function(b){var d=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.circle(0,-9E9,0).attr(d).add(b);c.render.call(this)},redraw:function(b){var d=this.anchor(this.points[0]).absolutePosition;if(d)this.graphic[b?"animate":"attr"]({x:d.x,y:d.y,r:this.options.r});else this.graphic.attr({x:0,
y:-9E9});this.graphic.placed=!!d;c.redraw.call(this,b)},setRadius:function(b){this.options.r=b}});return k});m(e,"annotations/controllable/ControllableLabel.js",[e["parts/Globals.js"],e["parts/Utilities.js"],e["annotations/controllable/controllableMixin.js"],e["annotations/MockPoint.js"],e["parts/Tooltip.js"]],function(d,c,e,k,b){var t=c.extend,q=c.format,B=c.isNumber,a=c.merge,h=c.pick,m=function(a,g,b){this.init(a,g,b);this.collection="labels"};m.shapesWithoutBackground=["connector"];m.alignedPosition=
function(a,b){var c=a.align,g=a.verticalAlign,f=(b.x||0)+(a.x||0),d=(b.y||0)+(a.y||0),e,n;"right"===c?e=1:"center"===c&&(e=2);e&&(f+=(b.width-(a.width||0))/e);"bottom"===g?n=1:"middle"===g&&(n=2);n&&(d+=(b.height-(a.height||0))/n);return{x:Math.round(f),y:Math.round(d)}};m.justifiedOptions=function(a,b,c,d){var g=c.align,f=c.verticalAlign,e=b.box?0:b.padding||0,n=b.getBBox();b={align:g,verticalAlign:f,x:c.x,y:c.y,width:b.width,height:b.height};c=d.x-a.plotLeft;var l=d.y-a.plotTop;d=c+e;0>d&&("right"===
g?b.align="left":b.x=-d);d=c+n.width-e;d>a.plotWidth&&("left"===g?b.align="right":b.x=a.plotWidth-d);d=l+e;0>d&&("bottom"===f?b.verticalAlign="top":b.y=-d);d=l+n.height-e;d>a.plotHeight&&("top"===f?b.verticalAlign="bottom":b.y=a.plotHeight-d);return b};m.attrsMap={backgroundColor:"fill",borderColor:"stroke",borderWidth:"stroke-width",zIndex:"zIndex",borderRadius:"r",padding:"padding"};a(!0,m.prototype,e,{translatePoint:function(b,a){e.translatePoint.call(this,b,a,0)},translate:function(b,a){var c=
this.annotation.chart,d=this.annotation.userOptions,g=c.annotations.indexOf(this.annotation);g=c.options.annotations[g];c.inverted&&(c=b,b=a,a=c);this.options.x+=b;this.options.y+=a;g[this.collection][this.index].x=this.options.x;g[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},render:function(b){var a=this.options,c=this.attrsFromOptions(a),d=a.style;this.graphic=this.annotation.chart.renderer.label("",
0,-9999,a.shape,null,null,a.useHTML,null,"annotation-label").attr(c).add(b);this.annotation.chart.styledMode||("contrast"===d.color&&(d.color=this.annotation.chart.renderer.getContrast(-1<m.shapesWithoutBackground.indexOf(a.shape)?"#FFFFFF":a.backgroundColor)),this.graphic.css(a.style).shadow(a.shadow));a.className&&this.graphic.addClass(a.className);this.graphic.labelrank=a.labelrank;e.render.call(this)},redraw:function(a){var b=this.options,c=this.text||b.format||b.text,d=this.graphic,f=this.points[0];
d.attr({text:c?q(c,f.getLabelConfig(),this.annotation.chart):b.formatter.call(f,this)});b=this.anchor(f);(c=this.position(b))?(d.alignAttr=c,c.anchorX=b.absolutePosition.x,c.anchorY=b.absolutePosition.y,d[a?"animate":"attr"](c)):d.attr({x:0,y:-9999});d.placed=!!c;e.redraw.call(this,a)},anchor:function(){var b=e.anchor.apply(this,arguments),a=this.options.x||0,c=this.options.y||0;b.absolutePosition.x-=a;b.absolutePosition.y-=c;b.relativePosition.x-=a;b.relativePosition.y-=c;return b},position:function(a){var c=
this.graphic,d=this.annotation.chart,f=this.points[0],e=this.options,u=a.absolutePosition,r=a.relativePosition;if(a=f.series.visible&&k.prototype.isInsidePane.call(f)){if(e.distance)var n=b.prototype.getPosition.call({chart:d,distance:h(e.distance,16)},c.width,c.height,{plotX:r.x,plotY:r.y,negative:f.negative,ttBelow:f.ttBelow,h:r.height||r.width});else e.positioner?n=e.positioner.call(this):(f={x:u.x,y:u.y,width:0,height:0},n=m.alignedPosition(t(e,{width:c.width,height:c.height}),f),"justify"===
this.options.overflow&&(n=m.alignedPosition(m.justifiedOptions(d,c,e,n),f)));e.crop&&(e=n.x-d.plotLeft,f=n.y-d.plotTop,a=d.isInsidePlot(e,f)&&d.isInsidePlot(e+c.width,f+c.height))}return a?n:null}});d.SVGRenderer.prototype.symbols.connector=function(b,a,c,d,e){var f=e&&e.anchorX;e=e&&e.anchorY;var g=c/2;if(B(f)&&B(e)){var n=["M",f,e];var A=a-e;0>A&&(A=-d-A);A<c&&(g=f<b+c/2?A:c-A);e>a+d?n.push("L",b+g,a+d):e<a?n.push("L",b+g,a):f<b?n.push("L",b,a+d/2):f>b+c&&n.push("L",b+c,a+d/2)}return n||[]};return m});
m(e,"annotations/controllable/ControllableImage.js",[e["parts/Utilities.js"],e["annotations/controllable/controllableMixin.js"],e["annotations/controllable/ControllableLabel.js"]],function(d,c,e){d=d.merge;var k=function(b,c,d){this.init(b,c,d);this.collection="shapes"};k.attrsMap={width:"width",height:"height",zIndex:"zIndex"};d(!0,k.prototype,c,{type:"image",translate:c.translateShape,render:function(b){var d=this.attrsFromOptions(this.options),e=this.options;this.graphic=this.annotation.chart.renderer.image(e.src,
0,-9E9,e.width,e.height).attr(d).add(b);this.graphic.width=e.width;this.graphic.height=e.height;c.render.call(this)},redraw:function(b){var d=this.anchor(this.points[0]);if(d=e.prototype.position.call(this,d))this.graphic[b?"animate":"attr"]({x:d.x,y:d.y});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!d;c.redraw.call(this,b)}});return k});m(e,"annotations/annotations.src.js",[e["parts/Globals.js"],e["parts/Utilities.js"],e["annotations/controllable/controllableMixin.js"],e["annotations/controllable/ControllableRect.js"],
e["annotations/controllable/ControllableCircle.js"],e["annotations/controllable/ControllablePath.js"],e["annotations/controllable/ControllableImage.js"],e["annotations/controllable/ControllableLabel.js"],e["annotations/eventEmitterMixin.js"],e["annotations/MockPoint.js"],e["annotations/ControlPoint.js"]],function(d,c,e,k,b,m,q,v,a,h,C){var f=c.addEvent,g=c.defined,l=c.destroyObjectProperties,p=c.erase,z=c.extend,u=c.find,r=c.merge,n=c.pick,A=c.splat;c=c.wrap;var w=d.fireEvent,D=d.reduce,x=d.Chart.prototype,
y=d.Annotation=function(b,a){this.chart=b;this.points=[];this.controlPoints=[];this.coll="annotations";this.labels=[];this.shapes=[];this.options=r(this.defaultOptions,a);this.userOptions=a;a=this.getLabelsAndShapesOptions(this.options,a);this.options.labels=a.labels;this.options.shapes=a.shapes;this.init(b,this.options)};r(!0,y.prototype,e,a,{nonDOMEvents:["add","afterUpdate","drag","remove"],defaultOptions:{visible:!0,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 g(this.y)?this.y:"Annotation label"},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},init:function(){this.linkPoints();this.addControlPoints();this.addShapes();this.addLabels();this.addClipPaths();this.setLabelCollector()},getLabelsAndShapesOptions:function(a,b){var c={};["labels","shapes"].forEach(function(d){a[d]&&(c[d]=A(b[d]).map(function(b,c){return r(a[d][c],b)}))});return c},addShapes:function(){(this.options.shapes||[]).forEach(function(a,b){a=this.initShape(a,b);r(!0,this.options.shapes[b],a.options)},this)},addLabels:function(){(this.options.labels||
[]).forEach(function(a,b){a=this.initLabel(a,b);r(!0,this.options.labels[b],a.options)},this)},addClipPaths:function(){this.setClipAxes();this.clipXAxis&&this.clipYAxis&&(this.clipRect=this.chart.renderer.clipRect(this.getClipBox()))},setClipAxes:function(){var a=this.chart.xAxis,b=this.chart.yAxis,c=D((this.options.labels||[]).concat(this.options.shapes||[]),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]},getClipBox:function(){return{x:this.clipXAxis.left,
y:this.clipYAxis.top,width:this.clipXAxis.width,height:this.clipYAxis.height}},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)},setOptions:function(a){this.options=r(this.defaultOptions,a)},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);e.redraw.call(this,a)},redrawItems:function(a,b){for(var c=a.length;c--;)this.redrawItem(a[c],b)},render:function(){var a=this.chart.renderer;this.graphic=a.g("annotation").attr({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.clipRect&&this.graphic.clip(this.clipRect);
this.addEvents();e.render.call(this)},setVisibility:function(a){var b=this.options;a=n(a,!b.visible);this.graphic.attr("visibility",a?"visible":"hidden");a||this.setControlPointsVisibility(!1);b.visible=a},setControlPointsVisibility:function(a){var b=function(b){b.setControlPointsVisibility(a)};e.setControlPointsVisibility.call(this,a);this.shapes.forEach(b);this.labels.forEach(b)},destroy:function(){var b=this.chart,c=function(a){a.destroy()};this.labels.forEach(c);this.shapes.forEach(c);this.clipYAxis=
this.clipXAxis=null;p(b.labelCollectors,this.labelCollector);a.destroy.call(this);e.destroy.call(this);l(this,b)},remove:function(){return this.chart.removeAnnotation(this)},update:function(a){var b=this.chart,c=this.getLabelsAndShapesOptions(this.userOptions,a),d=b.annotations.indexOf(this);a=r(!0,this.userOptions,a);a.labels=c.labels;a.shapes=c.shapes;this.destroy();this.constructor(b,a);b.options.annotations[d]=a;this.isUpdating=!0;this.redraw();this.isUpdating=!1;w(this,"afterUpdate")},initShape:function(a,
b){a=r(this.options.shapeOptions,{controlPointOptions:this.options.controlPointOptions},a);b=new y.shapesMap[a.type](this,a,b);b.itemType="shape";this.shapes.push(b);return b},initLabel:function(a,b){a=r(this.options.labelOptions,{controlPointOptions:this.options.controlPointOptions},a);b=new v(this,a,b);b.itemType="label";this.labels.push(b);return b},redrawItem:function(a,b){a.linkPoints();a.shouldBeDrawn()?(a.graphic||this.renderItem(a),a.redraw(n(b,!0)&&a.graphic.placed),a.points.length&&this.adjustVisibility(a)):
this.destroyItem(a)},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()},destroyItem:function(a){p(this[a.itemType+"s"],a);a.destroy()},renderItem:function(a){a.render("label"===a.itemType?this.labelsGroup:this.shapesGroup)}});y.shapesMap={rect:k,circle:b,path:m,image:q};y.types={};y.MockPoint=h;y.ControlPoint=C;d.extendAnnotation=function(a,b,c,d){b=b||y;r(!0,a.prototype,b.prototype,
c);a.prototype.defaultOptions=r(a.prototype.defaultOptions,d||{})};z(x,{initAnnotation:function(a){a=new (y.types[a.type]||y)(this,a);this.annotations.push(a);return a},addAnnotation:function(a,b){a=this.initAnnotation(a);this.options.annotations.push(a.options);n(b,!0)&&a.redraw();return a},removeAnnotation:function(a){var b=this.annotations,c="annotations"===a.coll?a:u(b,function(b){return b.options.id===a});c&&(w(c,"remove"),p(this.options.annotations,c.options),p(b,c),c.destroy())},drawAnnotations:function(){this.plotBoxClip.attr(this.plotBox);
this.annotations.forEach(function(a){a.redraw()})}});x.collectionsWithUpdate.push("annotations");x.collectionsWithInit.annotations=[x.addAnnotation];x.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();
f(a,"redraw",a.drawAnnotations);f(a,"destroy",function(){a.plotBoxClip.destroy();a.controlPointsGroup.destroy()})});c(d.Pointer.prototype,"onContainerMouseDown",function(a){this.chart.hasDraggedAnnotation||a.apply(this,Array.prototype.slice.call(arguments,1))})});m(e,"mixins/navigation.js",[],function(){return{initUpdate:function(d){d.navigation||(d.navigation={updates:[],update:function(c,d){this.updates.forEach(function(e){e.update.call(e.context,c,d)})}})},addUpdate:function(d,c){c.navigation||
this.initUpdate(c);c.navigation.updates.push({update:d,context:c})}}});m(e,"annotations/navigationBindings.js",[e["parts/Globals.js"],e["parts/Utilities.js"],e["mixins/navigation.js"]],function(d,c,e){function k(b){var c=b.prototype.defaultOptions.events&&b.prototype.defaultOptions.events.click;l(!0,b.prototype.defaultOptions.events,{click:function(b){var d=this,e=d.chart.navigationBindings,f=e.activeAnnotation;c&&c.click.call(d,b);f!==d?(e.deselectAnnotation(),e.activeAnnotation=d,d.setControlPointsVisibility(!0),
a(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(),a(e,"closePopup"));b.activeAnnotation=!0}})}var b=c.addEvent,m=
c.attr,q=c.extend,B=c.format,a=c.fireEvent,h=c.isArray,C=c.isFunction,f=c.isNumber,g=c.isObject,l=c.merge,p=c.objectEach,z=c.pick,u=d.doc,r=d.win;d.NavigationBindings=function(a,b){this.chart=a;this.options=b;this.eventsToUnbind=[];this.container=u.getElementsByClassName(this.options.bindingsClassName)};d.NavigationBindings.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:[]};d.NavigationBindings.annotationsNonEditable={rectangle:["crosshairX","crosshairY","label"]};q(d.NavigationBindings.prototype,{initEvents:function(){var a=this,c=a.chart,d=a.container,e=a.options;a.boundClassNames={};p(e.bindings,function(b){a.boundClassNames[b.className]=b});[].forEach.call(d,function(c){a.eventsToUnbind.push(b(c,"click",function(b){var c=a.getButtonEvents(d,b);c&&a.bindingsButtonClick(c.button,
c.events,b)}))});p(e.events||{},function(c,d){C(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,"mousemove",function(b){a.bindingsContainerMouseMove(this,b)}))},initUpdate:function(){var a=this;e.addUpdate(function(b){a.update(b)},this.chart)},bindingsButtonClick:function(b,c,d){var e=this.chart;this.selectedButtonElement&&
(a(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=b;a(this,"selectButton",{button:b});c.init&&c.init.call(this,b,d);(c.start||c.steps)&&e.renderer.boxWrapper.addClass("highcharts-draw-mode")},bindingsChartClick:function(b,c){b=this.chart;var d=this.selectedButton;b=b.renderer.boxWrapper;
var e;if(e=this.activeAnnotation&&!c.activeAnnotation&&c.target.parentNode){a:{e=c.target;var f=r.Element.prototype,g=f.matches||f.msMatchesSelector||f.webkitMatchesSelector,n=null;if(f.closest)n=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=n}e=!e}e&&(a(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]:(a(this,"deselectButton",{button:this.selectedButtonElement}),b.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]):(a(this,"deselectButton",{button:this.selectedButtonElement}),
b.removeClass("highcharts-draw-mode"),this.steps=!1,this.selectedButton=null,d.end&&d.end.call(this,c,this.currentUserDetails))))},bindingsContainerMouseMove:function(a,b){this.mouseMoveEvent&&this.mouseMoveEvent(b,this.currentUserDetails)},fieldsToOptions:function(a,b){p(a,function(a,c){var d=parseFloat(a),e=c.split("."),g=b,n=e.length-1;!f(d)||a.match(/px/g)||c.match(/format/g)||(a=d);""!==a&&"undefined"!==a&&e.forEach(function(b,c){var d=z(e[c+1],"");n===c?g[b]=a:(g[b]||(g[b]=d.match(/\d/g)?[]:
{}),g=g[b])})});return b},deselectAnnotation:function(){this.activeAnnotation&&(this.activeAnnotation.setControlPointsVisibility(!1),this.activeAnnotation=!1)},annotationToFields:function(a){function b(c,d,e,l){if(e&&-1===k.indexOf(d)&&(0<=(e.indexOf&&e.indexOf(d))||e[d]||!0===e))if(h(c))l[d]=[],c.forEach(function(a,c){g(a)?(l[d][c]={},p(a,function(a,e){b(a,e,f[d],l[d][c])})):b(a,0,f[d],l[d])});else if(g(c)){var w={};h(l)?(l.push(w),w[d]={},w=w[d]):l[d]=w;p(c,function(a,c){b(a,c,0===d?e:f[d],w)})}else"format"===
d?l[d]=[B(c,a.labels[0].points[0]).toString(),"text"]:h(l)?l.push([c,n(c)]):l[d]=[c,n(c)]}var c=a.options,e=d.NavigationBindings.annotationsEditable,f=e.nestedOptions,n=this.utils.getFieldType,l=z(c.type,c.shapes&&c.shapes[0]&&c.shapes[0].type,c.labels&&c.labels[0]&&c.labels[0].itemType,"label"),k=d.NavigationBindings.annotationsNonEditable[c.langKey]||[],u={langKey:c.langKey,type:l};p(c,function(a,d){"typeOptions"===d?(u[d]={},p(c[d],function(a,c){b(a,c,f,u[d],!0)})):b(a,d,e[l],u)});return u},getClickedClassNames:function(a,
b){var c=b.target;b=[];for(var d;c&&((d=m(c,"class"))&&(b=b.concat(d.split(" ").map(function(a){return[a,c]}))),c=c.parentNode,c!==a););return b},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},update:function(a){this.options=l(!0,this.options,a);this.removeEvents();this.initEvents()},removeEvents:function(){this.eventsToUnbind.forEach(function(a){a()})},destroy:function(){this.removeEvents()},
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]}}});d.Chart.prototype.initNavigationBindings=function(){var a=this.options;a&&a.navigation&&a.navigation.bindings&&(this.navigationBindings=new d.NavigationBindings(this,
a.navigation),this.navigationBindings.initEvents(),this.navigationBindings.initUpdate())};b(d.Chart,"load",function(){this.initNavigationBindings()});b(d.Chart,"destroy",function(){this.navigationBindings&&this.navigationBindings.destroy()});b(d.NavigationBindings,"deselectButton",function(){this.selectedButtonElement=null});b(d.Annotation,"remove",function(){this.chart.navigationBindings&&this.chart.navigationBindings.deselectAnnotation()});d.Annotation&&(k(d.Annotation),p(d.Annotation.types,function(a){k(a)}));
d.setOptions({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(l({langKey:"circle",shapes:[{type:"circle",point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,y:a.yAxis[0].value},r:5,controlPoints:[{positioner:function(a){var b=d.Annotation.MockPoint.pointToPixels(a.points[0]);
a=a.options.r;return{x:b.x+a*Math.cos(Math.PI/4)-this.graphic.width/2,y:b.y+a*Math.sin(Math.PI/4)-this.graphic.height/2}},events:{drag:function(a,b){var c=b.annotation;a=this.mouseMoveToTranslation(a);b.setRadius(Math.max(b.options.r+a.y/Math.sin(Math.PI/4),5));c.options.shapes[0]=c.userOptions.shapes[0]=b.options;b.redraw(!1)}}}]}]},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),c=this.chart.options.navigation,e=b.xAxis[0].value;b=b.yAxis[0].value;return this.chart.addAnnotation(l({langKey:"rectangle",shapes:[{type:"path",points:[{xAxis:0,yAxis:0,x:e,y:b},{xAxis:0,yAxis:0,x:e,y:b},{xAxis:0,yAxis:0,x:e,
y:b},{xAxis:0,yAxis:0,x:e,y:b}]}],controlPoints:[{positioner:function(a){a=d.Annotation.MockPoint.pointToPixels(a.shapes[0].points[2]);return{x:a.x-4,y:a.y-4}},events:{drag:function(b){var c=this.chart.pointer.getCoordinates(a),d=c.xAxis[0].value;c=c.yAxis[0].value;var e=b.options.shapes[0].points;e[1].x=d;e[2].x=d;e[2].y=c;e[3].y=c;b.options.shapes[0].points=e;b.redraw(!1)}}}]},c.annotationsOptions,c.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(l({langKey:"label",labelOptions:{format:"{y:.2f}"},labels:[{point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,y:a.yAxis[0].value},overflow:"none",crop:!0,controlPoints:[{symbol:"triangle-down",
positioner:function(a){if(!a.graphic.placed)return{x:0,y:-9E7};a=d.Annotation.MockPoint.pointToPixels(a.points[0]);return{x:a.x-this.graphic.width/2,y:a.y-this.graphic.height/2}},events:{drag:function(a,b){a=this.mouseMoveToTranslation(a);b.translatePoint(a.x,a.y);b.annotation.labels[0].options=b.options;b.redraw(!1)}}},{symbol:"square",positioner:function(a){return a.graphic.placed?{x:a.graphic.alignAttr.x-this.graphic.width/2,y:a.graphic.alignAttr.y-this.graphic.height/2}:{x:0,y:-9E7}},events:{drag:function(a,
b){a=this.mouseMoveToTranslation(a);b.translate(a.x,a.y);b.annotation.labels[0].options=b.options;b.redraw(!1)}}}]}]},b.annotationsOptions,b.bindings.labelAnnotation.annotationsOptions))}}},events:{},annotationsOptions:{}}})});m(e,"annotations/popup.js",[e["parts/Globals.js"],e["parts/Utilities.js"]],function(d,c){var e=c.addEvent,k=c.createElement,b=c.defined,m=c.isArray,q=c.isObject,v=c.isString,a=c.objectEach,h=c.pick;c=c.wrap;var C=/\d/g;c(d.Pointer.prototype,"onContainerMouseDown",function(a,
b){var c=b.target&&b.target.className;v(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=k("div",{className:"highcharts-popup"},null,a);this.lang=this.getLangpack();this.iconsURL=b;this.addCloseBtn()},addCloseBtn:function(){var a=this;var b=k("div",{className:"highcharts-popup-close"},null,this.container);b.style["background-image"]="url("+this.iconsURL+"close.svg)";
["click","touchstart"].forEach(function(c){e(b,c,function(){a.closePopup()})})},addColsContainer:function(a){var b=k("div",{className:"highcharts-popup-lhs-col"},null,a);a=k("div",{className:"highcharts-popup-rhs-col"},null,a);k("div",{className:"highcharts-popup-rhs-col-wrapper"},null,a);return{lhsCol:b,rhsCol:a}},addInput:function(a,b,c,d){var e=a.split(".");e=e[e.length-1];var f=this.lang;b="highcharts-"+b+"-"+e;b.match(C)||k("label",{innerHTML:f[e]||e,htmlFor:b},null,c);k("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,h){var f=this,g=this.closePopup,l=this.getFields;var p=k("button",{innerHTML:b},null,a);["click","touchstart"].forEach(function(a){e(p,a,function(){g.call(f);return d(l(h,c))})});return p},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 d.getOptions().lang.navigation.popup},
annotations:{addToolbar:function(a,b,c){var d=this,e=this.lang,f=this.popup.container,g=this.showForm;-1===f.className.indexOf("highcharts-annotation-toolbar")&&(f.className+=" highcharts-annotation-toolbar");f.style.top=a.plotTop+10+"px";k("span",{innerHTML:h(e[b.langKey]||b.langKey,b.shapes&&b.shapes[0].type)},null,f);var l=this.addButton(f,e.removeButton||"remove","remove",c,f);l.className+=" highcharts-annotation-remove-button";l.style["background-image"]="url("+this.iconsURL+"destroy.svg)";l=
this.addButton(f,e.editButton||"edit","edit",function(){g.call(d,"annotation-edit",a,b,c)},f);l.className+=" highcharts-annotation-edit-button";l.style["background-image"]="url("+this.iconsURL+"edit.svg)"},addForm:function(a,b,c,d){var e=this.popup.container,f=this.lang;k("h2",{innerHTML:f[b.langKey]||b.langKey,className:"highcharts-popup-main-title"},null,e);var g=k("div",{className:"highcharts-popup-lhs-col highcharts-popup-lhs-full"},null,e);var l=k("div",{className:"highcharts-popup-bottom-row"},
null,e);this.annotations.addFormFields.call(this,g,a,"",b,[],!0);this.addButton(l,d?f.addButton||"add":f.saveButton||"save",d?"add":"save",c,e)},addFormFields:function(b,c,d,e,h,u){var f=this,g=this.annotations.addFormFields,l=this.addInput,p=this.lang,z,x;a(e,function(a,e){z=""!==d?d+"."+e:e;q(a)&&(!m(a)||m(a)&&q(a[0])?(x=p[e]||e,x.match(C)||h.push([!0,x,b]),g.call(f,b,c,z,a,h,!1)):h.push([f,z,"annotation",b,a]))});u&&(h=h.sort(function(a){return a[1].match(/format/g)?-1:1}),h.forEach(function(a){!0===
a[0]?k("span",{className:"highcharts-annotation-title",innerHTML:a[1]},null,a[2]):l.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(b,c,d){var f=this,g=c.querySelectorAll(".highcharts-popup-lhs-col")[0];c=c.querySelectorAll(".highcharts-popup-rhs-col")[0];var l="edit"===d,h=l?b.series:b.options.plotOptions,n=this.indicators.addFormFields,m;var q=k("ul",{className:"highcharts-indicator-list"},null,g);var t=c.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];
a(h,function(a,c){var d=a.options;if(a.params||d&&d.params){var g=f.indicators.getNameType(a,c),p=g.type;m=k("li",{className:"highcharts-indicator-list",innerHTML:g.name},null,q);["click","touchstart"].forEach(function(c){e(m,c,function(){n.call(f,b,l?a:h[p],g.type,t);l&&a.options&&k("input",{type:"hidden",name:"highcharts-id-"+p,value:a.options.id},null,t).setAttribute("highcharts-data-series-id",a.options.id)})})}});0<q.childNodes.length&&q.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,c,d,e,h){a="highcharts-"+c+"-type-"+a;var f;k("label",{innerHTML:this.lang[c]||c,htmlFor:a},null,e);var g=k("select",{name:a,className:"highcharts-popup-field"},null,e);g.setAttribute("id","highcharts-select-"+c);d.series.forEach(function(a){f=a.options;!f.params&&f.id&&"highcharts-navigator-series"!==f.id&&k("option",{innerHTML:f.name||
f.id,value:f.id},null,g)});b(h)&&(g.value=h)},addFormFields:function(a,b,c,d){var e=b.params||b.options.params,f=this.indicators.getNameType;d.innerHTML="";k("h3",{className:"highcharts-indicator-title",innerHTML:f(b,c).name},null,d);k("input",{type:"hidden",name:"highcharts-type-"+c,value:c},null,d);this.indicators.listAllSeries.call(this,c,"series",a,d,b.linkedParent&&e.volumeSeriesID);e.volumeSeriesID&&this.indicators.listAllSeries.call(this,c,"volume",a,d,b.linkedParent&&b.linkedParent.options.id);
this.indicators.addParamInputs.call(this,a,"params",e,c,d)},addParamInputs:function(b,c,d,e,h){var f=this,g=this.indicators.addParamInputs,l=this.addInput,k;a(d,function(a,d){k=c+"."+d;q(a)?g.call(f,b,k,a,e,h):"params.volumeSeriesID"!==k&&l.call(f,k,e,h,[a,"text"])})},getAmount:function(){var b=0;a(this.series,function(a){var c=a.options;(a.params||c&&c.params)&&b++});return b}},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",e=this.lang;0===b&&(d+=" highcharts-tab-disabled");b=k("span",{innerHTML:e[a+"Button"]||a,className:d},null,c);b.setAttribute("highcharts-data-tab-type",a);return b},addContentItem:function(){return k("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,f){c=d.getAttribute("highcharts-data-tab-type");"edit"===c&&0===a||["click","touchstart"].forEach(function(a){e(d,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")}}};e(d.NavigationBindings,"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.0.4/gfx/stock-icons/"));
this.popup.showForm(a.formType,this.chart,a.options,a.onSubmit)});e(d.NavigationBindings,"closePopup",function(){this.popup&&this.popup.closePopup()})});m(e,"masters/modules/annotations.src.js",[],function(){})});
//# sourceMappingURL=annotations.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,42 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
interface Chart {
/**
* Add an annotation to the chart after render time.
*
* @param options
* The annotation options for the new, detailed annotation.
*
* @return - The newly generated annotation.
*/
addAnnotation(options: AnnotationsOptions, redraw?: boolean): Annotation;
/**
* Remove an annotation from the chart.
*
* @param idOrAnnotation
* The annotation's id or direct annotation object.
*/
removeAnnotation(idOrAnnotation: (number|string|Annotation)): void;
}
interface Point {
/**
* Indicates if this is a mock point for an annotation.
*/
mock?: boolean;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,13 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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,"parts-gantt/ArrowSymbols.js",[a["parts/Globals.js"]],function(a){a.SVGRenderer.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.SVGRenderer.prototype.symbols["arrow-half"]=function(e,b,c,d){return a.SVGRenderer.prototype.symbols.arrow(e,b,c/2,d)};a.SVGRenderer.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.SVGRenderer.prototype.symbols["arrow-filled"]=a.SVGRenderer.prototype.symbols["triangle-left"];a.SVGRenderer.prototype.symbols["triangle-left-half"]=function(e,b,c,d){return a.SVGRenderer.prototype.symbols["triangle-left"](e,
b,c/2,d)};a.SVGRenderer.prototype.symbols["arrow-filled-half"]=a.SVGRenderer.prototype.symbols["triangle-left-half"]});f(a,"masters/modules/arrow-symbols.src.js",[],function(){})});
//# sourceMappingURL=arrow-symbols.js.map

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,6BAA1B,CAAyD,CAACA,CAAA,CAAS,kBAAT,CAAD,CAAzD,CAAyF,QAAS,CAACC,CAAD,CAAI,CAyClGA,CAAAC,YAAAC,UAAAC,QAAAC,MAAA,CAAwCC,QAAS,CAACC,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAUC,CAAV,CAAa,CAC1D,MAAO,CACH,GADG;AACEH,CADF,CACKC,CADL,CACSE,CADT,CACa,CADb,CAEH,GAFG,CAEEH,CAFF,CAEME,CAFN,CAESD,CAFT,CAGH,GAHG,CAGED,CAHF,CAGKC,CAHL,CAGSE,CAHT,CAGa,CAHb,CAIH,GAJG,CAIEH,CAJF,CAIME,CAJN,CAISD,CAJT,CAIaE,CAJb,CADmD,CAoC9DT,EAAAC,YAAAC,UAAAC,QAAA,CAAgC,YAAhC,CAAA,CAAgD,QAAS,CAACG,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAUC,CAAV,CAAa,CAClE,MAAOT,EAAAC,YAAAC,UAAAC,QAAAC,MAAA,CAAsCE,CAAtC,CAAyCC,CAAzC,CAA4CC,CAA5C,CAAgD,CAAhD,CAAmDC,CAAnD,CAD2D,CA+BtET,EAAAC,YAAAC,UAAAC,QAAA,CAAgC,eAAhC,CAAA,CAAmD,QAAS,CAACG,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAUC,CAAV,CAAa,CACrE,MAAO,CACH,GADG,CACEH,CADF,CACME,CADN,CACSD,CADT,CAEH,GAFG,CAEED,CAFF,CAEKC,CAFL,CAESE,CAFT,CAEa,CAFb,CAGH,GAHG,CAGEH,CAHF,CAGME,CAHN,CAGSD,CAHT,CAGaE,CAHb,CAIH,GAJG,CAD8D,CA6BzET,EAAAC,YAAAC,UAAAC,QAAA,CAAgC,cAAhC,CAAA,CACIH,CAAAC,YAAAC,UAAAC,QAAA,CAAgC,eAAhC,CA6BJH,EAAAC,YAAAC,UAAAC,QAAA,CAAgC,oBAAhC,CAAA,CAAwD,QAAS,CAACG,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAUC,CAAV,CAAa,CAC1E,MAAOT,EAAAC,YAAAC,UAAAC,QAAA,CAAgC,eAAhC,CAAA,CAAiDG,CAAjD;AAAoDC,CAApD,CAAuDC,CAAvD,CAA2D,CAA3D,CAA8DC,CAA9D,CADmE,CAwB9ET,EAAAC,YAAAC,UAAAC,QAAA,CAAgC,mBAAhC,CAAA,CACIH,CAAAC,YAAAC,UAAAC,QAAA,CAAgC,oBAAhC,CAhM8F,CAAtG,CAmMAX,EAAA,CAAgBO,CAAhB,CAA0B,sCAA1B,CAAkE,EAAlE,CAAsE,QAAS,EAAG,EAAlF,CA1MoB,CAbvB;","sources":["arrow-symbols.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","H","SVGRenderer","prototype","symbols","arrow","H.SVGRenderer.prototype.symbols.arrow","x","y","w","h"]}

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,230 @@
/**
* @license Highcharts JS v8.0.4 (2020-03-10)
*
* 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, 'parts-gantt/ArrowSymbols.js', [_modules['parts/Globals.js']], function (H) {
/* *
*
* (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
*/
H.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
*/
H.SVGRenderer.prototype.symbols['arrow-half'] = function (x, y, w, h) {
return H.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
*/
H.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
*/
H.SVGRenderer.prototype.symbols['arrow-filled'] =
H.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
*/
H.SVGRenderer.prototype.symbols['triangle-left-half'] = function (x, y, w, h) {
return H.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
*/
H.SVGRenderer.prototype.symbols['arrow-filled-half'] =
H.SVGRenderer.prototype.symbols['triangle-left-half'];
});
_registerModule(_modules, 'masters/modules/arrow-symbols.src.js', [], function () {
});
}));

View File

@@ -0,0 +1,22 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
/**
* Initialize the canvas boost.
*/
function initCanvasBoost(): void;
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,25 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
Boost module
(c) 2010-2019 Highsoft AS
Author: 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/boost-canvas",["highcharts"],function(m){b(m);b.Highcharts=m;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function m(b,m,q,y){b.hasOwnProperty(m)||(b[m]=y.apply(null,q))}b=b?b._modules:{};m(b,"modules/boost-canvas.src.js",[b["parts/Globals.js"],b["parts/Color.js"],b["parts/Utilities.js"]],function(b,m,q){var y=m.parse,
z=q.addEvent,w=q.extend,ba=q.fireEvent,ca=q.isNumber,da=q.merge,ea=q.pick,r=q.wrap,A=b.win.document,fa=function(){},B=b.Series,k=b.seriesTypes,L;b.initCanvasBoost=function(){b.seriesTypes.heatmap&&r(b.seriesTypes.heatmap.prototype,"drawPoints",function(){var a=this.chart,c=this.getContext(),e=this.chart.inverted,b=this.xAxis,d=this.yAxis;c?(this.points.forEach(function(f){var g=f.plotY;"undefined"===typeof g||isNaN(g)||null===f.y||(g=f.shapeArgs,f=a.styledMode?f.series.colorAttribs(f):f.series.pointAttribs(f),
c.fillStyle=f.fill,e?c.fillRect(d.len-g.y+b.left,b.len-g.x+d.top,-g.height,-g.width):c.fillRect(g.x+b.left,g.y+d.top,g.width,g.height))}),this.canvasToSVG()):this.chart.showLoading("Your browser doesn't support HTML5 canvas, <br>please use a modern browser")});w(B.prototype,{getContext:function(){var a=this.chart,c=a.chartWidth,e=a.chartHeight,b=a.seriesGroup||this.group,d=this,m=function(a,d,e,c,b,f,g){a.call(this,e,d,c,b,f,g)};a.isChartSeriesBoosting()&&(d=a,b=a.seriesGroup);var g=d.ctx;d.canvas||
(d.canvas=A.createElement("canvas"),d.renderTarget=a.renderer.image("",0,0,c,e).addClass("highcharts-boost-canvas").add(b),d.ctx=g=d.canvas.getContext("2d"),a.inverted&&["moveTo","lineTo","rect","arc"].forEach(function(a){r(g,a,m)}),d.boostCopy=function(){d.renderTarget.attr({href:d.canvas.toDataURL("image/png")})},d.boostClear=function(){g.clearRect(0,0,d.canvas.width,d.canvas.height);d===this&&d.renderTarget.attr({href:""})},d.boostClipRect=a.renderer.clipRect(),d.renderTarget.clip(d.boostClipRect));
d.canvas.width!==c&&(d.canvas.width=c);d.canvas.height!==e&&(d.canvas.height=e);d.renderTarget.attr({x:0,y:0,width:c,height:e,style:"pointer-events: none",href:""});d.boostClipRect.attr(a.getBoostClipRect(d));return g},canvasToSVG:function(){this.chart.isChartSeriesBoosting()?this.boostClear&&this.boostClear():(this.boostCopy||this.chart.boostCopy)&&(this.boostCopy||this.chart.boostCopy)()},cvsLineTo:function(a,c,e){a.lineTo(c,e)},renderCanvas:function(){var a=this,c=a.options,e=a.chart,f=this.xAxis,
d=this.yAxis,k=(e.options.boost||{}).timeRendering||!1,g=0,r=a.processedXData,A=a.processedYData,M=c.data,l=f.getExtremes(),C=l.min,D=l.max;l=d.getExtremes();var B=l.min,ha=l.max,N={},E,ia=!!a.sampling,F=c.marker&&c.marker.radius,O=this.cvsDrawPoint,G=c.lineWidth?this.cvsLineTo:void 0,P=F&&1>=F?this.cvsMarkerSquare:this.cvsMarkerCircle,ja=this.cvsStrokeBatch||1E3,ka=!1!==c.enableMouseTracking,Q;l=c.threshold;var u=d.getThreshold(l),R=ca(l),S=u,la=this.fill,T=a.pointArrayMap&&"low,high"===a.pointArrayMap.join(","),
U=!!c.stacking,V=a.cropStart||0;l=e.options.loading;var ma=a.requireSorting,W,na=c.connectNulls,X=!r,H,I,v,x,J,t=U?a.data:r||M,oa=a.fillOpacity?(new m(a.color)).setOpacity(ea(c.fillOpacity,.75)).get():a.color,Y=function(){la?(n.fillStyle=oa,n.fill()):(n.strokeStyle=a.color,n.lineWidth=c.lineWidth,n.stroke())},Z=function(d,c,b,f){0===g&&(n.beginPath(),G&&(n.lineJoin="round"));e.scroller&&"highcharts-navigator-series"===a.options.className?(c+=e.scroller.top,b&&(b+=e.scroller.top)):c+=e.plotTop;d+=
e.plotLeft;W?n.moveTo(d,c):O?O(n,d,c,b,Q):G?G(n,d,c):P&&P.call(a,n,d,c,F,f);g+=1;g===ja&&(Y(),g=0);Q={clientX:d,plotY:c,yBottom:b}},pa="x"===c.findNearestPointBy,aa=this.xData||this.options.xData||this.processedXData||!1,K=function(a,c,b){J=pa?a:a+","+c;ka&&!N[J]&&(N[J]=!0,e.inverted&&(a=f.len-a,c=d.len-c),qa.push({x:aa?aa[V+b]:!1,clientX:a,plotX:a,plotY:c,i:V+b}))};this.renderTarget&&this.renderTarget.attr({href:""});(this.points||this.graph)&&this.destroyGraphics();a.plotGroup("group","series",
a.visible?"visible":"hidden",c.zIndex,e.seriesGroup);a.markerGroup=a.group;z(a,"destroy",function(){a.markerGroup=null});var qa=this.points=[];var n=this.getContext();a.buildKDTree=fa;this.boostClear&&this.boostClear();this.visible&&(99999<M.length&&(e.options.loading=da(l,{labelStyle:{backgroundColor:y("#ffffff").setOpacity(.75).get(),padding:"1em",borderRadius:"0.5em"},style:{backgroundColor:"none",opacity:1}}),q.clearTimeout(L),e.showLoading("Drawing..."),e.options.loading=l),k&&console.time("canvas rendering"),
b.eachAsync(t,function(c,b){var g=!1,m=!1,k=!1,l=!1,n="undefined"===typeof e.index,q=!0;if(!n){if(X){var p=c[0];var h=c[1];t[b+1]&&(k=t[b+1][0]);t[b-1]&&(l=t[b-1][0])}else p=c,h=A[b],t[b+1]&&(k=t[b+1]),t[b-1]&&(l=t[b-1]);k&&k>=C&&k<=D&&(g=!0);l&&l>=C&&l<=D&&(m=!0);if(T){X&&(h=c.slice(1,3));var r=h[0];h=h[1]}else U&&(p=c.x,h=c.stackY,r=h-c.y);c=null===h;ma||(q=h>=B&&h<=ha);if(!c&&(p>=C&&p<=D&&q||g||m))if(p=Math.round(f.toPixels(p,!0)),ia){if("undefined"===typeof v||p===E){T||(r=h);if("undefined"===
typeof x||h>I)I=h,x=b;if("undefined"===typeof v||r<H)H=r,v=b}p!==E&&("undefined"!==typeof v&&(h=d.toPixels(I,!0),u=d.toPixels(H,!0),Z(p,R?Math.min(h,S):h,R?Math.max(u,S):u,b),K(p,h,x),u!==h&&K(p,u,v)),v=x=void 0,E=p)}else h=Math.round(d.toPixels(h,!0)),Z(p,h,u,b),K(p,h,b);W=c&&!na;0===b%5E4&&(a.boostCopy||a.chart.boostCopy)&&(a.boostCopy||a.chart.boostCopy)()}return!n},function(){var c=e.loadingDiv,b=e.loadingShown;Y();a.canvasToSVG();k&&console.timeEnd("canvas rendering");ba(a,"renderedCanvas");
b&&(w(c.style,{transition:"opacity 250ms",opacity:0}),e.loadingShown=!1,L=setTimeout(function(){c.parentNode&&c.parentNode.removeChild(c);e.loadingDiv=e.loadingSpan=null},250));delete a.buildKDTree;a.buildKDTree()},e.renderer.forExport?Number.MAX_VALUE:void 0))}});k.scatter.prototype.cvsMarkerCircle=function(a,c,b,f){a.moveTo(c,b);a.arc(c,b,f,0,2*Math.PI,!1)};k.scatter.prototype.cvsMarkerSquare=function(a,c,b,f){a.rect(c-f,b-f,2*f,2*f)};k.scatter.prototype.fill=!0;k.bubble&&(k.bubble.prototype.cvsMarkerCircle=
function(a,c,b,f,d){a.moveTo(c,b);a.arc(c,b,this.radii&&this.radii[d],0,2*Math.PI,!1)},k.bubble.prototype.cvsStrokeBatch=1);w(k.area.prototype,{cvsDrawPoint:function(a,b,e,f,d){d&&b!==d.clientX&&(a.moveTo(d.clientX,d.yBottom),a.lineTo(d.clientX,d.plotY),a.lineTo(b,e),a.lineTo(b,f))},fill:!0,fillOpacity:!0,sampling:!0});w(k.column.prototype,{cvsDrawPoint:function(a,b,e,f){a.rect(b-1,e,1,f-e)},fill:!0,sampling:!0});b.Chart.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()})})}});m(b,"masters/modules/boost-canvas.src.js",[],function(){})});
//# sourceMappingURL=boost-canvas.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,22 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
/**
* Initialize the canvas boost.
*/
function initCanvasBoost(): void;
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,585 @@
/**
* @license Highcharts JS v8.0.4 (2020-03-10)
*
* 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, 'modules/boost-canvas.src.js', [_modules['parts/Globals.js'], _modules['parts/Color.js'], _modules['parts/Utilities.js']], function (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
});
H.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 () {
});
}));

View File

@@ -0,0 +1,55 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
interface Chart {
/**
* Returns true if the chart is in series boost mode.
*
* @param chart
* the chart to check
*
* @return true if the chart is in series boost mode
*/
isChartSeriesBoosting(chart: Chart): boolean;
}
interface Series {
/**
* If implemented in the core, parts of this can probably be shared with
* other similar methods in Highcharts.
*/
destroyGraphics(): void;
/**
* Enter boost mode and apply boost-specific properties.
*/
enterBoost(): void;
/**
* Exit from boost mode and restore non-boost properties.
*/
exitBoost(): void;
/**
* Return a full Point object based on the index. The boost module uses
* stripped point objects for performance reasons.
*
* @param boostPoint
* A stripped-down point object
*
* @return A Point object as per
* https://api.highcharts.com/highcharts#Point
*/
getPoint(boostPoint: (object|Point)): Point;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,135 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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
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(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/boost",["highcharts"],function(u){c(u);c.Highcharts=u;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function u(c,w,p,G){c.hasOwnProperty(w)||(c[w]=G.apply(null,p))}c=c?c._modules:{};u(c,"modules/boost/boostables.js",[],function(){return"area arearange column columnrange bar line scatter heatmap bubble treemap".split(" ")});
u(c,"modules/boost/boostable-map.js",[c["modules/boost/boostables.js"]],function(c){var m={};c.forEach(function(c){m[c]=1});return m});u(c,"modules/boost/wgl-shader.js",[c["parts/Globals.js"],c["parts/Utilities.js"]],function(c,w){var m=w.clamp,G=w.error,r=c.pick;return function(e){function c(){p.length&&G("[highcharts boost] shader error - "+p.join("\n"))}function v(a,d){var b=e.createShader("vertex"===d?e.VERTEX_SHADER:e.FRAGMENT_SHADER);e.shaderSource(b,a);e.compileShader(b);return e.getShaderParameter(b,
e.COMPILE_STATUS)?b:(p.push("when compiling "+d+" shader:\n"+e.getShaderInfoLog(b)),!1)}function t(){function b(a){return e.getUniformLocation(h,a)}var d=v("#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"),m=v("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(!d||!m)return h=!1,
c(),!1;h=e.createProgram();e.attachShader(h,d);e.attachShader(h,m);e.linkProgram(h);if(!e.getProgramParameter(h,e.LINK_STATUS))return p.push(e.getProgramInfoLog(h)),c(),h=!1;e.useProgram(h);e.bindAttribLocation(h,0,"aVertexPosition");g=b("uPMatrix");l=b("pSize");D=b("fillColor");A=b("isBubble");f=b("bubbleSizeAbs");a=b("bubbleSizeByArea");k=b("uSampler");N=b("skipTranslation");J=b("isCircle");L=b("isInverted");return!0}function n(a,d){e&&h&&(a=b[a]=b[a]||e.getUniformLocation(h,a),e.uniform1f(a,d))}
var b={},h,g,l,D,A,f,a,N,J,L,p=[],k;return e&&!t()?!1:{psUniform:function(){return l},pUniform:function(){return g},fillColorUniform:function(){return D},setBubbleUniforms:function(b,d,c){var g=b.options,l=Number.MAX_VALUE,k=-Number.MAX_VALUE;e&&h&&"bubble"===b.type&&(l=r(g.zMin,m(d,!1===g.displayNegative?g.zThreshold:-Number.MAX_VALUE,l)),k=r(g.zMax,Math.max(k,c)),e.uniform1i(A,1),e.uniform1i(J,1),e.uniform1i(a,"width"!==b.options.sizeBy),e.uniform1i(f,b.options.sizeByAbsoluteValue),n("bubbleZMin",
l),n("bubbleZMax",k),n("bubbleZThreshold",b.options.zThreshold),n("bubbleMinSize",b.minPxSize),n("bubbleMaxSize",b.maxPxSize))},bind:function(){e&&h&&e.useProgram(h)},program:function(){return h},create:t,setUniform:n,setPMatrix:function(a){e&&h&&e.uniformMatrix4fv(g,!1,a)},setColor:function(a){e&&h&&e.uniform4f(D,a[0]/255,a[1]/255,a[2]/255,a[3])},setPointSize:function(a){e&&h&&e.uniform1f(l,a)},setSkipTranslation:function(a){e&&h&&e.uniform1i(N,!0===a?1:0)},setTexture:function(a){e&&h&&e.uniform1i(k,
a)},setDrawAsCircle:function(a){e&&h&&e.uniform1i(J,a?1:0)},reset:function(){e&&h&&(e.uniform1i(A,0),e.uniform1i(J,0))},setInverted:function(a){e&&h&&e.uniform1i(L,a)},destroy:function(){e&&h&&(e.deleteProgram(h),h=!1)}}}});u(c,"modules/boost/wgl-vbuffer.js",[],function(){return function(c,w,p){function m(){r&&(c.deleteBuffer(r),e=r=!1);t=0;q=p||2;n=[]}var r=!1,e=!1,q=p||2,v=!1,t=0,n;return{destroy:m,bind:function(){if(!r)return!1;c.vertexAttribPointer(e,q,c.FLOAT,!1,0,0)},data:n,build:function(b,
h,g){var l;n=b||[];if(!(n&&0!==n.length||v))return m(),!1;q=g||q;r&&c.deleteBuffer(r);v||(l=new Float32Array(n));r=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,r);c.bufferData(c.ARRAY_BUFFER,v||l,c.STATIC_DRAW);e=c.getAttribLocation(w.program(),h);c.enableVertexAttribArray(e);return!0},render:function(b,e,g){var l=v?v.length:n.length;if(!r||!l)return!1;if(!b||b>l||0>b)b=0;if(!e||e>l)e=l;c.drawArrays(c[(g||"points").toUpperCase()],b/q,(e-b)/q);return!0},allocate:function(b){t=-1;v=new Float32Array(4*
b)},push:function(b,c,e,l){v&&(v[++t]=b,v[++t]=c,v[++t]=e,v[++t]=l)}}}});u(c,"modules/boost/wgl-renderer.js",[c["parts/Globals.js"],c["modules/boost/wgl-shader.js"],c["modules/boost/wgl-vbuffer.js"],c["parts/Color.js"],c["parts/Utilities.js"]],function(c,w,p,G,r){var e=G.parse,q=r.isNumber,m=r.merge,t=r.objectEach,n=c.win.document,b=c.some,h=c.pick;return function(g){function l(a){if(a.isSeriesBoosting){var b=!!a.options.stacking;var d=a.xData||a.options.xData||a.processedXData;b=(b?a.data:d||a.options.data).length;
"treemap"===a.type?b*=12:"heatmap"===a.type?b*=6:ka[a.type]&&(b*=2);return b}return 0}function D(){d.clear(d.COLOR_BUFFER_BIT|d.DEPTH_BUFFER_BIT)}function A(a,d){function c(a){a&&(d.colorData.push(a[0]),d.colorData.push(a[1]),d.colorData.push(a[2]),d.colorData.push(a[3]))}function f(a,b,d,f,e){c(e);y.usePreallocated?v.push(a,b,d?1:0,f||1):(K.push(a),K.push(b),K.push(d?1:0),K.push(f||1))}function l(){d.segments.length&&(d.segments[d.segments.length-1].to=K.length)}function k(){d.segments.length&&d.segments[d.segments.length-
1].from===K.length||(l(),d.segments.push({from:K.length}))}function g(a,b,d,e,k){c(k);f(a+d,b);c(k);f(a,b);c(k);f(a,b+e);c(k);f(a,b+e);c(k);f(a+d,b+e);c(k);f(a+d,b)}function S(a,b){y.useGPUTranslations||(d.skipTranslation=!0,a.x=w.toPixels(a.x,!0),a.y=L.toPixels(a.y,!0));b?K=[a.x,a.y,0,2].concat(K):f(a.x,a.y,0,2)}var X=a.pointArrayMap&&"low,high"===a.pointArrayMap.join(","),J=a.chart,h=a.options,N=!!h.stacking,m=h.data,q=a.xAxis.getExtremes(),n=q.min;q=q.max;var p=a.yAxis.getExtremes(),t=p.min;p=
p.max;var r=a.xData||h.xData||a.processedXData,D=a.yData||h.yData||a.processedYData,A=a.zData||h.zData||a.processedZData,L=a.yAxis,w=a.xAxis,u=a.chart.plotWidth,ia=!r||0===r.length,F=h.connectNulls,x=a.points||!1,H=!1,I=!1,O;m=N?a.data:r||m;r={x:Number.MAX_VALUE,y:0};var M={x:-Number.MAX_VALUE,y:0},R=0,W=!1,E=-1,P=!1,U=!1,ta="undefined"===typeof J.index,Q=!1,ea=!1;var B=!1;var ua=ka[a.type],fa=!1,pa=!0,qa=!0,Z=h.zones||!1,V=!1,ra=h.threshold,ha=!1;if(!(h.boostData&&0<h.boostData.length)){h.gapSize&&
(ha="value"!==h.gapUnit?h.gapSize*a.closestPointRange:h.gapSize);Z&&(b(Z,function(a){if("undefined"===typeof a.value)return V=new G(a.color),!0}),V||(V=a.pointAttribs&&a.pointAttribs().fill||a.color,V=new G(V)));J.inverted&&(u=a.chart.plotHeight);a.closestPointRangePx=Number.MAX_VALUE;k();if(x&&0<x.length)d.skipTranslation=!0,d.drawMode="triangles",x[0].node&&x[0].node.levelDynamic&&x.sort(function(a,b){if(a.node){if(a.node.levelDynamic>b.node.levelDynamic)return 1;if(a.node.levelDynamic<b.node.levelDynamic)return-1}return 0}),
x.forEach(function(b){var d=b.plotY;if("undefined"!==typeof d&&!isNaN(d)&&null!==b.y){d=b.shapeArgs;var f=J.styledMode?b.series.colorAttribs(b):f=b.series.pointAttribs(b);b=f["stroke-width"]||0;B=e(f.fill).rgba;B[0]/=255;B[1]/=255;B[2]/=255;"treemap"===a.type&&(b=b||1,O=e(f.stroke).rgba,O[0]/=255,O[1]/=255,O[2]/=255,g(d.x,d.y,d.width,d.height,O),b/=2);"heatmap"===a.type&&J.inverted&&(d.x=w.len-d.x,d.y=L.len-d.y,d.width=-d.width,d.height=-d.height);g(d.x+b,d.y+b,d.width-2*b,d.height-2*b,B)}});else{for(;E<
m.length-1;){var C=m[++E];if(ta)break;if(ia){x=C[0];var z=C[1];m[E+1]&&(U=m[E+1][0]);m[E-1]&&(P=m[E-1][0]);if(3<=C.length){var sa=C[2];C[2]>d.zMax&&(d.zMax=C[2]);C[2]<d.zMin&&(d.zMin=C[2])}}else x=C,z=D[E],m[E+1]&&(U=m[E+1]),m[E-1]&&(P=m[E-1]),A&&A.length&&(sa=A[E],A[E]>d.zMax&&(d.zMax=A[E]),A[E]<d.zMin&&(d.zMin=A[E]));if(F||null!==x&&null!==z){U&&U>=n&&U<=q&&(Q=!0);P&&P>=n&&P<=q&&(ea=!0);if(X){ia&&(z=C.slice(1,3));var aa=z[0];z=z[1]}else N&&(x=C.x,z=C.stackY,aa=z-C.y);null!==t&&"undefined"!==typeof t&&
null!==p&&"undefined"!==typeof p&&(pa=z>=t&&z<=p);x>q&&M.x<q&&(M.x=x,M.y=z);x<n&&r.x>n&&(r.x=x,r.y=z);if(null!==z||!F)if(null!==z&&(pa||Q||ea)){if((U>=n||x>=n)&&(P<=q||x<=q)&&(fa=!0),fa||Q||ea){ha&&x-P>ha&&k();Z&&(B=V.rgba,b(Z,function(a,b){b=Z[b-1];if("undefined"!==typeof a.value&&z<=a.value){if(!b||z>=b.value)B=e(a.color).rgba;return!0}}),B[0]/=255,B[1]/=255,B[2]/=255);if(!y.useGPUTranslations&&(d.skipTranslation=!0,x=w.toPixels(x,!0),z=L.toPixels(z,!0),x>u&&"points"===d.drawMode))continue;if(ua){C=
aa;if(!1===aa||"undefined"===typeof aa)C=0>z?z:0;X||N||(C=Math.max(null===ra?t:ra,t));y.useGPUTranslations||(C=L.toPixels(C,!0));f(x,C,0,0,B)}d.hasMarkers&&fa&&!1!==H&&(a.closestPointRangePx=Math.min(a.closestPointRangePx,Math.abs(x-H)));!y.useGPUTranslations&&!y.usePreallocated&&H&&1>Math.abs(x-H)&&I&&1>Math.abs(z-I)?y.debug.showSkipSummary&&++R:(h.step&&!qa&&f(x,I,0,2,B),f(x,z,0,"bubble"===a.type?sa||1:2,B),H=x,I=z,W=!0,qa=!1)}}else k()}else k()}y.debug.showSkipSummary&&console.log("skipped points:",
R);W||!1===F||"line_strip"!==a.drawMode||(r.x<Number.MAX_VALUE&&S(r,!0),M.x>-Number.MAX_VALUE&&S(M))}l()}}function f(){F=[];W.data=K=[];R=[];v&&v.destroy()}function a(a){k&&(k.setUniform("xAxisTrans",a.transA),k.setUniform("xAxisMin",a.min),k.setUniform("xAxisMinPad",a.minPixelPadding),k.setUniform("xAxisPointRange",a.pointRange),k.setUniform("xAxisLen",a.len),k.setUniform("xAxisPos",a.pos),k.setUniform("xAxisCVSCoord",!a.horiz),k.setUniform("xAxisIsLog",a.isLog),k.setUniform("xAxisReversed",!!a.reversed))}
function N(a){k&&(k.setUniform("yAxisTrans",a.transA),k.setUniform("yAxisMin",a.min),k.setUniform("yAxisMinPad",a.minPixelPadding),k.setUniform("yAxisPointRange",a.pointRange),k.setUniform("yAxisLen",a.len),k.setUniform("yAxisPos",a.pos),k.setUniform("yAxisCVSCoord",!a.horiz),k.setUniform("yAxisIsLog",a.isLog),k.setUniform("yAxisReversed",!!a.reversed))}function J(a,b){k.setUniform("hasThreshold",a);k.setUniform("translatedThreshold",b)}function L(b){if(b)u=b.chartWidth||800,H=b.chartHeight||400;
else return!1;if(!(d&&u&&H&&k))return!1;y.debug.timeRendering&&console.time("gl rendering");d.canvas.width=u;d.canvas.height=H;k.bind();d.viewport(0,0,u,H);k.setPMatrix([2/u,0,0,0,0,-(2/H),0,0,0,0,-2,0,-1,1,-1,1]);1<y.lineWidth&&!c.isMS&&d.lineWidth(y.lineWidth);v.build(W.data,"aVertexPosition",4);v.bind();k.setInverted(b.inverted);F.forEach(function(f,c){var l=f.series.options,g=l.marker;var m="undefined"!==typeof l.lineWidth?l.lineWidth:1;var n=l.threshold,r=q(n),t=f.series.yAxis.getThreshold(n);
n=h(l.marker?l.marker.enabled:null,f.series.xAxis.isRadial?!0:null,f.series.closestPointRangePx>2*((l.marker?l.marker.radius:10)||10));g=I[g&&g.symbol||f.series.symbol]||I.circle;if(!(0===f.segments.length||f.segmentslength&&f.segments[0].from===f.segments[0].to)){g.isReady&&(d.bindTexture(d.TEXTURE_2D,g.handle),k.setTexture(g.handle));b.styledMode?g=f.series.markerGroup&&f.series.markerGroup.getStyle("fill"):(g=f.series.pointAttribs&&f.series.pointAttribs().fill||f.series.color,l.colorByPoint&&(g=
f.series.chart.options.colors[c]));f.series.fillOpacity&&l.fillOpacity&&(g=(new G(g)).setOpacity(h(l.fillOpacity,1)).get());g=e(g).rgba;y.useAlpha||(g[3]=1);"lines"===f.drawMode&&y.useAlpha&&1>g[3]&&(g[3]/=10);"add"===l.boostBlending?(d.blendFunc(d.SRC_ALPHA,d.ONE),d.blendEquation(d.FUNC_ADD)):"mult"===l.boostBlending||"multiply"===l.boostBlending?d.blendFunc(d.DST_COLOR,d.ZERO):"darken"===l.boostBlending?(d.blendFunc(d.ONE,d.ONE),d.blendEquation(d.FUNC_MIN)):d.blendFuncSeparate(d.SRC_ALPHA,d.ONE_MINUS_SRC_ALPHA,
d.ONE,d.ONE_MINUS_SRC_ALPHA);k.reset();0<f.colorData.length&&(k.setUniform("hasColor",1),c=p(d,k),c.build(f.colorData,"aColor",4),c.bind());k.setColor(g);a(f.series.xAxis);N(f.series.yAxis);J(r,t);"points"===f.drawMode&&(l.marker&&l.marker.radius?k.setPointSize(2*l.marker.radius):k.setPointSize(1));k.setSkipTranslation(f.skipTranslation);"bubble"===f.series.type&&k.setBubbleUniforms(f.series,f.zMin,f.zMax);k.setDrawAsCircle(Q[f.series.type]||!1);if(0<m||"line_strip"!==f.drawMode)for(m=0;m<f.segments.length;m++)v.render(f.segments[m].from,
f.segments[m].to,f.drawMode);if(f.hasMarkers&&n)for(l.marker&&l.marker.radius?k.setPointSize(2*l.marker.radius):k.setPointSize(10),k.setDrawAsCircle(!0),m=0;m<f.segments.length;m++)v.render(f.segments[m].from,f.segments[m].to,"POINTS")}});y.debug.timeRendering&&console.timeEnd("gl rendering");g&&g();f()}function r(a){D();if(a.renderer.forExport)return L(a);M?L(a):setTimeout(function(){r(a)},1)}var k=!1,v=!1,d=!1,u=0,H=0,K=!1,R=!1,W={},M=!1,F=[],I={},ka={column:!0,columnrange:!0,bar:!0,area:!0,arearange:!0},
Q={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 b=0;y.usePreallocated&&(a.isSeriesBoosting&&(b=l(a)),v.allocate(b))},pushSeries:function(a){0<F.length&&F[F.length-1].hasMarkers&&(F[F.length-1].markerTo=R.length);y.debug.timeSeriesProcessing&&console.time("building "+
a.type+" series");F.push({segments:[],markerFrom:R.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"});A(a,F[F.length-1]);y.debug.timeSeriesProcessing&&console.timeEnd("building "+
a.type+" series")},setSize:function(a,b){u===a&&H===b||!k||(u=a,H=b,k.bind(),k.setPMatrix([2/u,0,0,0,0,-(2/H),0,0,0,0,-2,0,-1,1,-1,1]))},inited:function(){return M},setThreshold:J,init:function(a,b){function c(a,b){var f={isReady:!1,texture:n.createElement("canvas"),handle:d.createTexture()},c=f.texture.getContext("2d");I[a]=f;f.texture.width=512;f.texture.height=512;c.mozImageSmoothingEnabled=!1;c.webkitImageSmoothingEnabled=!1;c.msImageSmoothingEnabled=!1;c.imageSmoothingEnabled=!1;c.strokeStyle=
"rgba(255, 255, 255, 0)";c.fillStyle="#FFF";b(c);try{d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,f.handle),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,f.texture),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),d.bindTexture(d.TEXTURE_2D,null),f.isReady=!0}catch(Y){}}var l=0,g=["webgl",
"experimental-webgl","moz-webgl","webkit-3d"];M=!1;if(!a)return!1;for(y.debug.timeSetup&&console.time("gl setup");l<g.length&&!(d=a.getContext(g[l],{}));l++);if(d)b||f();else return!1;d.enable(d.BLEND);d.blendFunc(d.SRC_ALPHA,d.ONE_MINUS_SRC_ALPHA);d.disable(d.DEPTH_TEST);d.depthFunc(d.LESS);k=w(d);if(!k)return!1;v=p(d,k);c("circle",function(a){a.beginPath();a.arc(256,256,256,0,2*Math.PI);a.stroke();a.fill()});c("square",function(a){a.fillRect(0,0,512,512)});c("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()});c("triangle",function(a){a.beginPath();a.moveTo(0,512);a.lineTo(256,0);a.lineTo(512,512);a.lineTo(0,512);a.fill()});c("triangle-down",function(a){a.beginPath();a.moveTo(0,0);a.lineTo(256,512);a.lineTo(512,0);a.lineTo(0,0);a.fill()});M=!0;y.debug.timeSetup&&console.timeEnd("gl setup");return!0},render:r,settings:y,valid:function(){return!1!==d},clear:D,flush:f,setXAxis:a,setYAxis:N,data:K,gl:function(){return d},
allocateBuffer:function(a){var b=0;y.usePreallocated&&(a.series.forEach(function(a){a.isSeriesBoosting&&(b+=l(a))}),v.allocate(b))},destroy:function(){f();v.destroy();k.destroy();d&&(t(I,function(a){I[a].handle&&d.deleteTexture(I[a].handle)}),d.canvas.width=1,d.canvas.height=1)},setOptions:function(a){m(!0,y,a)}}}});u(c,"modules/boost/boost-attach.js",[c["parts/Globals.js"],c["modules/boost/wgl-renderer.js"],c["parts/Utilities.js"]],function(c,w,p){var m=p.error,r=c.win.document,e=r.createElement("canvas");
return function(q,p){var t=q.chartWidth,n=q.chartHeight,b=q,h=q.seriesGroup||p.group,g=r.implementation.hasFeature("www.http://w3.org/TR/SVG11/feature#Extensibility","1.1");b=q.isChartSeriesBoosting()?q:p;g=!1;b.renderTarget||(b.canvas=e,q.renderer.forExport||!g?(b.renderTarget=q.renderer.image("",0,0,t,n).addClass("highcharts-boost-canvas").add(h),b.boostClear=function(){b.renderTarget.attr({href:""})},b.boostCopy=function(){b.boostResizeTarget();b.renderTarget.attr({href:b.canvas.toDataURL("image/png")})}):
(b.renderTargetFo=q.renderer.createElement("foreignObject").add(h),b.renderTarget=r.createElement("canvas"),b.renderTargetCtx=b.renderTarget.getContext("2d"),b.renderTargetFo.element.appendChild(b.renderTarget),b.boostClear=function(){b.renderTarget.width=b.canvas.width;b.renderTarget.height=b.canvas.height},b.boostCopy=function(){b.renderTarget.width=b.canvas.width;b.renderTarget.height=b.canvas.height;b.renderTargetCtx.drawImage(b.canvas,0,0)}),b.boostResizeTarget=function(){t=q.chartWidth;n=q.chartHeight;
(b.renderTargetFo||b.renderTarget).attr({x:0,y:0,width:t,height:n}).css({pointerEvents:"none",mixedBlendMode:"normal",opacity:1});b instanceof c.Chart&&b.markerGroup.translate(q.plotLeft,q.plotTop)},b.boostClipRect=q.renderer.clipRect(),(b.renderTargetFo||b.renderTarget).clip(b.boostClipRect),b instanceof c.Chart&&(b.markerGroup=b.renderer.g().add(h),b.markerGroup.translate(p.xAxis.pos,p.yAxis.pos)));b.canvas.width=t;b.canvas.height=n;b.boostClipRect.attr(q.getBoostClipRect(b));b.boostResizeTarget();
b.boostClear();b.ogl||(b.ogl=w(function(){b.ogl.settings.debug.timeBufferCopy&&console.time("buffer copy");b.boostCopy();b.ogl.settings.debug.timeBufferCopy&&console.timeEnd("buffer copy")}),b.ogl.init(b.canvas)||m("[highcharts boost] - unable to init WebGL renderer"),b.ogl.setOptions(q.options.boost||{}),b instanceof c.Chart&&b.ogl.allocateBuffer(q));b.ogl.setSize(t,n);return b.ogl}});u(c,"modules/boost/boost-utils.js",[c["parts/Globals.js"],c["modules/boost/boostable-map.js"],c["modules/boost/boost-attach.js"]],
function(c,w,p){function m(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];var e=-Number.MAX_VALUE;b.forEach(function(b){if("undefined"!==typeof b&&null!==b&&"undefined"!==typeof b.length&&0<b.length)return e=b.length,!0});return e}function r(b,c,e){b&&c.renderTarget&&c.canvas&&!(e||c.chart).isChartSeriesBoosting()&&b.render(e||c.chart)}function e(b,c){b&&c.renderTarget&&c.canvas&&!c.chart.isChartSeriesBoosting()&&b.allocateBufferForSingleSeries(c)}function q(b,c,e,h,f,a){f=f||0;h=h||
3E3;for(var l=f+h,g=!0;g&&f<l&&f<b.length;)g=c(b[f],f),++f;g&&(f<b.length?a?q(b,c,e,h,f,a):t.requestAnimationFrame?t.requestAnimationFrame(function(){q(b,c,e,h,f)}):setTimeout(function(){q(b,c,e,h,f)}):e&&e())}function v(){var b=0,c,e=["webgl","experimental-webgl","moz-webgl","webkit-3d"],h=!1;if("undefined"!==typeof t.WebGLRenderingContext)for(c=n.createElement("canvas");b<e.length;b++)try{if(h=c.getContext(e[b]),"undefined"!==typeof h&&null!==h)return!0}catch(f){}return!1}var t=c.win,n=t.document,
b=c.pick,h={patientMax:m,boostEnabled:function(c){return b(c&&c.options&&c.options.boost&&c.options.boost.enabled,!0)},shouldForceChartSeriesBoosting:function(c){var e=0,h=0,g=b(c.options.boost&&c.options.boost.allowForce,!0);if("undefined"!==typeof c.boostForceChartBoost)return c.boostForceChartBoost;if(1<c.series.length)for(var f=0;f<c.series.length;f++){var a=c.series[f];0!==a.options.boostThreshold&&!1!==a.visible&&"heatmap"!==a.type&&(w[a.type]&&++h,m(a.processedXData,a.options.data,a.points)>=
(a.options.boostThreshold||Number.MAX_VALUE)&&++e)}c.boostForceChartBoost=g&&(h===c.series.length&&0<e||5<e);return c.boostForceChartBoost},renderIfNotSeriesBoosting:r,allocateIfNotSeriesBoosting:e,eachAsync:q,hasWebGLSupport:v,pointDrawHandler:function(b){var c=!0;this.chart.options&&this.chart.options.boost&&(c="undefined"===typeof this.chart.options.boost.enabled?!0:this.chart.options.boost.enabled);if(!c||!this.isSeriesBoosting)return b.call(this);this.chart.isBoosting=!0;if(b=p(this.chart,this))e(b,
this),b.pushSeries(this);r(b,this)}};c.hasWebGLSupport=v;return h});u(c,"modules/boost/boost-init.js",[c["parts/Globals.js"],c["parts/Utilities.js"],c["modules/boost/boost-utils.js"],c["modules/boost/boost-attach.js"]],function(c,w,p,u){var m=w.addEvent,e=w.extend,q=w.fireEvent,v=w.wrap,t=c.Series,n=c.seriesTypes,b=function(){},h=p.eachAsync,g=p.pointDrawHandler,l=p.allocateIfNotSeriesBoosting,G=p.renderIfNotSeriesBoosting,A=p.shouldForceChartSeriesBoosting,f;return function(){e(t.prototype,{renderCanvas:function(){function a(a,
b){var c=!1,f="undefined"===typeof k.index,e=!0;if(!f){if(ma){var h=a[0];var g=a[1]}else h=a,g=r[b];X?(ma&&(g=a.slice(1,3)),c=g[0],g=g[1]):ja&&(h=a.x,g=a.stackY,c=g-a.y);va||(e=g>=A&&g<=F);if(null!==g&&h>=v&&h<=w&&e)if(a=n.toPixels(h,!0),Q){if("undefined"===typeof T||a===D){X||(c=g);if("undefined"===typeof Y||g>ca)ca=g,Y=b;if("undefined"===typeof T||c<ba)ba=c,T=b}a!==D&&("undefined"!==typeof T&&(g=d.toPixels(ca,!0),S=d.toPixels(ba,!0),da(a,g,Y),S!==g&&da(a,S,T)),T=Y=void 0,D=a)}else g=Math.ceil(d.toPixels(g,
!0)),da(a,g,b)}return!f}function c(){q(e,"renderedCanvas");delete e.buildKDTree;e.buildKDTree();oa.debug.timeKDTree&&console.timeEnd("kd tree building")}var e=this,m=e.options||{},g=!1,k=e.chart,n=this.xAxis,d=this.yAxis,p=m.xData||e.processedXData,r=m.yData||e.processedYData,t=m.data;g=n.getExtremes();var v=g.min,w=g.max;g=d.getExtremes();var A=g.min,F=g.max,I={},D,Q=!!e.sampling,y=!1!==m.enableMouseTracking,S=d.getThreshold(m.threshold),X=e.pointArrayMap&&"low,high"===e.pointArrayMap.join(","),
ja=!!m.stacking,la=e.cropStart||0,va=e.requireSorting,ma=!p,ba,ca,T,Y,wa="x"===m.findNearestPointBy,na=this.xData||this.options.xData||this.processedXData||!1,da=function(a,b,c){a=Math.ceil(a);f=wa?a:a+","+b;y&&!I[f]&&(I[f]=!0,k.inverted&&(a=n.len-a,b=d.len-b),xa.push({x:na?na[la+c]:!1,clientX:a,plotX:a,plotY:b,i:la+c}))};g=u(k,e);k.isBoosting=!0;var oa=g.settings;if(this.visible){(this.points||this.graph)&&this.destroyGraphics();k.isChartSeriesBoosting()?(this.markerGroup&&this.markerGroup!==k.markerGroup&&
this.markerGroup.destroy(),this.markerGroup=k.markerGroup,this.renderTarget&&(this.renderTarget=this.renderTarget.destroy())):(this.markerGroup===k.markerGroup&&(this.markerGroup=void 0),this.markerGroup=e.plotGroup("markerGroup","markers",!0,1,k.seriesGroup));var xa=this.points=[];e.buildKDTree=b;g&&(l(g,this),g.pushSeries(e),G(g,this,k));k.renderer.forExport||(oa.debug.timeKDTree&&console.time("kd tree building"),h(ja?e.data:p||t,a,c))}}});["heatmap","treemap"].forEach(function(a){n[a]&&v(n[a].prototype,
"drawPoints",g)});n.bubble&&(delete n.bubble.prototype.buildKDTree,v(n.bubble.prototype,"markerAttribs",function(a){return this.isSeriesBoosting?!1:a.apply(this,[].slice.call(arguments,1))}));n.scatter.prototype.fill=!0;e(n.area.prototype,{fill:!0,fillOpacity:!0,sampling:!0});e(n.column.prototype,{fill:!0,sampling:!0});c.Chart.prototype.callbacks.push(function(a){m(a,"predraw",function(){a.boostForceChartBoost=void 0;a.boostForceChartBoost=A(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)});m(a,"render",function(){a.ogl&&a.isChartSeriesBoosting()&&a.ogl.render(a)})})}});u(c,"modules/boost/boost-overrides.js",[c["parts/Globals.js"],c["parts/Point.js"],c["parts/Utilities.js"],c["modules/boost/boost-utils.js"],c["modules/boost/boostables.js"],
c["modules/boost/boostable-map.js"]],function(c,w,p,u,r,e){var m=p.addEvent,v=p.error,t=p.isNumber,n=p.pick,b=p.wrap,h=u.boostEnabled,g=u.shouldForceChartSeriesBoosting;p=c.Chart;var l=c.Series,D=c.seriesTypes,A=c.getOptions().plotOptions;p.prototype.isChartSeriesBoosting=function(){return n(this.options.boost&&this.options.boost.seriesThreshold,50)<=this.series.length||g(this)};p.prototype.getBoostClipRect=function(b){var a={x:this.plotLeft,y:this.plotTop,width:this.plotWidth,height:this.plotHeight};
b===this&&this.yAxis.forEach(function(b){a.y=Math.min(b.pos,a.y);a.height=Math.max(b.pos-this.plotTop+b.len,a.height)},this);return a};l.prototype.getPoint=function(b){var a=b,c=this.xData||this.options.xData||this.processedXData||!1;!b||b instanceof this.pointClass||(a=(new this.pointClass).init(this,this.options.data[b.i],c?c[b.i]:void 0),a.category=n(this.xAxis.categories?this.xAxis.categories[a.x]:a.x,a.x),a.dist=b.dist,a.distX=b.distX,a.plotX=b.plotX,a.plotY=b.plotY,a.index=b.i,a.isInside=this.isPointInside(b));
return a};b(l.prototype,"searchPoint",function(b){return this.getPoint(b.apply(this,[].slice.call(arguments,1)))});b(w.prototype,"haloPath",function(b){var a=this.series,c=this.plotX,f=this.plotY,e=a.chart.inverted;a.isSeriesBoosting&&e&&(this.plotX=a.yAxis.len-f,this.plotY=a.xAxis.len-c);var g=b.apply(this,Array.prototype.slice.call(arguments,1));a.isSeriesBoosting&&e&&(this.plotX=c,this.plotY=f);return g});b(l.prototype,"markerAttribs",function(b,a){var c=a.plotX,f=a.plotY,e=this.chart.inverted;
this.isSeriesBoosting&&e&&(a.plotX=this.yAxis.len-f,a.plotY=this.xAxis.len-c);var g=b.apply(this,Array.prototype.slice.call(arguments,1));this.isSeriesBoosting&&e&&(a.plotX=c,a.plotY=f);return g});m(l,"destroy",function(){var b=this,a=b.chart;a.markerGroup===b.markerGroup&&(b.markerGroup=null);a.hoverPoints&&(a.hoverPoints=a.hoverPoints.filter(function(a){return a.series===b}));a.hoverPoint&&a.hoverPoint.series===b&&(a.hoverPoint=null)});b(l.prototype,"getExtremes",function(b){if(!this.isSeriesBoosting||
!this.hasExtremes||!this.hasExtremes())return b.apply(this,Array.prototype.slice.call(arguments,1))});["translate","generatePoints","drawTracker","drawPoints","render"].forEach(function(c){function a(a){var b=this.options.stacking&&("translate"===c||"generatePoints"===c);if(!this.isSeriesBoosting||b||!h(this.chart)||"heatmap"===this.type||"treemap"===this.type||!e[this.type]||0===this.options.boostThreshold)a.call(this);else if(this[c+"Canvas"])this[c+"Canvas"]()}b(l.prototype,c,a);"translate"===
c&&"column bar arearange columnrange heatmap treemap".split(" ").forEach(function(e){D[e]&&b(D[e].prototype,c,a)})});b(l.prototype,"processData",function(b){function a(a){return f.chart.isChartSeriesBoosting()||(a?a.length:0)>=(f.options.boostThreshold||Number.MAX_VALUE)}var f=this,g=this.options.data;h(this.chart)&&e[this.type]?(a(g)&&"heatmap"!==this.type&&"treemap"!==this.type&&!this.options.stacking&&this.hasExtremes&&this.hasExtremes(!0)||(b.apply(this,Array.prototype.slice.call(arguments,1)),
g=this.processedXData),(this.isSeriesBoosting=a(g))?(g=this.getFirstValidPoint(this.options.data),t(g)||c.isArray(g)||v(12,!1,this.chart),this.enterBoost()):this.exitBoost&&this.exitBoost()):b.apply(this,Array.prototype.slice.call(arguments,1))});m(l,"hide",function(){this.canvas&&this.renderTarget&&(this.ogl&&this.ogl.clear(),this.boostClear())});l.prototype.enterBoost=function(){this.alteredByBoost=[];["allowDG","directTouch","stickyTracking"].forEach(function(b){this.alteredByBoost.push({prop:b,
val:this[b],own:Object.hasOwnProperty.call(this,b)})},this);this.directTouch=this.allowDG=!1;this.stickyTracking=!0;this.labelBySeries&&(this.labelBySeries=this.labelBySeries.destroy())};l.prototype.exitBoost=function(){(this.alteredByBoost||[]).forEach(function(b){b.own?this[b.prop]=b.val:delete this[b.prop]},this);this.boostClear&&this.boostClear()};l.prototype.hasExtremes=function(b){var a=this.options,c=this.xAxis&&this.xAxis.options,e=this.yAxis&&this.yAxis.options,f=this.colorAxis&&this.colorAxis.options;
return a.data.length>(a.boostThreshold||Number.MAX_VALUE)&&t(e.min)&&t(e.max)&&(!b||t(c.min)&&t(c.max))&&(!f||t(f.min)&&t(f.max))};l.prototype.destroyGraphics=function(){var b=this,a=this.points,c,e;if(a)for(e=0;e<a.length;e+=1)(c=a[e])&&c.destroyElements&&c.destroyElements();["graph","area","tracker"].forEach(function(a){b[a]&&(b[a]=b[a].destroy())})};r.forEach(function(b){A[b]&&(A[b].boostThreshold=5E3,A[b].boostData=[],D[b].prototype.fillOpacity=!0)})});u(c,"modules/boost/named-colors.js",[c["parts/Color.js"]],
function(c){var m={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 c.names=m});u(c,"modules/boost/boost.js",[c["parts/Globals.js"],c["modules/boost/boost-utils.js"],c["modules/boost/boost-init.js"],c["parts/Utilities.js"]],function(c,
u,p,G){G=G.error;u=u.hasWebGLSupport;u()?p():"undefined"!==typeof c.initCanvasBoost?c.initCanvasBoost():G(26)});u(c,"masters/modules/boost.src.js",[],function(){})});
//# sourceMappingURL=boost.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,55 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
interface Chart {
/**
* Returns true if the chart is in series boost mode.
*
* @param chart
* the chart to check
*
* @return true if the chart is in series boost mode
*/
isChartSeriesBoosting(chart: Chart): boolean;
}
interface Series {
/**
* If implemented in the core, parts of this can probably be shared with
* other similar methods in Highcharts.
*/
destroyGraphics(): void;
/**
* Enter boost mode and apply boost-specific properties.
*/
enterBoost(): void;
/**
* Exit from boost mode and restore non-boost properties.
*/
exitBoost(): void;
/**
* Return a full Point object based on the index. The boost module uses
* stripped point objects for performance reasons.
*
* @param boostPoint
* A stripped-down point object
*
* @return A Point object as per
* https://api.highcharts.com/highcharts#Point
*/
getPoint(boostPoint: (object|Point)): Point;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
/**
* Returns the first break found where the x is larger then break.from and
* smaller then break.to.
*
* @param x
* The number which should be within a break.
*
* @param breaks
* The array of breaks to search within.
*
* @return Returns the first break found that matches, returns false if no
* break is found.
*/
function findBreakAt(x: number, breaks: Array<XAxisBreaksOptions>): (XAxisBreaksOptions|undefined);
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,18 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
(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/broken-axis",["highcharts"],function(l){e(l);e.Highcharts=l;return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){function l(e,h,u,l){e.hasOwnProperty(h)||(e[h]=l.apply(null,u))}e=e?e._modules:{};l(e,"modules/broken-axis.src.js",[e["parts/Globals.js"],e["parts/Utilities.js"]],function(e,h){var l=h.addEvent,v=h.extend,w=h.find,
r=h.fireEvent,x=h.isArray,p=h.pick,n=e.Axis;h=e.Series;var t=function(b,c){return w(c,function(c){return c.from<b&&b<c.to})};v(n.prototype,{isInBreak:function(b,c){var g=b.repeat||Infinity,f=b.from,a=b.to-b.from;c=c>=f?(c-f)%g:g-(f-c)%g;return b.inclusive?c<=a:c<a&&0!==c},isInAnyBreak:function(b,c){var g=this.options.breaks,f=g&&g.length,a;if(f){for(;f--;)if(this.isInBreak(g[f],b)){var d=!0;a||(a=p(g[f].showPoints,!this.isXAxis))}var k=d&&c?d&&!a:d}return k}});l(n,"afterInit",function(){"function"===
typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});l(n,"afterSetTickPositions",function(){if(this.isBroken){var b=this.tickPositions,c=this.tickPositions.info,g=[],f;for(f=0;f<b.length;f++)this.isInAnyBreak(b[f])||g.push(b[f]);this.tickPositions=g;this.tickPositions.info=c}});l(n,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});n.prototype.setBreaks=function(b,c){function g(b){var d=b,c;for(c=0;c<a.breakArray.length;c++){var k=a.breakArray[c];if(k.to<=b)d-=k.len;
else if(k.from>=b)break;else if(a.isInBreak(k,b)){d-=b-k.from;break}}return d}function f(b){var d;for(d=0;d<a.breakArray.length;d++){var c=a.breakArray[d];if(c.from>=b)break;else c.to<b?b+=c.len:a.isInBreak(c,b)&&(b+=c.len)}return b}var a=this,d=x(b)&&!!b.length;a.isDirty=a.isBroken!==d;a.isBroken=d;a.options.breaks=a.userOptions.breaks=b;a.forceRedraw=!0;a.series.forEach(function(a){a.isDirty=!0});d||a.val2lin!==g||(delete a.val2lin,delete a.lin2val);d&&(a.userOptions.ordinal=!1,a.val2lin=g,a.lin2val=
f,a.setExtremes=function(a,b,c,d,f){if(this.isBroken){for(var g,e=this.options.breaks;g=t(a,e);)a=g.to;for(;g=t(b,e);)b=g.from;b<a&&(b=a)}n.prototype.setExtremes.call(this,a,b,c,d,f)},a.setAxisTranslation=function(b){n.prototype.setAxisTranslation.call(this,b);this.unitLength=null;if(this.isBroken){b=a.options.breaks;var c=[],d=[],g=0,f,e=a.userMin||a.min,k=a.userMax||a.max,l=p(a.pointRangePadding,0),h;b.forEach(function(b){f=b.repeat||Infinity;a.isInBreak(b,e)&&(e+=b.to%f-e%f);a.isInBreak(b,k)&&
(k-=k%f-b.from%f)});b.forEach(function(a){m=a.from;for(f=a.repeat||Infinity;m-f>e;)m-=f;for(;m<e;)m+=f;for(h=m;h<k;h+=f)c.push({value:h,move:"in"}),c.push({value:h+(a.to-a.from),move:"out",size:a.breakSize})});c.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-b.value});var q=0;var m=e;c.forEach(function(a){q+="in"===a.move?1:-1;1===q&&"in"===a.move&&(m=a.value);0===q&&(d.push({from:m,to:a.value,len:a.value-m-(a.size||0)}),g+=a.value-m-(a.size||0))});a.breakArray=
d;a.unitLength=k-e-g+l;r(a,"afterBreaks");a.staticScale?a.transA=a.staticScale:a.unitLength&&(a.transA*=(k-a.min+l)/a.unitLength);l&&(a.minPixelPadding=a.transA*a.minPointOffset);a.min=e;a.max=k}});p(c,!0)&&this.chart.redraw()};l(h,"afterGeneratePoints",function(){var b=this.options.connectNulls,c=this.points,e=this.xAxis,f=this.yAxis;if(this.isDirty)for(var a=c.length;a--;){var d=c[a],k=!(null===d.y&&!1===b)&&(e&&e.isInAnyBreak(d.x,!0)||f&&f.isInAnyBreak(d.y,!0));d.visible=k?!1:!1!==d.options.visible}});
l(h,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,p(this.pointArrayMap,["y"]))});e.Series.prototype.drawBreaks=function(b,c){var e=this,f=e.points,a,d,k,h;b&&c.forEach(function(c){a=b.breakArray||[];d=b.isXAxis?b.min:p(e.options.threshold,b.min);f.forEach(function(e){h=p(e["stack"+c.toUpperCase()],e[c]);a.forEach(function(a){k=!1;if(d<a.from&&h>a.to||d>a.from&&h<a.from)k="pointBreak";else if(d<a.from&&h>a.from&&h<a.to||d>a.from&&h>a.to&&h<a.from)k="pointInBreak";
k&&r(b,k,{point:e,brk:a})})})})};e.Series.prototype.gappedPath=function(){var b=this.currentDataGrouping,c=b&&b.gapSize;b=this.options.gapSize;var g=this.points.slice(),f=g.length-1,a=this.yAxis,d;if(b&&0<f)for("value"!==this.options.gapUnit&&(b*=this.basePointRange),c&&c>b&&c>=this.basePointRange&&(b=c),d=void 0;f--;)d&&!1!==d.visible||(d=g[f+1]),c=g[f],!1!==d.visible&&!1!==c.visible&&(d.x-c.x>b&&(d=(c.x+d.x)/2,g.splice(f+1,0,{isNull:!0,x:d}),this.options.stacking&&(d=a.stacks[this.stackKey][d]=
new e.StackItem(a,a.options.stackLabels,!1,d,this.stack),d.total=0)),d=c);return this.getGraphPath(g)}});l(e,"masters/modules/broken-axis.src.js",[],function(){})});
//# sourceMappingURL=broken-axis.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,32 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
/**
* Returns the first break found where the x is larger then break.from and
* smaller then break.to.
*
* @param x
* The number which should be within a break.
*
* @param breaks
* The array of breaks to search within.
*
* @return Returns the first break found that matches, returns false if no
* break is found.
*/
function findBreakAt(x: number, breaks: Array<XAxisBreaksOptions>): (XAxisBreaksOptions|undefined);
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,533 @@
/**
* @license Highcharts JS v8.0.4 (2020-03-10)
*
* (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, 'modules/broken-axis.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
/* *
*
* (c) 2009-2020 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var addEvent = U.addEvent,
extend = U.extend,
find = U.find,
fireEvent = U.fireEvent,
isArray = U.isArray,
pick = U.pick;
var Axis = H.Axis,
Series = H.Series;
/**
* 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.
*/
var findBreakAt = function (x,
breaks) {
return find(breaks,
function (b) {
return b.from < x && x < b.to;
});
};
extend(Axis.prototype, {
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;
},
isInAnyBreak: function (val, testKeep) {
var breaks = this.options.breaks,
i = breaks && breaks.length,
inbrk,
keep,
ret;
if (i) {
while (i--) {
if (this.isInBreak(breaks[i], val)) {
inbrk = true;
if (!keep) {
keep = pick(breaks[i].showPoints, !this.isXAxis);
}
}
}
if (inbrk && testKeep) {
ret = inbrk && !keep;
}
else {
ret = inbrk;
}
}
return ret;
}
});
/* eslint-disable no-invalid-this */
addEvent(Axis, 'afterInit', function () {
if (typeof this.setBreaks === 'function') {
this.setBreaks(this.options.breaks, false);
}
});
addEvent(Axis, 'afterSetTickPositions', function () {
if (this.isBroken) {
var axis = this,
tickPositions = this.tickPositions,
info = this.tickPositions.info,
newPositions = [],
i;
for (i = 0; i < tickPositions.length; i++) {
if (!axis.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(Axis, 'afterSetOptions', function () {
if (this.isBroken) {
this.options.ordinal = false;
}
});
/**
* 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}
*/
Axis.prototype.setBreaks = function (breaks, redraw) {
var axis = this,
isBroken = (isArray(breaks) && !!breaks.length);
/* eslint-disable valid-jsdoc */
/**
* @private
*/
function breakVal2Lin(val) {
var nval = val,
brk,
i;
for (i = 0; i < axis.breakArray.length; i++) {
brk = axis.breakArray[i];
if (brk.to <= val) {
nval -= brk.len;
}
else if (brk.from >= val) {
break;
}
else if (axis.isInBreak(brk, val)) {
nval -= (val - brk.from);
break;
}
}
return nval;
}
/**
* @private
*/
function breakLin2Val(val) {
var nval = val,
brk,
i;
for (i = 0; i < axis.breakArray.length; i++) {
brk = axis.breakArray[i];
if (brk.from >= nval) {
break;
}
else if (brk.to < nval) {
nval += brk.len;
}
else if (axis.isInBreak(brk, nval)) {
nval += brk.len;
}
}
return nval;
}
/* eslint-enable valid-jsdoc */
axis.isDirty = axis.isBroken !== isBroken;
axis.isBroken = isBroken;
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 (!isBroken && axis.val2lin === breakVal2Lin) {
// Revert to prototype functions
delete axis.val2lin;
delete axis.lin2val;
}
if (isBroken) {
axis.userOptions.ordinal = false;
axis.val2lin = breakVal2Lin;
axis.lin2val = breakLin2Val;
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 (this.isBroken) {
var axisBreak,
breaks = this.options.breaks;
while ((axisBreak = findBreakAt(newMin, breaks))) {
newMin = axisBreak.to;
}
while ((axisBreak = 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);
this.unitLength = null;
if (this.isBroken) {
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 (axis.isInBreak(brk, min)) {
min +=
(brk.to % repeat) -
(min % repeat);
}
if (axis.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);
}
});
axis.breakArray = breakArray;
// Used with staticScale, and below, the actual axis length when
// breaks are substracted.
axis.unitLength =
max - min - length + pointRangePadding;
fireEvent(axis, 'afterBreaks');
if (axis.staticScale) {
axis.transA = axis.staticScale;
}
else if (axis.unitLength) {
axis.transA *=
(max - axis.min + pointRangePadding) /
axis.unitLength;
}
if (pointRangePadding) {
axis.minPixelPadding =
axis.transA * axis.minPointOffset;
}
axis.min = min;
axis.max = max;
}
};
}
if (pick(redraw, true)) {
this.chart.redraw();
}
};
addEvent(Series, '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.isInAnyBreak(point.x,
true) ||
yAxis && yAxis.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(Series, 'afterRender', function drawPointsWrapped() {
this.drawBreaks(this.xAxis, ['x']);
this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
});
/* eslint-enable no-invalid-this */
H.Series.prototype.drawBreaks = function (axis, keys) {
var series = this,
points = series.points,
breaks,
threshold,
eventName,
y;
if (!axis) {
return; // #5950
}
keys.forEach(function (key) {
breaks = axis.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) {
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
*/
H.Series.prototype.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 five 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 (this.options.stacking) {
stack = yAxis.stacks[this.stackKey][xRange] =
new H.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);
};
});
_registerModule(_modules, 'masters/modules/broken-axis.src.js', [], function () {
});
}));

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,15 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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,d,m){a.hasOwnProperty(b)||(a[b]=m.apply(null,d))}a=a?a._modules:{};d(a,"modules/bullet.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,b){var d=b.isNumber,m=b.merge,p=b.pick,r=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,b=a.chart,n=a.options,u=n.animationLimit||250;f.drawPoints.apply(this);a.points.forEach(function(c){var f=c.options,e=c.targetGraphic,k=c.target,
l=c.y;if(d(k)&&null!==k){var g=m(n.targetOptions,f.targetOptions);var t=g.height;var h=c.shapeArgs;var q=r(g.width,h.width);var v=a.yAxis.translate(k,!1,!0,!1,!0)-g.height/2-.5;h=a.crispCol.apply({chart:b,borderWidth:g.borderWidth,options:{crisp:n.crisp}},[h.x+h.width/2-q/2,v,q,t]);e?(e[b.pointCount<u?"animate":"attr"](h),d(l)&&null!==l?e.element.point=c:e.element.point=void 0):c.targetGraphic=e=b.renderer.rect().attr(h).add(a.group);b.styledMode||e.attr({fill:p(g.color,f.color,a.zones.length&&(c.getZone.call({series:a,
x:c.x,y:k,options:{}}).color||a.color)||void 0,c.color,a.color),stroke:p(g.borderColor,c.borderColor,a.options.borderColor),"stroke-width":g.borderWidth});d(l)&&null!==l&&(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;f.getExtremes.call(this,a);if(b&&b.length){a=this.dataMax;var d=this.dataMin;f.getExtremes.call(this,b);this.dataMax=Math.max(this.dataMax,a);this.dataMin=Math.min(this.dataMin,
d)}}},{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

View File

@@ -0,0 +1 @@
{"version":3,"file":"bullet.js.map","lineCount":14,"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,2BAAP,CAAoC,CAAC,YAAD,CAApC,CAAoD,QAAS,CAACE,CAAD,CAAa,CACtEL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAH+D,CAA1E,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,uBAA1B,CAAmD,CAACA,CAAA,CAAS,kBAAT,CAAD,CAA+BA,CAAA,CAAS,oBAAT,CAA/B,CAAnD,CAAmH,QAAS,CAACC,CAAD,CAAIC,CAAJ,CAAO,CAAA,IAU3HC,EAAWD,CAAAC,SAVgH,CAUpGC,EAAQF,CAAAE,MAV4F,CAUnFC,EAAOH,CAAAG,KAV4E,CAUpEC,EAAiBJ,CAAAI,eAAkBC;CAAAA,CAAaL,CAAAK,WAC3G,KAAIC,EAAcP,CAAAQ,YAAAC,OAAAC,UAUlBJ,EAAA,CAAW,QAAX,CAAqB,QAArB,CAkBE,CAMEK,cAAe,CAQXC,MAAO,MARI,CAcXC,OAAQ,CAdG,CAgDXC,YAAa,CAhDF,CANjB,CAwDEC,QAAS,CACLC,YAAa,sHADR,CAxDX,CAlBF,CA+EG,CACCC,cAAe,CAAC,GAAD,CAAM,QAAN,CADhB,CAECC,eAAgB,CAAC,GAAD,CAAM,GAAN,CAAW,QAAX,CAFjB,CAYCC,WAAYA,QAAS,EAAG,CAAA,IAChBC,EAAS,IADO,CACDC,EAAQD,CAAAC,MADP,CACqBC,EAAUF,CAAAE,QAD/B,CAC+CC,EAAiBD,CAAAC,eAAjBA,EAA2C,GAC9GhB,EAAAY,WAAArB,MAAA,CAA6B,IAA7B,CACAsB,EAAAI,OAAAC,QAAA,CAAsB,QAAS,CAACC,CAAD,CAAQ,CAAA,IAC/BC,EAAeD,CAAAJ,QADgB,CACUM,EAAgBF,CAAAE,cAD1B,CACgEC,EAAYH,CAAAI,OAD5E;AAC0FC,EAAWL,CAAAM,EACxI,IAAI9B,CAAA,CAAS2B,CAAT,CAAJ,EAAyC,IAAzC,GAA2BA,CAA3B,CAA+C,CAC3C,IAAAlB,EAAgBR,CAAA,CAAMmB,CAAAX,cAAN,CAA6BgB,CAAAhB,cAA7B,CAChB,KAAAE,EAASF,CAAAE,OACT,KAAAoB,EAAYP,CAAAO,UACZ,KAAArB,EAAQP,CAAA,CAAeM,CAAAC,MAAf,CAAoCqB,CAAArB,MAApC,CACR,KAAAoB,EAAIZ,CAAAc,MAAAC,UAAA,CAAuBN,CAAvB,CAAkC,CAAA,CAAlC,CAAyC,CAAA,CAAzC,CAA+C,CAAA,CAA/C,CAAsD,CAAA,CAAtD,CAAJG,CAAkErB,CAAAE,OAAlEmB,CAAyF,CAAzFA,CAA6F,EAC7FI,EAAA,CAAkBhB,CAAAiB,SAAAvC,MAAA,CAAsB,CAEpCuB,MAAOA,CAF6B,CAGpCP,YAAaH,CAAAG,YAHuB,CAIpCQ,QAAS,CACLgB,MAAOhB,CAAAgB,MADF,CAJ2B,CAAtB,CAOf,CACEL,CAAAM,EADF,CAEKN,CAAArB,MAFL,CAEuB,CAFvB,CAE2BA,CAF3B,CAEmC,CAFnC,CAGCoB,CAHD,CAICpB,CAJD,CAKCC,CALD,CAPe,CAcde,EAAJ,EAEIA,CAAA,CAAcP,CAAAmB,WAAA,CAAmBjB,CAAnB,CACV,SADU,CAEV,MAFJ,CAAA,CAEYa,CAFZ,CAIA,CAAIlC,CAAA,CAAS6B,CAAT,CAAJ,EAAuC,IAAvC,GAA0BA,CAA1B,CACIH,CAAAa,QAAAf,MADJ,CACkCA,CADlC,CAIIE,CAAAa,QAAAf,MAJJ,CAIkC,IAAK,EAV3C,EAcIA,CAAAE,cAdJ,CAc0BA,CAd1B,CAc0CP,CAAAqB,SAAAC,KAAA,EAAAC,KAAA,CAE5BR,CAF4B,CAAAS,IAAA,CAG7BzB,CAAA0B,MAH6B,CAMrCzB,EAAA0B,WAAL,EACInB,CAAAgB,KAAA,CAAmB,CACfI,KAAM5C,CAAA,CAAKO,CAAAsC,MAAL,CAA0BtB,CAAAsB,MAA1B,CAA+C7B,CAAA8B,MAAAC,OAA/C,GAAuEzB,CAAA0B,QAAAC,KAAA,CAAmB,CAC5FjC,OAAQA,CADoF;AAE5FmB,EAAGb,CAAAa,EAFyF,CAG5FP,EAAGH,CAHyF,CAI5FP,QAAS,EAJmF,CAAnB,CAAA2B,MAAvE,EAKM7B,CAAA6B,MALN,GAKwB,IAAK,EAL7B,CAKgCvB,CAAAuB,MALhC,CAK6C7B,CAAA6B,MAL7C,CADS,CAOfK,OAAQlD,CAAA,CAAKO,CAAA4C,YAAL,CAAgC7B,CAAA6B,YAAhC,CAAmDnC,CAAAE,QAAAiC,YAAnD,CAPO,CAQf,eAAgB5C,CAAAG,YARD,CAAnB,CAYAZ,EAAA,CAAS6B,CAAT,CAAJ,EAAuC,IAAvC,GAA0BA,CAA1B,GACIH,CAAAa,QAAAf,MADJ,CACkCA,CADlC,CAGAE,EAAA4B,SAAA,CAAuB9B,CAAA+B,aAAA,EAAvB,CACI,2BADJ,CACiC,CAAA,CADjC,CAxD2C,CAA/C,IA2DS7B,EAAJ,GAEDF,CAAAE,cAFC,CAEqBA,CAAA8B,QAAA,EAFrB,CA7D8B,CAAvC,CAHoB,CAZzB,CAwFCC,YAAaA,QAAS,CAACC,CAAD,CAAQ,CAAA,IACPC,EAANzC,IAAmByC,WAChCtD,EAAAoD,YAAAN,KAAA,CAA6B,IAA7B,CAAmCO,CAAnC,CACA,IAAIC,CAAJ,EAAkBA,CAAAV,OAAlB,CAAqC,CACjCW,CAAA,CAHS1C,IAGF2C,QACP,KAAAC,EAJS5C,IAIF6C,QACP1D,EAAAoD,YAAAN,KAAA,CAA6B,IAA7B,CAAmCQ,CAAnC,CALSzC,KAMT2C,QAAA,CAAiBG,IAAAC,IAAA,CANR/C,IAMiB2C,QAAT,CAAyBD,CAAzB,CANR1C,KAOT6C,QAAA,CAAiBC,IAAAE,IAAA,CAPRhD,IAOiB6C,QAAT;AAAyBD,CAAzB,CALgB,CAHX,CAxF/B,CA/EH,CAqLA,CAQIN,QAASA,QAAS,EAAG,CACb,IAAA9B,cAAJ,GACI,IAAAA,cADJ,CACyB,IAAAA,cAAA8B,QAAA,EADzB,CAGAnD,EAAA8D,WAAA3D,UAAAgD,QAAA5D,MAAA,CACW,IADX,CACiBwE,SADjB,CAJiB,CARzB,CArLA,CAwRA,GA7S+H,CAAnI,CAgTA9E,EAAA,CAAgBO,CAAhB,CAA0B,+BAA1B,CAA2D,EAA3D,CAA+D,QAAS,EAAG,EAA3E,CAvToB,CAbvB;","sources":["bullet.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","H","U","isNumber","merge","pick","relativeLength","seriesType","columnProto","seriesTypes","column","prototype","targetOptions","width","height","borderWidth","tooltip","pointFormat","pointArrayMap","parallelArrays","drawPoints","series","chart","options","animationLimit","points","forEach","point","pointOptions","targetGraphic","targetVal","target","pointVal","y","shapeArgs","yAxis","translate","targetShapeArgs","crispCol","crisp","x","pointCount","element","renderer","rect","attr","add","group","styledMode","fill","color","zones","length","getZone","call","stroke","borderColor","addClass","getClassName","destroy","getExtremes","yData","targetData","yMax","dataMax","yMin","dataMin","Math","max","min","pointClass","arguments"]}

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,358 @@
/**
* @license Highcharts JS v8.0.4 (2020-03-10)
*
* 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, 'modules/bullet.src.js', [_modules['parts/Globals.js'], _modules['parts/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
* @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;
columnProto.getExtremes.call(this, yData);
if (targetData && targetData.length) {
yMax = series.dataMax;
yMin = series.dataMin;
columnProto.getExtremes.call(this, targetData);
series.dataMax = Math.max(series.dataMax, yMax);
series.dataMin = Math.min(series.dataMin, yMin);
}
}
/* 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
* @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 () {
});
}));

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,29 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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,e,w,n){b.hasOwnProperty(e)||(b[e]=n.apply(null,w))}b=b?b._modules:{};m(b,"parts-map/ColorSeriesMixin.js",[b["parts/Globals.js"]],function(b){b.colorPointMixin={setVisible:function(b){var e=this,n=b?
"show":"hide";e.visible=e.options.visible=!!b;["graphic","dataLabel"].forEach(function(b){if(e[b])e[b][n]()})}};b.colorSeriesMixin={optionalAxis:"colorAxis",colorAxis:0,translateColors:function(){var b=this,v=this.options.nullColor,n=this.colorAxis,m=this.colorKey;(this.data.length?this.data:this.points).forEach(function(g){var e=g.getNestedProperty(m);if(e=g.options.color||(g.isNull?v:n&&"undefined"!==typeof e?n.toColor(e,g):g.color||b.color))g.color=e})}}});m(b,"parts-map/ColorAxis.js",[b["parts/Globals.js"],
b["parts/Color.js"],b["parts/Point.js"],b["parts/Legend.js"],b["mixins/legend-symbol.js"],b["parts/Utilities.js"]],function(b,e,m,n,B,g){"";var r=e.parse;e=g.addEvent;var z=g.erase,t=g.extend,v=g.isNumber,x=g.merge,q=g.pick,w=g.splat,p=b.Axis;g=b.Chart;var u=b.Series,C=b.colorPointMixin,A=b.noop;t(u.prototype,b.colorSeriesMixin);t(m.prototype,C);g.prototype.collectionsWithUpdate.push("colorAxis");g.prototype.collectionsWithInit.colorAxis=[g.prototype.addColorAxis];var y=b.ColorAxis=function(){this.init.apply(this,
arguments)};t(y.prototype,p.prototype);t(y.prototype,{defaultColorAxisOptions:{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},keepProps:["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"].concat(p.prototype.keepProps),init:function(a,c){this.coll=
"colorAxis";var h=this.buildOptions.call(a,this.defaultColorAxisOptions,c);p.prototype.init.call(this,a,h);c.dataClasses&&this.initDataClasses(c);this.initStops();this.horiz=!h.opposite;this.zoomEnabled=!1;this.defaultLegendLength=200},initDataClasses:function(a){var c=this.chart,h,d=0,l=c.options.chart.colorCount,b=this.options,f=a.dataClasses.length;this.dataClasses=h=[];this.legendItems=[];a.dataClasses.forEach(function(a,k){a=x(a);h.push(a);if(c.styledMode||!a.color)"category"===b.dataClassColor?
(c.styledMode||(k=c.options.colors,l=k.length,a.color=k[d]),a.colorIndex=d,d++,d===l&&(d=0)):a.color=r(b.minColor).tweenTo(r(b.maxColor),2>f?.5:k/(f-1))})},hasData:function(){return!(!this.tickPositions||!this.tickPositions.length)},setTickPositions:function(){if(!this.dataClasses)return p.prototype.setTickPositions.call(this)},initStops:function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];this.stops.forEach(function(a){a.color=r(a[1])})},buildOptions:function(a,
c){var h=this.options.legend,d=c.layout?"vertical"!==c.layout:"vertical"!==h.layout;return x(a,{side:d?2:1,reversed:!d},c,{opposite:!d,showEmpty:!1,title:null,visible:h.enabled&&(c?!1!==c.visible:!0)})},setOptions:function(a){p.prototype.setOptions.call(this,a);this.options.crosshair=this.options.marker},setAxisSize:function(){var a=this.legendSymbol,c=this.chart,h=c.options.legend||{},d,b;a?(this.left=h=a.attr("x"),this.top=d=a.attr("y"),this.width=b=a.attr("width"),this.height=a=a.attr("height"),
this.right=c.chartWidth-h-b,this.bottom=c.chartHeight-d-a,this.len=this.horiz?b:a,this.pos=this.horiz?h:d):this.len=(this.horiz?h.symbolWidth:h.symbolHeight)||this.defaultLegendLength},normalizedValue:function(a){this.isLog&&(a=this.val2lin(a));return 1-(this.max-a)/(this.max-this.min||1)},toColor:function(a,c){var h=this.stops,d=this.dataClasses,b;if(d)for(b=d.length;b--;){var k=d[b];var f=k.from;h=k.to;if(("undefined"===typeof f||a>=f)&&("undefined"===typeof h||a<=h)){var e=k.color;c&&(c.dataClass=
b,c.colorIndex=k.colorIndex);break}}else{a=this.normalizedValue(a);for(b=h.length;b--&&!(a>h[b][0]););f=h[b]||h[b+1];h=h[b+1]||f;a=1-(h[0]-a)/(h[0]-f[0]||1);e=f.color.tweenTo(h.color,a)}return e},getOffset:function(){var a=this.legendGroup,c=this.chart.axisOffset[this.side];a&&(this.axisParent=a,p.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=c)},setLegendColor:function(){var a=this.reversed;var c=a?1:0;a=a?
0:1;c=this.horiz?[c,0,a,0]:[0,a,0,c];this.legendColor={linearGradient:{x1:c[0],y1:c[1],x2:c[2],y2:c[3]},stops:this.stops}},drawLegendSymbol:function(a,c){var b=a.padding,d=a.options,l=this.horiz,k=q(d.symbolWidth,l?this.defaultLegendLength:12),f=q(d.symbolHeight,l?12:this.defaultLegendLength),e=q(d.labelPadding,l?16:30);d=q(d.itemDistance,10);this.setLegendColor();c.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,k,f).attr({zIndex:1}).add(c.legendGroup);this.legendItemWidth=k+b+(l?d:e);this.legendItemHeight=
f+b+(l?e:0)},setState:function(a){this.series.forEach(function(c){c.setState(a)})},visible:!0,setVisible:A,getSeriesExtremes:function(){var a=this.series,c=a.length,b;this.dataMin=Infinity;for(this.dataMax=-Infinity;c--;){var d=a[c];var l=d.colorKey=q(d.options.colorKey,d.colorKey,d.pointValKey,d.zoneAxis,"y");var k=d.pointArrayMap;var f=d[l+"Min"]&&d[l+"Max"];if(d[l+"Data"])var e=d[l+"Data"];else if(k){e=[];k=k.indexOf(l);var g=d.yData;if(0<=k&&g)for(b=0;b<g.length;b++)e.push(q(g[b][k],g[b]))}else e=
d.yData;f?(d.minColorValue=d[l+"Min"],d.maxColorValue=d[l+"Max"]):(u.prototype.getExtremes.call(d,e),d.minColorValue=d.dataMin,d.maxColorValue=d.dataMax);"undefined"!==typeof d.minColorValue&&(this.dataMin=Math.min(this.dataMin,d.minColorValue),this.dataMax=Math.max(this.dataMax,d.maxColorValue));f||u.prototype.getExtremes.call(d)}},drawCrosshair:function(a,c){var b=c&&c.plotX,d=c&&c.plotY,e=this.pos,k=this.len;if(c){var f=this.toPixels(c.getNestedProperty(c.series.colorKey));f<e?f=e-2:f>e+k&&(f=
e+k+2);c.plotX=f;c.plotY=this.len-f;p.prototype.drawCrosshair.call(this,a,c);c.plotX=b;c.plotY=d;this.cross&&!this.cross.addedToColorAxis&&this.legendGroup&&(this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup),this.cross.addedToColorAxis=!0,this.chart.styledMode||this.cross.attr({fill:this.crosshair.color}))}},getPlotLinePath:function(a){var c=a.translatedValue;return v(c)?this.horiz?["M",c-4,this.top-6,"L",c+4,this.top-6,c,this.top,"Z"]:["M",this.left,c,"L",this.left-6,c+6,this.left-
6,c-6,"Z"]:p.prototype.getPlotLinePath.apply(this,arguments)},update:function(a,c){var b=this.chart,d=b.legend,e=this.buildOptions.call(b,{},a);this.series.forEach(function(a){a.isDirtyData=!0});(a.dataClasses&&d.allItems||this.dataClasses)&&this.destroyItems();b.options[this.coll]=x(this.userOptions,e);p.prototype.update.call(this,e,c);this.legendItem&&(this.setLegendColor(),d.colorizeItem(this,!0))},destroyItems:function(){var a=this.chart;this.legendItem?a.legend.destroyItem(this):this.legendItems&&
this.legendItems.forEach(function(c){a.legend.destroyItem(c)});a.isDirtyLegend=!0},remove:function(a){this.destroyItems();p.prototype.remove.call(this,a)},getDataClassLegendSymbols:function(){var a=this,c=this.chart,b=this.legendItems,d=c.options.legend,e=d.valueDecimals,k=d.valueSuffix||"",f;b.length||this.dataClasses.forEach(function(d,h){var g=!0,l=d.from,m=d.to,n=c.numberFormatter;f="";"undefined"===typeof l?f="< ":"undefined"===typeof m&&(f="> ");"undefined"!==typeof l&&(f+=n(l,e)+k);"undefined"!==
typeof l&&"undefined"!==typeof m&&(f+=" - ");"undefined"!==typeof m&&(f+=n(m,e)+k);b.push(t({chart:c,name:f,options:{},drawLegendSymbol:B.drawRectangle,visible:!0,setState:A,isDataClass:!0,setVisible:function(){g=this.visible=!g;a.series.forEach(function(a){a.points.forEach(function(a){a.dataClass===h&&a.setVisible(g)})});c.legend.colorizeItem(this,g)}},d))});return b},beforePadding:!1,name:""});["fill","stroke"].forEach(function(a){b.Fx.prototype[a+"Setter"]=function(){this.elem.attr(a,r(this.start).tweenTo(r(this.end),
this.pos),null,!0)}});e(g,"afterGetAxes",function(){var a=this,c=a.options;this.colorAxis=[];c.colorAxis&&(c.colorAxis=w(c.colorAxis),c.colorAxis.forEach(function(c,b){c.index=b;new y(a,c)}))});e(u,"bindAxes",function(){var a=this.axisTypes;a?-1===a.indexOf("colorAxis")&&a.push("colorAxis"):this.axisTypes=["colorAxis"]});e(n,"afterGetAllItems",function(a){var c=[],b,d;(this.chart.colorAxis||[]).forEach(function(d){(b=d.options)&&b.showInLegend&&(b.dataClasses&&b.visible?c=c.concat(d.getDataClassLegendSymbols()):
b.visible&&c.push(d),d.series.forEach(function(c){if(!c.options.showInLegend||b.dataClasses)"point"===c.options.legendType?c.points.forEach(function(b){z(a.allItems,b)}):z(a.allItems,c)}))});for(d=c.length;d--;)a.allItems.unshift(c[d])});e(n,"afterColorizeItem",function(a){a.visible&&a.item.legendColor&&a.item.legendSymbol.attr({fill:a.item.legendColor})});e(n,"afterUpdate",function(){var a=this.chart.colorAxis;a&&a.forEach(function(a,b,d){a.update({},d)})});e(u,"afterTranslate",function(){(this.chart.colorAxis&&
this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()})});m(b,"masters/modules/coloraxis.src.js",[],function(){})});
//# sourceMappingURL=coloraxis.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,13 @@
/*
Highcharts Gantt JS v8.0.4 (2020-03-10)
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,c,b,d){a.hasOwnProperty(c)||(a[c]=d.apply(null,b))}a=a?a._modules:{};b(a,"parts-gantt/CurrentDateIndicator.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["parts/PlotLineOrBand.js"]],
function(a,c,b){var d=c.addEvent,e=c.merge;c=c.wrap;var f={currentDateIndicator:!0,color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:function(b,g){return a.dateFormat(g,b)},rotation:0,style:{fontSize:"10px"}}};d(a.Axis,"afterSetOptions",function(){var a=this.options,b=a.currentDateIndicator;b&&(b="object"===typeof b?e(f,b):e(f),b.value=new Date,a.plotLines||(a.plotLines=[]),a.plotLines.push(b))});d(b,"render",function(){this.label&&this.label.attr({text:this.getLabelText(this.options.label)})});
c(b.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

View File

@@ -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,kBAAT,CAAD,CAA+BA,CAAA,CAAS,oBAAT,CAA/B,CAA+DA,CAAA,CAAS,yBAAT,CAA/D,CAAjE;AAAsK,QAAS,CAACC,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAuB,CAAA,IAY9LC,EAAWF,CAAAE,SAZmL,CAYvKC,EAAQH,CAAAG,MAASC,EAAAA,CAAOJ,CAAAI,KAEnD,KAAIC,EAAgB,CAmBhBC,qBAAsB,CAAA,CAnBN,CAoBhBC,MAAO,SApBS,CAqBhBC,MAAO,CArBS,CAyBhBC,MAAO,CAUHC,OAAQ,qBAVL,CAWHC,UAAWA,QAAS,CAACC,CAAD,CAAQF,CAAR,CAAgB,CAChC,MAAOX,EAAAc,WAAA,CAAaH,CAAb,CAAqBE,CAArB,CADyB,CAXjC,CAcHE,SAAU,CAdP,CAkBHC,MAAO,CAEHC,SAAU,MAFP,CAlBJ,CAzBS,CAkDpBd,EAAA,CAnDWH,CAAAkB,KAmDX,CAAe,iBAAf,CAAkC,QAAS,EAAG,CAAA,IACtCC,EAAU,IAAAA,QAD4B,CACdC,EAAaD,CAAAZ,qBACrCa,EAAJ,GACIA,CAMA,CANmC,QAAtB,GAAA,MAAOA,EAAP,CACThB,CAAA,CAAME,CAAN,CAAqBc,CAArB,CADS,CAC0BhB,CAAA,CAAME,CAAN,CAKvC,CAJAc,CAAAP,MAIA,CAJmB,IAAIQ,IAIvB,CAHKF,CAAAG,UAGL,GAFIH,CAAAG,UAEJ,CAFwB,EAExB,EAAAH,CAAAG,UAAAC,KAAA,CAAuBH,CAAvB,CAPJ,CAF0C,CAA9C,CAYAjB,EAAA,CAASD,CAAT,CAAyB,QAAzB,CAAmC,QAAS,EAAG,CAEvC,IAAAQ,MAAJ,EACI,IAAAA,MAAAc,KAAA,CAAgB,CACZC,KAAM,IAAAC,aAAA,CAAkB,IAAAP,QAAAT,MAAlB,CADM,CAAhB,CAHuC,CAA/C,CAQAL;CAAA,CAAKH,CAAAyB,UAAL,CAA+B,cAA/B,CAA+C,QAAS,CAACC,CAAD,CAAgBC,CAAhB,CAAqC,CACzF,IAAIV,EAAU,IAAAA,QACd,OAAIA,EAAAZ,qBAAJ,EAAoCY,CAAAT,MAApC,EACuC,UADvC,GACI,MAAOS,EAAAT,MAAAE,UADX,EAEIO,CAAAN,MACO,CADS,IAAIQ,IACb,CAAAF,CAAAT,MAAAE,UAAAkB,KAAA,CACG,IADH,CACSX,CAAAN,MADT,CACwBM,CAAAT,MAAAC,OADxB,CAHX,EAMOiB,CAAAE,KAAA,CAAmB,IAAnB,CAAyBD,CAAzB,CARkF,CAA7F,CApFkM,CAAtM,CAgGArC,EAAA,CAAgBO,CAAhB,CAA0B,+CAA1B,CAA2E,EAA3E,CAA+E,QAAS,EAAG,EAA3F,CAvGoB,CAbvB;","sources":["current-date-indicator.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","H","U","PlotLineOrBand","addEvent","merge","wrap","defaultConfig","currentDateIndicator","color","width","label","format","formatter","value","dateFormat","rotation","style","fontSize","Axis","options","cdiOptions","Date","plotLines","push","attr","text","getLabelText","prototype","defaultMethod","defaultLabelOptions","call"]}

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,134 @@
/**
* @license Highcharts Gantt JS v8.0.4 (2020-03-10)
*
* 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, 'parts-gantt/CurrentDateIndicator.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js'], _modules['parts/PlotLineOrBand.js']], function (H, 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 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 H.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 () {
});
}));

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,16 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
Highcharts cylinder module
(c) 2010-2019 Kacper Madej
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/cylinder",["highcharts","highcharts/highcharts-3d"],function(f){c(f);c.Highcharts=f;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function f(c,h,d,f){c.hasOwnProperty(h)||(c[h]=f.apply(null,d))}c=c?c._modules:{};f(c,"modules/cylinder.src.js",[c["parts/Globals.js"],c["parts/Color.js"],c["parts/Utilities.js"]],function(c,
f,d){var h=f.parse;f=d.merge;var t=d.pick,l=d.seriesType,u=c.charts,v=c.deg2rad,w=c.perspective;d=c.Renderer.prototype;var x=d.cuboidPath;l("cylinder","column",{},{},{shapeType:"cylinder",hasNewShapeType:c.seriesTypes.column.prototype.pointClass.prototype.hasNewShapeType});c=f(d.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}});d.elements3d.cylinder=c;d.cylinder=function(a){return this.element3d("cylinder",a)};d.cylinderPath=function(a){var b=u[this.chartIndex],e=x.call(this,a),c=!e.isTop,p=!e.isFront,d=this.getCylinderEnd(b,a);a=this.getCylinderEnd(b,a,!0);return{front:this.getCylinderFront(d,a),back:this.getCylinderBack(d,a),top:d,bottom:a,zIndexes:{top:c?3:0,bottom:c?0:3,front:p?2:1,back:p?1:2,group:e.zIndexes.group}}};d.getCylinderFront=function(a,b){a=a.slice(0,a.simplified?9:17);a.push("L");
b.simplified?(a=a.concat(b.slice(7,9)).concat(b.slice(3,6)).concat(b.slice(0,3)),a[a.length-3]="L"):a.push(b[15],b[16],"C",b[13],b[14],b[11],b[12],b[8],b[9],"C",b[6],b[7],b[4],b[5],b[1],b[2]);a.push("Z");return a};d.getCylinderBack=function(a,b){var e=["M"];a.simplified?(e=e.concat(a.slice(7,12)),e.push("L",a[1],a[2])):e=e.concat(a.slice(15));e.push("L");b.simplified?e=e.concat(b.slice(1,3)).concat(b.slice(9,12)).concat(b.slice(6,9)):e.push(b[29],b[30],"C",b[27],b[28],b[25],b[26],b[22],b[23],"C",
b[20],b[21],b[18],b[19],b[15],b[16]);e.push("Z");return e};d.getCylinderEnd=function(a,b,e){var c=t(b.depth,b.width),d=Math.min(b.width,c)/2,f=v*(a.options.chart.options3d.beta-90+(b.alphaCorrection||0));e=b.y+(e?b.height:0);var g=.5519*d,h=b.width/2+b.x,l=c/2+b.z,k=[{x:0,y:e,z:d},{x:g,y:e,z:d},{x:d,y:e,z:g},{x:d,y:e,z:0},{x:d,y:e,z:-g},{x:g,y:e,z:-d},{x:0,y:e,z:-d},{x:-g,y:e,z:-d},{x:-d,y:e,z:-g},{x:-d,y:e,z:0},{x:-d,y:e,z:g},{x:-g,y:e,z:d},{x:0,y:e,z:d}],q=Math.cos(f),r=Math.sin(f),m,n;k.forEach(function(a,
b){m=a.x;n=a.z;k[b].x=m*q-n*r+h;k[b].z=n*q+m*r+l});a=w(k,a,!0);2.5>Math.abs(a[3].y-a[9].y)&&2.5>Math.abs(a[0].y-a[6].y)?(a=this.toLinePath([a[0],a[3],a[6],a[9]],!0),a.simplified=!0):a=this.getCurvedPath(a);return a};d.getCurvedPath=function(a){var b=["M",a[0].x,a[0].y],d=a.length-2,c;for(c=1;c<d;c+=3)b.push("C",a[c].x,a[c].y,a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y);return b}});f(c,"masters/modules/cylinder.src.js",[],function(){})});
//# sourceMappingURL=cylinder.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,383 @@
/**
* @license Highcharts JS v8.0.4 (2020-03-10)
*
* 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, 'modules/cylinder.src.js', [_modules['parts/Globals.js'], _modules['parts/Color.js'], _modules['parts/Utilities.js']], function (H, Color, 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 merge = U.merge,
pick = U.pick,
seriesType = U.seriesType;
var charts = H.charts,
deg2rad = H.deg2rad,
perspective = H.perspective,
// Work on H.Renderer instead of H.SVGRenderer for VML support.
RendererProto = H.Renderer.prototype,
cuboidPath = RendererProto.cuboidPath,
cylinderMethods;
/**
* 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
* @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
* @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,
topPath.simplified ? 9 : 17);
path.push('L');
if (bottomPath.simplified) {
path = path
.concat(bottomPath.slice(7, 9))
.concat(bottomPath.slice(3, 6))
.concat(bottomPath.slice(0, 3));
// change 'M' into 'L'
path[path.length - 3] = 'L';
}
else {
path.push(bottomPath[15], bottomPath[16], 'C', bottomPath[13], bottomPath[14], bottomPath[11], bottomPath[12], bottomPath[8], bottomPath[9], 'C', bottomPath[6], bottomPath[7], bottomPath[4], bottomPath[5], bottomPath[1], bottomPath[2]);
}
path.push('Z');
return path;
};
// Returns cylinder Back path
RendererProto.getCylinderBack = function (topPath, bottomPath) {
var path = ['M'];
if (topPath.simplified) {
path = path.concat(topPath.slice(7, 12));
// end at start
path.push('L', topPath[1], topPath[2]);
}
else {
path = path.concat(topPath.slice(15));
}
path.push('L');
if (bottomPath.simplified) {
path = path
.concat(bottomPath.slice(1, 3))
.concat(bottomPath.slice(9, 12))
.concat(bottomPath.slice(6, 9));
}
else {
path.push(bottomPath[29], bottomPath[30], 'C', bottomPath[27], bottomPath[28], bottomPath[25], bottomPath[26], bottomPath[22], bottomPath[23], 'C', bottomPath[20], bottomPath[21], bottomPath[18], bottomPath[19], bottomPath[15], bottomPath[16]);
}
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);
path.simplified = 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 () {
});
}));

View File

@@ -0,0 +1,188 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
/**
* Callback function that returns the correspondig Date object to a match.
*/
type DataDateFormatCallbackFunction = (match: Array<number>) => number;
interface AjaxSettingsObject {
/**
* The payload to send.
*/
data: (string|Dictionary<any>);
/**
* The data type expected.
*/
dataType: ("json"|"octet"|"text"|"xml");
/**
* Function to call on error.
*/
error: Function;
/**
* The headers; keyed on header name.
*/
headers: Dictionary<string>;
/**
* Function to call on success.
*/
success: Function;
/**
* The verb to use.
*/
type: ("DELETE"|"GET"|"POST"|"UPDATE");
/**
* The URL to call.
*/
url: string;
}
interface Chart {
/**
* The data parser for this chart.
*/
data?: Data;
}
/**
* Structure for alternative date formats to parse.
*/
interface DataDateFormatObject {
alternative?: string;
parser: DataDateFormatCallbackFunction;
regex: RegExp;
}
/**
* The Data class
*/
class Data {
/**
* The Data class
*/
constructor(dataOptions: DataOptions, chartOptions?: Options, chart?: Chart);
/**
* A collection of available date formats, extendable from the outside
* to support custom date formats.
*/
dateFormats: Dictionary<DataDateFormatObject>;
/**
* If a complete callback function is provided in the options, interpret
* the columns into a Highcharts options object.
*/
complete(): void;
/**
* Fetch or refetch live data
*
* @return The URLs that were tried can be found in the options
*/
fetchLiveData(): boolean;
/**
* Get the column distribution. For example, a line series takes a
* single column for Y values. A range series takes two columns for low
* and high values respectively, and an OHLC series takes four columns.
*/
getColumnDistribution(): void;
/**
* Get the parsed data in a form that we can apply directly to the
* `series.data` config. Array positions can be mapped using the
* `series.keys` option.
*
* @return Data rows
*/
getData(): (Array<Array<(number|string)>>|undefined);
/**
* Parse a single column. Set properties like .isDatetime and
* .isNumeric.
*
* @param column
* Column to parse
*
* @param col
* Column index
*/
parseColumn(column: Array<DataValueType>, col: number): void;
/**
* Parse a CSV input string
*/
parseCSV(inOptions?: DataOptions): Array<Array<DataValueType>>;
/**
* A hook for working directly on the parsed columns
*/
parsed(): (boolean|undefined);
/**
* Parse a date and return it as a number. Overridable through
* `options.parseDate`.
*/
parseDate(val: string): number;
/**
* Parse a Google spreadsheet.
*
* @return Always returns false, because it is an intermediate fetch.
*/
parseGoogleSpreadsheet(): boolean;
/**
* Parse a HTML table
*/
parseTable(): (Array<Array<DataValueType>>|undefined);
/**
* Parse numeric cells in to number types and date types in to true
* dates.
*/
parseTypes(): void;
/**
* Reorganize rows into columns.
*/
rowsToColumns(rows: Array<Array<(number|string)>>): Array<Array<(number|string)>>;
/**
* Trim a string from whitespaces.
*
* @param str
* String to trim
*
* @param inside
* Remove all spaces between numbers.
*
* @return Trimed string
*/
trim(str: string, inside?: boolean): string;
/**
* Updates the chart with new data options.
*/
update(options: DataOptions, redraw?: boolean): void;
}
/**
* Perform an Ajax call.
*
* @param attr
* The Ajax settings to use.
*
* @return Returns false, if error occured.
*/
function ajax(attr: Partial<AjaxSettingsObject>): (false|undefined);
/**
* Creates a data object to parse data for a chart.
*/
function data(dataOptions: DataOptions, chartOptions?: Options, chart?: Chart): Data;
/**
* Get a JSON resource over XHR, also supporting CORS without preflight.
*
* @param url
* The URL to load.
*
* @param success
* The success callback. For error handling, use the
* `Highcharts.ajax` function instead.
*/
function getJSON(url: string, success: Function): void;
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,40 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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(u){b(u);b.Highcharts=u;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function u(z,b,u,H){z.hasOwnProperty(b)||(z[b]=H.apply(null,u))}b=b?b._modules:{};u(b,"mixins/ajax.js",[b["parts/Globals.js"],b["parts/Utilities.js"]],function(b,y){var z=y.merge,u=y.objectEach;b.ajax=function(b){var n=
z(!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 r=new XMLHttpRequest;if(!n.url)return!1;r.open(n.type.toUpperCase(),n.url,!0);n.headers["Content-Type"]||r.setRequestHeader("Content-Type",b[n.dataType]||b.text);u(n.headers,function(b,n){r.setRequestHeader(n,b)});r.onreadystatechange=function(){if(4===r.readyState){if(200===r.status){var b=r.responseText;if("json"===
n.dataType)try{b=JSON.parse(b)}catch(E){n.error&&n.error(r,E);return}return n.success&&n.success(b)}n.error&&n.error(r,r.responseText)}};try{n.data=JSON.stringify(n.data)}catch(G){}r.send(n.data||!0)};b.getJSON=function(z,n){b.ajax({url:z,success:n,dataType:"json",headers:{"Content-Type":"text/plain"}})}});u(b,"modules/data.src.js",[b["parts/Globals.js"],b["parts/Utilities.js"]],function(b,y){var u=y.defined,z=y.extend,F=y.isNumber,n=y.objectEach,r=y.pick,G=y.splat;y=b.addEvent;var E=b.Chart,I=b.win.document,
C=b.merge,J=b.fireEvent,D=function(a,d,c){this.init(a,d,c)};z(D.prototype,{init:function(a,d,c){var e=a.decimalPoint;d&&(this.chartOptions=d);c&&(this.chart=c);"."!==e&&","!==e&&(e=void 0);this.options=a;this.columns=a.columns||this.rowsToColumns(a.rows)||[];this.firstRowAsNames=r(a.firstRowAsNames,this.firstRowAsNames,!0);this.decimalRegex=e&&new RegExp("^(-?[0-9]+)"+e+"([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()},hasURLOption:function(a){return!(!a||!(a.rowsURL||a.csvURL||a.columnsURL))},getColumnDistribution:function(){var a=this.chartOptions,d=this.options,c=[],e=function(a){return(b.seriesTypes[a||"line"].prototype.pointArrayMap||[0]).length},g=a&&a.chart&&a.chart.type,f=[],x=[],h=0;d=d&&d.seriesMapping||a&&a.series&&a.series.map(function(){return{x:0}})||
[];var k;(a&&a.series||[]).forEach(function(a){f.push(e(a.type||g))});d.forEach(function(a){c.push(a.x||0)});0===c.length&&c.push(0);d.forEach(function(d){var c=new A,t=f[h]||e(g),q=(a&&a.series||[])[h]||{},v=b.seriesTypes[q.type||g||"line"].prototype.pointArrayMap,B=v||["y"];(u(d.x)||q.isCartesian||!v)&&c.addColumnReader(d.x,"x");n(d,function(a,d){"x"!==d&&c.addColumnReader(a,d)});for(k=0;k<t;k++)c.hasReader(B[k])||c.addColumnReader(void 0,B[k]);x.push(c);h++});d=b.seriesTypes[g||"line"].prototype.pointArrayMap;
"undefined"===typeof d&&(d=["y"]);this.valueCount={global:e(g),xColumns:c,individual:f,seriesBuilders:x,globalPointArrayMap:d}},dataFound:function(){this.options.switchRowsAndColumns&&(this.columns=this.rowsToColumns(this.columns));this.getColumnDistribution();this.parseTypes();!1!==this.parsed()&&this.complete()},parseCSV:function(a){function d(a,d,c,e){function g(d){h=a[d];l=a[d-1];q=a[d+1]}function f(a){t.length<w+1&&t.push([a]);t[w][t[w].length-1]!==a&&t[w].push(a)}function b(){k>x||x>n?(++x,
p=""):(!isNaN(parseFloat(p))&&isFinite(p)?(p=parseFloat(p),f("number")):isNaN(Date.parse(p))?f("string"):(p=p.replace(/\//g,"-"),f("date")),v.length<w+1&&v.push([]),c||(v[w][d]=p),p="",++w,++x)}var m=0,h="",l="",q="",p="",x=0,w=0;if(a.trim().length&&"#"!==a.trim()[0]){for(;m<a.length;m++){g(m);if("#"===h){b();return}if('"'===h)for(g(++m);m<a.length&&('"'!==h||'"'===l||'"'===q);){if('"'!==h||'"'===h&&'"'!==l)p+=h;g(++m)}else e&&e[h]?e[h](h,p)&&b():h===B?b():p+=h}b()}}function c(a){var d=0,c=0,e=!1;
a.some(function(a,e){var g=!1,f="";if(13<e)return!0;for(var b=0;b<a.length;b++){e=a[b];var h=a[b+1];var k=a[b-1];if("#"===e)break;if('"'===e)if(g){if('"'!==k&&'"'!==h){for(;" "===h&&b<a.length;)h=a[++b];"undefined"!==typeof q[h]&&q[h]++;g=!1}}else g=!0;else"undefined"!==typeof q[e]?(f=f.trim(),isNaN(Date.parse(f))?!isNaN(f)&&isFinite(f)||q[e]++:q[e]++,f=""):f+=e;","===e&&c++;"."===e&&d++}});e=q[";"]>q[","]?";":",";f.decimalPoint||(f.decimalPoint=d>c?".":",",g.decimalRegex=new RegExp("^(-?[0-9]+)"+
f.decimalPoint+"([0-9]+)$"));return e}function e(a,d){var c=[],e=0,b=!1,h=[],k=[],m;if(!d||d>a.length)d=a.length;for(;e<d;e++)if("undefined"!==typeof a[e]&&a[e]&&a[e].length){var l=a[e].trim().replace(/\//g," ").replace(/\-/g," ").replace(/\./g," ").split(" ");c=["","",""];for(m=0;m<l.length;m++)m<c.length&&(l[m]=parseInt(l[m],10),l[m]&&(k[m]=!k[m]||k[m]<l[m]?l[m]:k[m],"undefined"!==typeof h[m]?h[m]!==l[m]&&(h[m]=!1):h[m]=l[m],31<l[m]?c[m]=100>l[m]?"YY":"YYYY":12<l[m]&&31>=l[m]?(c[m]="dd",b=!0):c[m].length||
(c[m]="mm")))}if(b){for(m=0;m<h.length;m++)!1!==h[m]?12<k[m]&&"YY"!==c[m]&&"YYYY"!==c[m]&&(c[m]="YY"):12<k[m]&&"mm"===c[m]&&(c[m]="dd");3===c.length&&"dd"===c[1]&&"dd"===c[2]&&(c[2]="YY");a=c.join("/");return(f.dateFormats||g.dateFormats)[a]?a:(J("deduceDateFailed"),"YYYY/mm/dd")}return"YYYY/mm/dd"}var g=this,f=a||this.options,b=f.csv;a="undefined"!==typeof f.startRow&&f.startRow?f.startRow:0;var h=f.endRow||Number.MAX_VALUE,k="undefined"!==typeof f.startColumn&&f.startColumn?f.startColumn:0,n=f.endColumn||
Number.MAX_VALUE,l=0,t=[],q={",":0,";":0,"\t":0};var v=this.columns=[];b&&f.beforeParse&&(b=f.beforeParse.call(this,b));if(b){b=b.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(f.lineDelimiter||"\n");if(!a||0>a)a=0;if(!h||h>=b.length)h=b.length-1;if(f.itemDelimiter)var B=f.itemDelimiter;else B=null,B=c(b);var w=0;for(l=a;l<=h;l++)"#"===b[l][0]?w++:d(b[l],l-a-w);f.columnTypes&&0!==f.columnTypes.length||!t.length||!t[0].length||"date"!==t[0][1]||f.dateFormat||(f.dateFormat=e(v[0]));this.dataFound()}return v},
parseTable:function(){var a=this.options,d=a.table,c=this.columns,e=a.startRow||0,g=a.endRow||Number.MAX_VALUE,f=a.startColumn||0,b=a.endColumn||Number.MAX_VALUE;d&&("string"===typeof d&&(d=I.getElementById(d)),[].forEach.call(d.getElementsByTagName("tr"),function(a,d){d>=e&&d<=g&&[].forEach.call(a.children,function(a,g){var h=c[g-f],k=1;if(("TD"===a.tagName||"TH"===a.tagName)&&g>=f&&g<=b)for(c[g-f]||(c[g-f]=[]),c[g-f][d-e]=a.innerHTML;d-e>=k&&void 0===h[d-e-k];)h[d-e-k]=null,k++})}),this.dataFound());
return c},fetchLiveData:function(){function a(k){function n(h,n,q){function l(){f&&c.liveDataURL===h&&(d.liveDataTimeout=setTimeout(a,x))}if(!h||0!==h.indexOf("http"))return h&&e.error&&e.error("Invalid URL"),!1;k&&(clearTimeout(d.liveDataTimeout),c.liveDataURL=h);b.ajax({url:h,dataType:q||"json",success:function(a){c&&c.series&&n(a);l()},error:function(a,d){3>++g&&l();return e.error&&e.error(d,a)}});return!0}n(h.csvURL,function(a){c.update({data:{csv:a}})},"text")||n(h.rowsURL,function(a){c.update({data:{rows:a}})})||
n(h.columnsURL,function(a){c.update({data:{columns:a}})})}var d=this,c=this.chart,e=this.options,g=0,f=e.enablePolling,x=1E3*(e.dataRefreshRate||2),h=C(e);if(!this.hasURLOption(e))return!1;1E3>x&&(x=1E3);delete e.csvURL;delete e.rowsURL;delete e.columnsURL;a(!0);return this.hasURLOption(e)},parseGoogleSpreadsheet:function(){function a(d){var g=["https://spreadsheets.google.com/feeds/cells",e,f,"public/values?alt=json"].join("/");b.ajax({url:g,dataType:"json",success:function(e){d(e);c.enablePolling&&
setTimeout(function(){a(d)},1E3*(c.dataRefreshRate||2))},error:function(a,d){return c.error&&c.error(d,a)}})}var d=this,c=this.options,e=c.googleSpreadsheetKey,g=this.chart,f=c.googleSpreadsheetWorksheet||1,x=c.startRow||0,h=c.endRow||Number.MAX_VALUE,k=c.startColumn||0,n=c.endColumn||Number.MAX_VALUE,l=1E3*(c.dataRefreshRate||2);4E3>l&&(l=4E3);e&&(delete c.googleSpreadsheetKey,a(function(a){var c=[];a=a.feed.entry;var e=(a||[]).length,f=0,b;if(!a||0===a.length)return!1;for(b=0;b<e;b++){var l=a[b];
f=Math.max(f,l.gs$cell.col)}for(b=0;b<f;b++)b>=k&&b<=n&&(c[b-k]=[]);for(b=0;b<e;b++){l=a[b];f=l.gs$cell.row-1;var t=l.gs$cell.col-1;if(t>=k&&t<=n&&f>=x&&f<=h){var p=l.gs$cell||l.content;l=null;p.numericValue?l=0<=p.$t.indexOf("/")||0<=p.$t.indexOf("-")?p.$t:0<p.$t.indexOf("%")?100*parseFloat(p.numericValue):parseFloat(p.numericValue):p.$t&&p.$t.length&&(l=p.$t);c[t-k][f-x]=l}}c.forEach(function(a){for(b=0;b<a.length;b++)"undefined"===typeof a[b]&&(a[b]=null)});g&&g.series?g.update({data:{columns:c}}):
(d.columns=c,d.dataFound())}));return!1},trim:function(a,d){"string"===typeof a&&(a=a.replace(/^\s+|\s+$/g,""),d&&/^[0-9\s]+$/.test(a)&&(a=a.replace(/\s/g,"")),this.decimalRegex&&(a=a.replace(this.decimalRegex,"$1.$2")));return a},parseTypes:function(){for(var a=this.columns,d=a.length;d--;)this.parseColumn(a[d],d)},parseColumn:function(a,d){var c=this.rawColumns,e=this.columns,g=a.length,b=this.firstRowAsNames,n=-1!==this.valueCount.xColumns.indexOf(d),h,k=[],r=this.chartOptions,l,t=(this.options.columnTypes||
[])[d];r=n&&(r&&r.xAxis&&"category"===G(r.xAxis)[0].type||"string"===t);for(c[d]||(c[d]=[]);g--;){var q=k[g]||a[g];var v=this.trim(q);var u=this.trim(q,!0);var w=parseFloat(u);"undefined"===typeof c[d][g]&&(c[d][g]=v);r||0===g&&b?a[g]=""+v:+u===w?(a[g]=w,31536E6<w&&"float"!==t?a.isDatetime=!0:a.isNumeric=!0,"undefined"!==typeof a[g+1]&&(l=w>a[g+1])):(v&&v.length&&(h=this.parseDate(q)),n&&F(h)&&"float"!==t?(k[g]=q,a[g]=h,a.isDatetime=!0,"undefined"!==typeof a[g+1]&&(q=h>a[g+1],q!==l&&"undefined"!==
typeof l&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,g=a.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):a.unsorted=!0),l=q)):(a[g]=""===v?null:v,0!==g&&(a.isDatetime||a.isNumeric)&&(a.mixed=!0)))}n&&a.mixed&&(e[d]=c[d]);if(n&&l&&this.options.sort)for(d=0;d<e.length;d++)e[d].reverse(),b&&e[d].unshift(e[d].pop())},dateFormats:{"YYYY/mm/dd":{regex:/^([0-9]{4})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{1,2})$/,parser:function(a){return Date.UTC(+a[1],a[2]-1,
+a[3])}},"dd/mm/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(a){return Date.UTC(+a[3],a[2]-1,+a[1])},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(a){return Date.UTC(+a[3],a[1]-1,+a[2])}},"dd/mm/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(a){var d=+a[3];d=d>(new Date).getFullYear()-2E3?d+1900:d+2E3;return Date.UTC(d,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 Date.UTC(+a[3]+2E3,a[1]-1,+a[2])}}},parseDate:function(a){var d=this.options.parseDate,c,e=this.options.dateFormat||this.dateFormat,b;if(d)var f=d(a);else if("string"===typeof a){if(e)(d=this.dateFormats[e])||(d=this.dateFormats["YYYY/mm/dd"]),(b=a.match(d.regex))&&(f=d.parser(b));else for(c in this.dateFormats)if(d=this.dateFormats[c],b=a.match(d.regex)){this.dateFormat=c;this.alternativeFormat=d.alternative;
f=d.parser(b);break}b||(b=Date.parse(a),"object"===typeof b&&null!==b&&b.getTime?f=b.getTime()-6E4*b.getTimezoneOffset():F(b)&&(f=b-6E4*(new Date(b)).getTimezoneOffset()))}return f},rowsToColumns:function(a){var d,c;if(a){var e=[];var b=a.length;for(d=0;d<b;d++){var f=a[d].length;for(c=0;c<f;c++)e[c]||(e[c]=[]),e[c][d]=a[d][c]}}return e},getData:function(){if(this.columns)return this.rowsToColumns(this.columns).slice(1)},parsed:function(){if(this.options.parsed)return this.options.parsed.call(this,
this.columns)},getFreeIndexes:function(a,d){var c,e=[],b=[];for(c=0;c<a;c+=1)e.push(!0);for(a=0;a<d.length;a+=1){var f=d[a].getReferencedColumnIndexes();for(c=0;c<f.length;c+=1)e[f[c]]=!1}for(c=0;c<e.length;c+=1)e[c]&&b.push(c);return b},complete:function(){var a=this.columns,d,c=this.options,b,g,f=[];if(c.complete||c.afterComplete){if(this.firstRowAsNames)for(b=0;b<a.length;b++)a[b].name=a[b].shift();var n=[];var h=this.getFreeIndexes(a.length,this.valueCount.seriesBuilders);for(b=0;b<this.valueCount.seriesBuilders.length;b++){var k=
this.valueCount.seriesBuilders[b];k.populateColumns(h)&&f.push(k)}for(;0<h.length;){k=new A;k.addColumnReader(0,"x");b=h.indexOf(0);-1!==b&&h.splice(b,1);for(b=0;b<this.valueCount.global;b++)k.addColumnReader(void 0,this.valueCount.globalPointArrayMap[b]);k.populateColumns(h)&&f.push(k)}0<f.length&&0<f[0].readers.length&&(k=a[f[0].readers[0].columnIndex],"undefined"!==typeof k&&(k.isDatetime?d="datetime":k.isNumeric||(d="category")));if("category"===d)for(b=0;b<f.length;b++)for(k=f[b],h=0;h<k.readers.length;h++)"x"===
k.readers[h].configName&&(k.readers[h].configName="name");for(b=0;b<f.length;b++){k=f[b];h=[];for(g=0;g<a[0].length;g++)h[g]=k.read(a,g);n[b]={data:h};k.name&&(n[b].name=k.name);"category"===d&&(n[b].turboThreshold=0)}a={series:n};d&&(a.xAxis={type:d},"category"===d&&(a.xAxis.uniqueNames=!1));c.complete&&c.complete(a);c.afterComplete&&c.afterComplete(a)}},update:function(a,b){var d=this.chart;a&&(a.afterComplete=function(a){a&&(a.xAxis&&d.xAxis[0]&&a.xAxis.type===d.xAxis[0].options.type&&delete a.xAxis,
d.update(a,b,!0))},C(!0,d.options.data,a),this.init(d.options.data))}});b.Data=D;b.data=function(a,b,c){return new D(a,b,c)};y(E,"init",function(a){var b=this,c=a.args[0]||{},e=a.args[1];c&&c.data&&!b.hasDataDef&&(b.hasDataDef=!0,b.data=new D(z(c.data,{afterComplete:function(a){var d;if(Object.hasOwnProperty.call(c,"series"))if("object"===typeof c.series)for(d=Math.max(c.series.length,a&&a.series?a.series.length:0);d--;){var g=c.series[d]||{};c.series[d]=C(g,a&&a.series?a.series[d]:{})}else delete c.series;
c=C(a,c);b.init(c,e)}}),c,b),a.preventDefault())});var A=function(){this.readers=[];this.pointIsArray=!0};A.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};A.prototype.read=function(a,d){var c=this.pointIsArray,e=c?[]:{};this.readers.forEach(function(f){var g=a[f.columnIndex][d];c?e.push(g):0<f.configName.indexOf(".")?
b.Point.prototype.setNestedProperty(e,g,f.configName):e[f.configName]=g});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 e};A.prototype.addColumnReader=function(a,b){this.readers.push({columnIndex:a,configName:b});"x"!==b&&"y"!==b&&"undefined"!==typeof b&&(this.pointIsArray=!1)};A.prototype.getReferencedColumnIndexes=function(){var a,b=[];for(a=0;a<this.readers.length;a+=
1){var c=this.readers[a];"undefined"!==typeof c.columnIndex&&b.push(c.columnIndex)}return b};A.prototype.hasReader=function(a){var b;for(b=0;b<this.readers.length;b+=1){var c=this.readers[b];if(c.configName===a)return!0}}});u(b,"masters/modules/data.src.js",[],function(){})});
//# sourceMappingURL=data.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,188 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
/**
* Callback function that returns the correspondig Date object to a match.
*/
type DataDateFormatCallbackFunction = (match: Array<number>) => number;
interface AjaxSettingsObject {
/**
* The payload to send.
*/
data: (string|Dictionary<any>);
/**
* The data type expected.
*/
dataType: ("json"|"octet"|"text"|"xml");
/**
* Function to call on error.
*/
error: Function;
/**
* The headers; keyed on header name.
*/
headers: Dictionary<string>;
/**
* Function to call on success.
*/
success: Function;
/**
* The verb to use.
*/
type: ("DELETE"|"GET"|"POST"|"UPDATE");
/**
* The URL to call.
*/
url: string;
}
interface Chart {
/**
* The data parser for this chart.
*/
data?: Data;
}
/**
* Structure for alternative date formats to parse.
*/
interface DataDateFormatObject {
alternative?: string;
parser: DataDateFormatCallbackFunction;
regex: RegExp;
}
/**
* The Data class
*/
class Data {
/**
* The Data class
*/
constructor(dataOptions: DataOptions, chartOptions?: Options, chart?: Chart);
/**
* A collection of available date formats, extendable from the outside
* to support custom date formats.
*/
dateFormats: Dictionary<DataDateFormatObject>;
/**
* If a complete callback function is provided in the options, interpret
* the columns into a Highcharts options object.
*/
complete(): void;
/**
* Fetch or refetch live data
*
* @return The URLs that were tried can be found in the options
*/
fetchLiveData(): boolean;
/**
* Get the column distribution. For example, a line series takes a
* single column for Y values. A range series takes two columns for low
* and high values respectively, and an OHLC series takes four columns.
*/
getColumnDistribution(): void;
/**
* Get the parsed data in a form that we can apply directly to the
* `series.data` config. Array positions can be mapped using the
* `series.keys` option.
*
* @return Data rows
*/
getData(): (Array<Array<(number|string)>>|undefined);
/**
* Parse a single column. Set properties like .isDatetime and
* .isNumeric.
*
* @param column
* Column to parse
*
* @param col
* Column index
*/
parseColumn(column: Array<DataValueType>, col: number): void;
/**
* Parse a CSV input string
*/
parseCSV(inOptions?: DataOptions): Array<Array<DataValueType>>;
/**
* A hook for working directly on the parsed columns
*/
parsed(): (boolean|undefined);
/**
* Parse a date and return it as a number. Overridable through
* `options.parseDate`.
*/
parseDate(val: string): number;
/**
* Parse a Google spreadsheet.
*
* @return Always returns false, because it is an intermediate fetch.
*/
parseGoogleSpreadsheet(): boolean;
/**
* Parse a HTML table
*/
parseTable(): (Array<Array<DataValueType>>|undefined);
/**
* Parse numeric cells in to number types and date types in to true
* dates.
*/
parseTypes(): void;
/**
* Reorganize rows into columns.
*/
rowsToColumns(rows: Array<Array<(number|string)>>): Array<Array<(number|string)>>;
/**
* Trim a string from whitespaces.
*
* @param str
* String to trim
*
* @param inside
* Remove all spaces between numbers.
*
* @return Trimed string
*/
trim(str: string, inside?: boolean): string;
/**
* Updates the chart with new data options.
*/
update(options: DataOptions, redraw?: boolean): void;
}
/**
* Perform an Ajax call.
*
* @param attr
* The Ajax settings to use.
*
* @return Returns false, if error occured.
*/
function ajax(attr: Partial<AjaxSettingsObject>): (false|undefined);
/**
* Creates a data object to parse data for a chart.
*/
function data(dataOptions: DataOptions, chartOptions?: Options, chart?: Chart): Data;
/**
* Get a JSON resource over XHR, also supporting CORS without preflight.
*
* @param url
* The URL to load.
*
* @param success
* The success callback. For error handling, use the
* `Highcharts.ajax` function instead.
*/
function getJSON(url: string, success: Function): void;
}
export default factory;
export let Highcharts: typeof _Highcharts;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,33 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
interface Axis {
/**
* (Highstock) Highstock only. Force data grouping on all the axis'
* series.
*
* @param dataGrouping
* A `dataGrouping` configuration. Use `false` to disable data
* grouping dynamically.
*
* @param redraw
* Whether to redraw the chart or wait for a later call to
* Chart#redraw.
*/
setDataGrouping(dataGrouping?: (boolean|DataGroupingOptionsObject), redraw?: boolean): void;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,26 @@
/*
Highstock JS v8.0.4 (2020-03-10)
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,g,D,f){d.hasOwnProperty(g)||(d[g]=f.apply(null,D))}d=d?d._modules:{};g(d,"parts/DataGrouping.js",[d["parts/Globals.js"],d["parts/Point.js"],d["parts/Tooltip.js"],d["parts/Utilities.js"]],function(d,
g,D,f){"";var x=f.addEvent,B=f.arrayMax,K=f.arrayMin,L=f.correctFloat,E=f.defined,M=f.error,N=f.extend,O=f.format,y=f.isNumber,F=f.merge,G=f.pick,z=d.Axis,P=d.defaultPlotOptions;f=d.Series;var h=d.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=h.sum(a);y(a)&&c&&(a=L(a/c));return a},averages:function(){var a=[];[].forEach.call(arguments,function(c){a.push(h.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?B(a):a.hasNulls?null:void 0},low:function(a){return a.length?K(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,v){a=h.open(a);c=h.high(c);b=h.low(b);v=h.close(v);if(y(a)||y(c)||y(b)||y(v))return[a,c,b,v]},range:function(a,c){a=h.low(a);c=h.high(c);if(y(a)||y(c))return[a,c];if(null===a&&null===c)return null}},H=function(a,c,
b,v){var e=this,d=e.data,u=e.options&&e.options.data,f=[],m=[],p=[],n=a.length,q=!!c,r=[],k=e.pointArrayMap,g=k&&k.length,w=["x"].concat(k||["y"]),x=0,z=0,t;v="function"===typeof v?v:h[v]?h[v]:h[e.getDGApproximation&&e.getDGApproximation()||"average"];g?k.forEach(function(){r.push([])}):r.push([]);var A=g||1;for(t=0;t<=n&&!(a[t]>=b[0]);t++);for(t;t<=n;t++){for(;"undefined"!==typeof b[x+1]&&a[t]>=b[x+1]||t===n;){var l=b[x];e.dataGroupInfo={start:e.cropStart+z,length:r[0].length};var C=v.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+z])),w.forEach(function(a){delete e.dataGroupInfo.options[a]}));"undefined"!==typeof C&&(f.push(l),m.push(C),p.push(e.dataGroupInfo));z=t;for(l=0;l<A;l++)r[l].length=0,r[l].hasNulls=!1;x+=1;if(t===n)break}if(t===n)break;if(k)for(l=e.cropStart+t,C=d&&d[l]||e.pointClass.prototype.applyOptions.apply({series:e},[u[l]]),l=0;l<g;l++){var B=C[k[l]];y(B)?
r[l].push(B):null===B&&(r[l].hasNulls=!0)}else l=q?c[t]:null,y(l)?r[0].push(l):null===l&&(r[0].hasNulls=!0)}return{groupedXData:f,groupedYData:m,groupMap:p}},I={approximations:h,groupData:H},w=f.prototype,Q=w.processData,R=w.generatePoints,A={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=d.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),d=this.visible||!a.options.chart.ignoreHiddenSeries,e,f=this.currentDataGrouping,u=!1;this.forceCrop=b;this.groupPixelWidth=null;this.hasProcessed=
!0;b&&!this.requireSorting&&(this.requireSorting=u=!0);b=!1===Q.apply(this,arguments)||!b;u&&(this.requireSorting=!1);if(!b){this.destroyGroupedData();b=c.groupAll?this.xData:this.processedXData;var g=c.groupAll?this.yData:this.processedYData,m=a.plotSizeX;a=this.xAxis;var p=a.options.ordinal,n=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(n){this.isDirty=e=!0;this.points=null;u=a.getExtremes();var q=u.min;u=u.max;p=p&&a.getGroupIntervalFactor(q,u,this)||1;n=n*(u-q)/m*p;m=a.getTimeTicks(a.normalizeTimeTickInterval(n,
c.units||S),Math.min(q,b[0]),Math.max(u,b[b.length-1]),a.options.startOfWeek,b,this.closestPointRange);g=w.groupData.apply(this,[b,g,m,c.approximation]);b=g.groupedXData;p=g.groupedYData;var r=0;if(c.smoothed&&b.length){var k=b.length-1;for(b[k]=Math.min(b[k],u);k--&&0<k;)b[k]+=n/2;b[0]=Math.max(b[0],q)}for(k=1;k<m.length;k++)m.info.segmentStarts&&-1!==m.info.segmentStarts.indexOf(k)||(r=Math.max(m[k]-m[k-1],r));q=m.info;q.gapSize=r;this.closestPointRange=m.info.totalRange;this.groupMap=g.groupMap;
if(E(b[0])&&b[0]<a.min&&d){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,p,a.min,a.max,1),b=c.xData,p=c.yData);this.processedXData=b;this.processedYData=p}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};x(g,"update",function(){if(this.dataGroup)return M(24,!1,this.series.chart),!1});x(D,"headerFormatter",function(a){var c=this.chart,b=c.time,d=a.labelConfig,e=d.series,f=e.tooltipOptions,g=e.options.dataGrouping,h=f.xDateFormat,m=e.xAxis,p=f[(a.isFooter?"footer":"header")+"Format"];if(m&&"datetime"===m.options.type&&
g&&y(d.key)){var n=e.currentDataGrouping;g=g.dateTimeLabelFormats||A.dateTimeLabelFormats;if(n)if(f=g[n.unitName],1===n.count)h=f[0];else{h=f[1];var q=f[2]}else!h&&g&&(h=this.getXDateFormat(d,f,m));h=b.dateFormat(h,d.key);q&&(h+=b.dateFormat(q,d.key+n.totalRange-1));e.chart.styledMode&&(p=this.styledModeFormat(p));a.text=O(p,{point:N(d.point,{key:h}),series:e},c);a.preventDefault()}});x(f,"destroy",w.destroyGroupedData);x(f,"afterSetOptions",function(a){a=a.options;var c=this.type,b=this.chart.options.plotOptions,
d=P[c].dataGrouping,e=this.useCommonDataGrouping&&A;if(J[c]||e)d||(d=F(A,J[c])),a.dataGrouping=F(e,d,b.series&&b.series.dataGrouping,b[c].dataGrouping,this.userOptions.dataGrouping)});x(z,"afterSetScale",function(){this.series.forEach(function(a){a.hasProcessed=!1})});z.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,A.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};z.prototype.setDataGrouping=function(a,c){var b;c=G(c,!0);a||(a={forced:!1,units:null});if(this instanceof z)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.ordinalSlope=null;c&&this.chart.redraw()};d.dataGrouping=I;"";return I});g(d,"masters/modules/datagrouping.src.js",
[d["parts/DataGrouping.js"]],function(d){return d})});
//# sourceMappingURL=datagrouping.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,33 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
interface Axis {
/**
* (Highstock) Highstock only. Force data grouping on all the axis'
* series.
*
* @param dataGrouping
* A `dataGrouping` configuration. Use `false` to disable data
* grouping dynamically.
*
* @param redraw
* Whether to redraw the chart or wait for a later call to
* Chart#redraw.
*/
setDataGrouping(dataGrouping?: (boolean|DataGroupingOptionsObject), redraw?: boolean): void;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,30 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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["parts/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>"},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".split(" ")}}});
b(a,"modules/debugger.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,b){var c=b.addEvent,f=b.isNumber;b=a.setOptions;var g=a.each;b({chart:{displayErrors:!0}});c(a.Chart,"displayError",function(b){var d=b.code,e=this.options.chart;b=this.renderer;this.errorElements&&g(this.errorElements,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,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&&g(a,function(a){a.destroy()});this.errorElements=null})});b(a,"masters/modules/debugger.src.js",[],function(){})});
//# sourceMappingURL=debugger.js.map

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,kBAAT,CAAD,CAA/C,CAA+E,QAAS,CAACC,CAAD,CAAI,CAcxFA,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,KAAQ,CACJ,MAAS,8cAAA,MAAA,CAAA,GAAA,CADL,CA1FM,CAdsE,CAA5F,CAsIAT;CAAA,CAAgBO,CAAhB,CAA0B,yBAA1B,CAAqD,CAACA,CAAA,CAAS,kBAAT,CAAD,CAA+BA,CAAA,CAAS,oBAAT,CAA/B,CAArD,CAAqH,QAAS,CAACC,CAAD,CAAIE,CAAJ,CAAO,CAAA,IAU7HC,EAAWD,CAAAC,SAVkH,CAUtGC,EAAWF,CAAAE,SAClCC,EAAAA,CAAaL,CAAAK,WAAjB,KAA+BC,EAAON,CAAAM,KACtCD,EAAA,CAAW,CAIPE,MAAO,CAWHC,cAAe,CAAA,CAXZ,CAJA,CAAX,CAmBAL,EAAA,CAASH,CAAAS,MAAT,CAAkB,cAAlB,CAAkC,QAAS,CAACC,CAAD,CAAI,CAAA,IACzBC,EAAOD,CAAAC,KADkB,CACLC,EAA1BL,IAAoCK,QAAAL,MAAqBM,EAAAA,CAAzDN,IAAoEM,SAApEN,KACRO,cAAJ,EACIR,CAAA,CAFQC,IAEHO,cAAL,CAA0B,QAAS,CAACC,CAAD,CAAK,CAChCA,CAAJ,EACIA,CAAAC,QAAA,EAFgC,CAAxC,CAMJ,IAAIJ,CAAJ,EAAeA,CAAAJ,cAAf,EAAwCK,CAAxC,CAAkD,CARtCN,IASRO,cAAA,CAAsB,EACtBG,EAAA,CAAMb,CAAA,CAASO,CAAT,CAAA,CACD,oBADC,CACsBA,CADtB,CAC6B,IAD7B,CAEEX,CAAAC,cAAA,CAAgBU,CAAhB,CAAAO,KAFF,CAGFP,CACJQ,EAAA,CAdQZ,IAcKY,WACb,KAAAC,EAfQb,IAeMa,YAEdH,EAAA,CAAMA,CAAAI,QAAA,CACO,iBADP;AAC0B,iDAD1B,CAAAA,QAAA,CAEO,QAFP,CAEiB,UAFjB,CAjBEd,KAqBRO,cAAA,CAAoB,CAApB,CAAA,CAAyBD,CAAAS,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,EArBjBnB,KA2BRO,cAAA,CAAoB,CAApB,CAAA,CAAyBD,CAAAc,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,MAAOX,CAAPW,CAAoB,EAFmF,CAGvGC,QAAS,CAH8F,CAAlF,CAAAR,KAAA,CAIjB,CACJS,KAAM,sBADF,CAEJF,MAAOX,CAFH,CAGJY,QAAS,CAHL,CAIJN,OAAQ,EAJJ,CAJiB,CAAAC,IAAA,EA3BjBnB,KAqCRO,cAAA,CAAoB,CAApB,CAAAS,KAAA,CAA4B,CACxBU,EAAGb,CAAHa,CAAiB,IAAAnB,cAAA,CAAmB,CAAnB,CAAAoB,QAAA,EAAAC,OADO,CAA5B,CA7B8C,CATP,CAA/C,CA2CAhC,EAAA,CAASH,CAAAS,MAAT,CAAkB,cAAlB,CAAkC,QAAS,EAAG,CAC1C,IAAIK,EAAgB,IAAAA,cAChBA;CAAJ,EAAqBA,CAAAsB,OAArB,EACI9B,CAAA,CAAKQ,CAAL,CAAoB,QAAS,CAACC,CAAD,CAAK,CAC9BA,CAAAC,QAAA,EAD8B,CAAlC,CAIJ,KAAAF,cAAA,CAAqB,IAPqB,CAA9C,CA1EiI,CAArI,CAqFAtB,EAAA,CAAgBO,CAAhB,CAA0B,iCAA1B,CAA6D,EAA7D,CAAiE,QAAS,EAAG,EAA7E,CAlOoB,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","each","chart","displayErrors","Chart","e","code","options","renderer","errorElements","el","destroy","msg","text","chartWidth","chartHeight","replace","rect","attr","stroke","zIndex","add","label","css","color","width","padding","fill","y","getBBox","height","length"]}

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,264 @@
/**
* @license Highcharts JS v8.0.4 (2020-03-10)
*
* 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['parts/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>"
},
"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"
]
}
};
});
_registerModule(_modules, 'modules/debugger.src.js', [_modules['parts/Globals.js'], _modules['parts/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;
var setOptions = H.setOptions,
each = H.each;
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) {
each(chart.errorElements, 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,
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) {
each(errorElements, function (el) {
el.destroy();
});
}
this.errorElements = null;
});
});
_registerModule(_modules, 'masters/modules/debugger.src.js', [], function () {
});
}));

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,17 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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,l){a.hasOwnProperty(f)||(a[f]=l.apply(null,d))}a=a?a._modules:{};d(a,"modules/dependency-wheel.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,
d){var f=d.animObject;d=d.seriesType;var l=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=l.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;l.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,m=h+c*b.y;b=h+c*(b.y+b.height);a.angle=m+(b-m)/2;a.shapeType="arc";a.shapeArgs={x:g,y:p,r:f,innerR:k,start:m,end:b};a.dlBox={x:g+Math.cos((m+b)/2)*(f+k)/2,y:p+Math.sin((m+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),m=Math.sin(h+e)*(k+1),l=d.curveFactor;b=Math.abs(a.linkBase[3-n]*c-e);b>Math.PI&&(b=2*Math.PI-b);b*=k;b<k&&(l*=b/k);return{x:g+f,y:p+m,cpX:g+(1-l)*f,cpY:p+(1-l)*m}});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=f(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:a.NodesMixin.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

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,389 @@
/**
* @license Highcharts JS v8.0.4 (2020-03-10)
*
* 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, 'modules/dependency-wheel.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
/* *
*
* 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: H.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 () {
});
}));

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,14 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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,"modules/dotplot.src.js",[a["parts/Globals.js"],a["parts/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.SVGRenderer.prototype.symbols.rect=function(c,d,k,l,m){return a.SVGRenderer.prototype.symbols.callout(c,d,k,l,m)}});d(a,"masters/modules/dotplot.src.js",[],function(){})});
//# sourceMappingURL=dotplot.js.map

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,wBAA1B,CAAoD,CAACA,CAAA,CAAS,kBAAT,CAAD,CAA+BA,CAAA,CAAS,oBAAT,CAA/B,CAApD,CAAoH,QAAS,CAACC,CAAD,CAAIC,CAAJ,CAAO,CAAA,IAmB5HC,EAASD,CAAAC,OAnBmH,CAmBzGC,EAAaF,CAAAE,WAnB4F,CAmB9EC,EAAOH,CAAAG,KAAQC,EAAAA;AAAaJ,CAAAI,WAQ9EA,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,CACDC,EAAWD,CAAAE,MAAAD,SADV,CACiCE,EAAsB,IAAAC,QAAAX,OADvD,CAC4EY,EAAwB,IAAAC,MAAAC,OAAxBF,CAC5FL,CAAAI,QAAAZ,YAFgB,CAE4CgB,EAAlB,IAAAC,YAA0B,CAAc,CAAd,CAAkB,EAAlB,CAAwB,CAChG,KAAAC,OAAAC,QAAA,CAAoB,QAAS,CAACC,CAAD,CAAQ,CAAA,IACjBC,CAA4BC,KAAAA,EAAqBF,CAAAnB,OAArBqB,EAAqC,EADhD,KACoDpB,EAAUoB,CAAApB,OAAVA,EACjFS,CAAAT,OAF6B,CAEAqB,EAASzB,CAAA,CAAKwB,CAAAC,OAAL,CAAgCZ,CAAAY,OAAhC,CAFT,CAEkFC,EAAsB,MAAtBA,GAAWtB,CAC9HkB,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,CAjDiC,CAArC,CAHoB,CAFzB,CATH,CA2EA3D,EAAA6D,YAAAC,UAAAC,QAAAC,KAAA,CAAuCC,QAAS,CAACf,CAAD,CAAIb,CAAJ,CAAO6B,CAAP,CAAUC,CAAV,CAAajD,CAAb,CAAsB,CAClE,MAAOlB,EAAA6D,YAAAC,UAAAC,QAAAK,QAAA,CAAwClB,CAAxC,CAA2Cb,CAA3C,CAA8C6B,CAA9C,CAAiDC,CAAjD,CAAoDjD,CAApD,CAD2D,CAtG0D,CAApI,CA2GA1B,EAAA,CAAgBO,CAAhB,CAA0B,gCAA1B,CAA4D,EAA5D,CAAgE,QAAS,EAAG,EAA5E,CAlHoB,CAbvB;","sources":["dotplot.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","H","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","SVGRenderer","prototype","symbols","rect","H.SVGRenderer.prototype.symbols.rect","w","h","callout"]}

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,163 @@
/**
* @license Highcharts JS v8.0.4 (2020-03-10)
*
* 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, 'modules/dotplot.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, 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;
}
});
});
}
});
H.SVGRenderer.prototype.symbols.rect = function (x, y, w, h, options) {
return H.SVGRenderer.prototype.symbols.callout(x, y, w, h, options);
};
});
_registerModule(_modules, 'masters/modules/dotplot.src.js', [], function () {
});
}));

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,19 @@
/*
Highstock JS v8.0.4 (2020-03-10)
Drag-panes module
(c) 2010-2019 Highsoft AS
Author: 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/drag-panes",["highcharts","highcharts/modules/stock"],function(h){b(h);b.Highcharts=h;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function h(b,d,c,p){b.hasOwnProperty(d)||(b[d]=p.apply(null,c))}b=b?b._modules:{};h(b,"modules/drag-panes.src.js",[b["parts/Globals.js"],b["parts/Utilities.js"]],function(b,d){var c=d.addEvent,
p=d.clamp,h=d.isNumber,y=d.merge,z=d.objectEach,w=d.relativeLength;d=d.wrap;var A=b.hasTouch,m=b.Axis,x=b.Pointer;y(!0,m.prototype.defaultYAxisOptions,{minLength:"10%",maxLength:"100%",resize:{controlledAxis:{next:[],prev:[]},enabled:!1,cursor:"ns-resize",lineColor:"#cccccc",lineDashStyle:"Solid",lineWidth:4,x:0,y:0}});b.AxisResizer=function(a){this.init(a)};b.AxisResizer.prototype={init:function(a,f){this.axis=a;this.options=a.options.resize;this.render();f||this.addMouseEvents()},render:function(){var a=
this.axis,f=a.chart,b=this.options,d=b.x,c=b.y,k=p(a.top+a.height+c,f.plotTop,f.plotTop+f.plotHeight),l={};f.styledMode||(l={cursor:b.cursor,stroke:b.lineColor,"stroke-width":b.lineWidth,dashstyle:b.lineDashStyle});this.lastPos=k-c;this.controlLine||(this.controlLine=f.renderer.path().addClass("highcharts-axis-resizer"));this.controlLine.add(a.axisGroup);b=f.styledMode?this.controlLine.strokeWidth():b.lineWidth;l.d=f.renderer.crispLine(["M",a.left+d,k,"L",a.left+a.width+d,k],b);this.controlLine.attr(l)},
addMouseEvents:function(){var a=this,b=a.controlLine.element,d=a.axis.chart.container,v=[],h,k,l;a.mouseMoveHandler=h=function(b){a.onMouseMove(b)};a.mouseUpHandler=k=function(b){a.onMouseUp(b)};a.mouseDownHandler=l=function(b){a.onMouseDown(b)};v.push(c(d,"mousemove",h),c(d.ownerDocument,"mouseup",k),c(b,"mousedown",l));A&&v.push(c(d,"touchmove",h),c(d.ownerDocument,"touchend",k),c(b,"touchstart",l));a.eventsToUnbind=v},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))},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},onMouseDown:function(a){this.axis.chart.pointer.reset(!1,0);this.grabbed=this.axis.chart.activeResizer=!0},updateAxes:function(a){var b=this,d=b.axis.chart,c=b.options.controlledAxis,m=0===c.next.length?[d.yAxis.indexOf(b.axis)+1]:c.next;c=
[b.axis].concat(c.prev);var k=[],l=!1,r=d.plotTop,n=d.plotHeight,u=r+n;a=p(a,r,u);var t=a-b.lastPos;1>t*t||([c,m].forEach(function(c,f){c.forEach(function(c,g){var e=(c=h(c)?d.yAxis[c]:f||g?d.get(c):c)&&c.options;if(e&&"navigator-y-axis"!==e.id){g=c.top;var m=Math.round(w(e.minLength,n));var q=Math.round(w(e.maxLength,n));f?(t=a-b.lastPos,e=Math.round(p(c.len-t,m,q)),g=c.top+t,g+e>u&&(q=u-e-g,a+=q,g+=q),g<r&&(g=r,g+e>u&&(e=n)),e===m&&(l=!0),k.push({axis:c,options:{top:100*(g-r)/n+"%",height:100*e/
n+"%"}})):(e=Math.round(p(a-g,m,q)),e===q&&(l=!0),a=g+e,k.push({axis:c,options:{height:100*e/n+"%"}}))}})}),l||(k.forEach(function(a){a.axis.update(a.options,!1)}),d.redraw(!1)))},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})}};m.prototype.keepProps.push("resizer");c(m,"afterRender",function(){var a=this.resizer,c=this.options.resize;c&&(c=!1!==c.enabled,a?c?a.init(this,!0):
a.destroy():c&&(this.resizer=new b.AxisResizer(this)))});c(m,"destroy",function(a){!a.keepEvents&&this.resizer&&this.resizer.destroy()});d(x.prototype,"runPointActions",function(a){this.chart.activeResizer||a.apply(this,Array.prototype.slice.call(arguments,1))});d(x.prototype,"drag",function(a){this.chart.activeResizer||a.apply(this,Array.prototype.slice.call(arguments,1))})});h(b,"masters/modules/drag-panes.src.js",[],function(){})});
//# sourceMappingURL=drag-panes.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,577 @@
/**
* @license Highstock JS v8.0.4 (2020-03-10)
*
* 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, 'modules/drag-panes.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, 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 addEvent = U.addEvent,
clamp = U.clamp,
isNumber = U.isNumber,
merge = U.merge,
objectEach = U.objectEach,
relativeLength = U.relativeLength,
wrap = U.wrap;
var hasTouch = H.hasTouch,
Axis = H.Axis,
Pointer = H.Pointer,
// Default options for 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
}
};
merge(true, Axis.prototype.defaultYAxisOptions, resizerOptions);
/* eslint-disable no-invalid-this, valid-jsdoc */
/**
* The AxisResizer class.
*
* @private
* @class
* @name Highcharts.AxisResizer
*
* @param {Highcharts.Axis} axis
* Main axis for the AxisResizer.
*/
H.AxisResizer = function (axis) {
this.init(axis);
};
/* eslint-enable no-invalid-this */
H.AxisResizer.prototype = {
/**
* Initialize the AxisResizer object.
*
* @function Highcharts.AxisResizer#init
*
* @param {Highcharts.Axis} axis
* Main axis for the AxisResizer.
*/
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
*/
render: function () {
var resizer = this,
axis = resizer.axis,
chart = axis.chart,
options = resizer.options,
x = options.x,
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
*/
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.
*/
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.
*/
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
*/
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
*/
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
*/
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;
});
}
};
// Keep resizer reference on axis update
Axis.prototype.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));
}
});
});
_registerModule(_modules, 'masters/modules/drag-panes.src.js', [], function () {
});
}));

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,40 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
(c) 2009-2019 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/draggable-points",["highcharts"],function(t){f(t);f.Highcharts=t;return f}):f("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(f){function t(f,m,k,t){f.hasOwnProperty(m)||(f[m]=t.apply(null,k))}f=f?f._modules:{};t(f,"modules/draggable-points.src.js",[f["parts/Globals.js"],f["parts/Point.js"],f["parts/Utilities.js"]],function(f,m,k){function t(a){return{left:"right",
right:"left",top:"bottom",bottom:"top"}[a]}function K(a){var b=["draggableX","draggableY"],c;p(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,e;p(b.dragDropProps,function(a){"x"===a.axis&&
a.move?d=!0:"y"===a.axis&&a.move&&(e=!0)});return(c.draggableX&&d||c.draggableY&&e)&&!(a&&!1===a.draggableX&&!1===a.draggableY)&&b.yAxis&&b.xAxis}function x(a,b){return"undefined"===typeof a.chartX||"undefined"===typeof a.chartY?b.pointer.normalize(a):a}function y(a,b,c,d){var e=b.map(function(b){return u(a,b,c,d)});return function(){e.forEach(function(a){a()})}}function N(a,b,c){var d=b.dragDropData.origin;b=d.chartX;d=d.chartY;var e=a.chartX;a=a.chartY;return Math.sqrt((e-b)*(e-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={};p(b.series.dragDropProps,function(d,e){d=b.series[d.axis+"Axis"];c[e]=b[e];c[e+"Offset"]=d.toPixels(b[e])-(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,e=d.chart,q;w(d.options.dragDrop&&d.options.dragDrop.liveRedraw,!0)||(e.dragGuideBox=q=d.getGuideBox(c),e.setGuideBoxState("default",d.options.dragDrop.guideBox).add(d.group));e.dragDropData={origin:O(a,c,q),point:b,groupedPoints:c,isDragging:!0}}function Q(a,b){var c=a.point,d=r(c.series.options.dragDrop,c.options.dragDrop),e={},q=a.updateProp,
C={};p(c.series.dragDropProps,function(a,b){if(!q||q===b&&a.resize&&(!a.optionName||!1!==d[a.optionName]))if(q||a.move&&("x"===a.axis&&d.draggableX||"y"===a.axis&&d.draggableY))e[b]=a});(q?[c]:a.groupedPoints).forEach(function(c){C[c.id]={point:c,newValues:c.getDropValues(a.origin,b,e)}});return C}function E(a,b){var c=a.dragDropData.newPoints;b=!1===b?!1:r({duration:400},a.options.chart.animation);a.isDragDropAnimating=!0;p(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 e=
c.point;d=e.series.options.dragDrop;a.preventDefault();c.draggedPastSensitivity||(c.draggedPastSensitivity=N(a,b,w(e.options.dragDrop&&e.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,e.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=e.series,c=b.chart,d=c.dragDropData,f=r(b.options.dragDrop,
e.options.dragDrop),g=f.draggableX,l=f.draggableY;b=d.origin;var h=a.chartX-b.chartX,z=a.chartY-b.chartY,n=h;d=d.updateProp;c.inverted&&(h=-z,z=-n);if(w(f.liveRedraw,!0))E(c,!1),e.showDragHandles();else if(d){g=h;c=z;n=e.series;l=n.chart;d=l.dragDropData;f=n.dragDropProps[d.updateProp];var k=d.newPoints[e.id].newValues;var m="function"===typeof f.resizeSide?f.resizeSide(k,e):f.resizeSide;f.beforeResize&&f.beforeResize(l.dragGuideBox,k,e);l=l.dragGuideBox;n="x"===f.axis&&n.xAxis.reversed||"y"===f.axis&&
n.yAxis.reversed?t(m):m;g="x"===f.axis?g-(d.origin.prevdX||0):0;c="y"===f.axis?c-(d.origin.prevdY||0):0;switch(n){case "left":var p={x:l.attr("x")+g,width:Math.max(1,l.attr("width")-g)};break;case "right":p={width:Math.max(1,l.attr("width")+g)};break;case "top":p={y:l.attr("y")+c,height:Math.max(1,l.attr("height")-c)};break;case "bottom":p={height:Math.max(1,l.attr("height")+c)}}l.attr(p)}else c.dragGuideBox.translate(g?h:0,l?z:0);b.prevdX=h;b.prevdY=z}))}}}function B(a,b){var c=b.dragDropData;if(c&&
c.isDragging&&c.draggedPastSensitivity){var d=c.point,e=c.newPoints,q=G(e),f=1===q?H(e):null;b.dragHandles&&b.hideDragHandles();a.preventDefault();b.cancelClick=!0;d.firePointEvent("drop",{origin:c.origin,chartX:a.chartX,chartY:a.chartY,newPoints:e,numNewPoints:q,newPoint:f&&f.newValues,newPointId:f&&f.point.id},function(){E(b)})}delete b.dragDropData;b.dragGuideBox&&(b.dragGuideBox.destroy(),delete b.dragGuideBox)}function S(a){var b=a.container,c=f.doc;L(a)&&(y(b,["mousedown","touchstart"],function(b){b=
x(b,a);var c=a.hoverPoint,d=r(c&&c.series.options.dragDrop,c&&c.options.dragDrop),f=d.draggableX||!1;d=d.draggableY||!1;a.cancelClick=!1;!f&&!d||a.zoomOrPanKeyPressed(b)||a.hasDraggedAnnotation||(a.dragDropData&&a.dragDropData.isDragging?B(b,a):c&&M(c)&&(a.mouseIsDown=!1,D(b,c),c.firePointEvent("dragStart",b)))}),y(b,["mousemove","touchmove"],function(b){R(x(b,a),a)}),u(b,"mouseleave",function(b){B(x(b,a),a)}),a.unbindDragDropMouseUp=y(c,["mouseup","touchend"],function(b){B(x(b,a),a)}),a.hasAddedDragDropEvents=
!0,u(a,"destroy",function(){a.unbindDragDropMouseUp&&a.unbindDragDropMouseUp()}))}"";var u=k.addEvent,T=k.clamp,r=k.merge,p=k.objectEach,w=k.pick,g=f.seriesTypes;k=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 A=g.line.prototype.dragDropProps={x:{axis:"x",move:!0},y:{axis:"y",move:!0}};g.flags&&(g.flags.prototype.dragDropProps=A);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,e=a.attr("y");b.y>=c.series.options.threshold?(b=a.attr("height"),a.attr({height:Math.max(0,Math.round(b+(d?d-(e+b):0)))})):a.attr({y:Math.round(e+(d?d-e:0))})},resizeSide:function(a,b){var c=b.series.chart.dragHandles;a=a.y>=(b.series.options.threshold||0)?"top":"bottom";b=t(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){a=a.shapeArgs;var b=a.r||0,c=a.width/2;return["M",b,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",a.width-b,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){A=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:A.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:A.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:A.high.propValidate}}}g.waterfall&&(g.waterfall.prototype.dragDropProps={x:h.x,y:r(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,e=c.yAxis,f=c.chart.inverted;b=d.toPixels(a[b],!0);var g=e.toPixels(a.y,!0);a=c.columnMetrics?c.columnMetrics.offset:-a.shapeArgs.height/2;f&&(b=d.len-b,g=e.len-g);return{x:Math.round(b),y:Math.round(g+a)}};k=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:k,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:k,propValidate:function(a,b){return a>=b.x}}};g.gantt&&(g.gantt.prototype.dragDropProps={y:k.y,start:r(k.x,{optionName:"draggableStart",validateIndividualDrag:function(a){return!a.milestone}}),end:r(k.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};f.Chart.prototype.setGuideBoxState=function(a,b){var c=this.dragGuideBox;b=r(U,b);a=r(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"})};
m.prototype.getDropValues=function(a,b,c){var d=this,e=d.series,f=r(e.options.dragDrop,d.options.dragDrop),g={},h=a.points[d.id],k;for(k in c)if(Object.hasOwnProperty.call(c,k)){if("undefined"!==typeof m){var m=!1;break}m=!0}p(c,function(a,c){var q=h[c],n=e[a.axis+"Axis"];n=n.toValue((n.horiz?b.chartX:b.chartY)+h[c+"Offset"]);var v=a.axis.toUpperCase(),k=e[v.toLowerCase()+"Axis"].categories?1:0;k=w(f["dragPrecision"+v],k);var l=w(f["dragMin"+v],-Infinity);v=w(f["dragMax"+v],Infinity);k&&(n=Math.round(n/
k)*k);n=T(n,l,v);m&&a.propValidate&&!a.propValidate(n,d)||"undefined"===typeof q||(g[c]=n)});return g};f.Series.prototype.getGuideBox=function(a){var b=this.chart,c=Infinity,d=-Infinity,e=Infinity,f=-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),e=Math.min(a.y,e),f=Math.max(a.y+a.height,f))});return g?b.renderer.rect(c,e,d-c,f-e):b.renderer.g()};m.prototype.showDragHandles=function(){var a=
this,b=a.series,c=b.chart,d=c.renderer,f=r(b.options.dragDrop,a.options.dragDrop);p(b.dragDropProps,function(e,g){var h=r(V,e.handleOptions,f.dragHandle),k={className:h.className,"stroke-width":h.lineWidth,fill:h.color,stroke:h.lineColor},m=h.pathFormatter||e.handleFormatter,l=e.handlePositioner;var p=e.validateIndividualDrag?e.validateIndividualDrag(a):!0;e.resize&&p&&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,l=l(a),k.d=p=m(a),m="function"===typeof e.resizeSide?e.resizeSide(a.options,a):e.resizeSide,!p||0>l.x||0>l.y||(k.cursor=h.cursor||"x"===e.axis!==!!c.inverted?"ew-resize":"ns-resize",(e=c.dragHandles[m])||(e=c.dragHandles[m]=d.path().add(c.dragHandles.group)),e.translate(l.x,l.y).attr(k),y(e.element,["touchstart","mousedown"],function(b){b=x(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())}),u(c.dragHandles.group.element,"mouseover",function(){c.dragDropData=c.dragDropData||{};c.dragDropData.isHoveringHandle=a.id}),y(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)})))})};f.Chart.prototype.hideDragHandles=function(){this.dragHandles&&(p(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)};u(m,"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)});u(m,"mouseOut",function(){var a=this;setTimeout(function(){a.series&&F(a)},10)});u(m,"remove",function(){var a=
this.series.chart,b=a.dragHandles;b&&b.point===this.id&&a.hideDragHandles()});f.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]};u(f.Chart,"render",function(){this.hasAddedDragDropEvents||S(this)})});t(f,"masters/modules/draggable-points.src.js",[],function(){})});
//# sourceMappingURL=draggable-points.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {}
export default factory;
export let Highcharts: typeof _Highcharts;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
interface Chart {
/**
* Add a series to the chart as drilldown from a specific point in the
* parent series. This method is used for async drilldown, when clicking
* a point in a series should result in loading and displaying a more
* high-resolution series. When not async, the setup is simpler using
* the drilldown.series options structure.
*
* @param point
* The point from which the drilldown will start.
*
* @param options
* The series options for the new, detailed series.
*/
addSeriesAsDrilldown(point: Point, options: SeriesOptionsType): void;
/**
* When the chart is drilled down to a child series, calling
* `chart.drillUp()` will drill up to the parent series.
*/
drillUp(): void;
}
interface SVGElement {
/**
* A general fadeIn method.
*
* @param animation
* The animation options for the element fade.
*/
fadeIn(animation?: (boolean|AnimationOptionsObject)): void;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,31 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
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,u,x){c.hasOwnProperty(m)||(c[m]=x.apply(null,u))}c=c?c._modules:{};m(c,"modules/drilldown.src.js",[c["parts/Globals.js"],c["parts/Color.js"],c["parts/Point.js"],c["parts/Tick.js"],c["parts/Utilities.js"]],
function(c,m,u,x,l){var n=l.addEvent,A=l.animObject,t=l.extend,y=l.fireEvent,E=l.format,v=l.merge,B=l.objectEach,w=l.pick,F=l.syncTimeout,G=c.noop;l=c.defaultOptions;var p=c.Chart,r=c.seriesTypes,C=r.pie;r=r.column;var D=1;t(l.lang,{drillUpText:"\u25c1 Back to {series.name}"});l.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}}};c.SVGRenderer.prototype.Element.prototype.fadeIn=function(a){this.attr({opacity:.1,visibility:"inherit"}).animate({opacity:w(this.newOpacity,1)},a||{duration:250})};p.prototype.addSeriesAsDrilldown=function(a,b){this.addSingleSeriesAsDrilldown(a,b);this.applyDrilldown()};p.prototype.addSingleSeriesAsDrilldown=function(a,b){var d=a.series,f=d.xAxis,e=d.yAxis,g=[],h=[],q;var k=this.styledMode?{colorIndex:w(a.colorIndex,d.colorIndex)}:{color:a.color||
d.color};this.drilldownLevels||(this.drilldownLevels=[]);var c=d.options._levelNumber||0;(q=this.drilldownLevels[this.drilldownLevels.length-1])&&q.levelNumber!==c&&(q=void 0);b=t(t({_ddSeriesId:D++},k),b);var l=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,q?(g=q.levelSeries,h=q.levelSeriesOptions):(g.push(a),a.purgedOptions=
v({_ddSeriesId:a.options._ddSeriesId,_levelNumber:a.options._levelNumber,selected:a.options.selected},a.userOptions),h.push(a.purgedOptions)))});a=t({levelNumber:c,seriesOptions:d.options,seriesPurgedOptions:d.purgedOptions,levelSeriesOptions:h,levelSeries:g,shapeArgs:a.shapeArgs,bBox:a.graphic?a.graphic.getBBox():{},color:a.isNull?(new m(k.color)).setOpacity(0).get():k.color,lowerSeriesOptions:b,pointOptions:d.options.data[l],pointIndex:l,oldExtremes:{xMin:f&&f.userMin,xMax:f&&f.userMax,yMin:e&&
e.userMin,yMax:e&&e.userMax},resetZoomButton:this.resetZoomButton},k);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||G,b.options.animation=!0)};p.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();y(this,"afterDrilldown")};p.prototype.getDrilldownBackText=function(){var a=this.drilldownLevels;if(a&&0<a.length)return a=a[a.length-1],a.series=a.seriesOptions,E(this.options.lang.drillUpText,a)};p.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")}};p.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,h,c,k,l=function(b){e.forEach(function(a){a.options._ddSeriesId===b._ddSeriesId&&(d=a)});var d=d||a.addSeries(b,!1);d.type===c.type&&d.animateDrillupTo&&(d.animate=d.animateDrillupTo);b===h.seriesPurgedOptions&&(k=d)};f--;)if(h=b[f],h.levelNumber===d){b.pop();c=h.lowerSeries;if(!c.chart)for(g=e.length;g--;)if(e[g].options.id===h.lowerSeriesOptions.id&&e[g].options._levelNumber===d+1){c=e[g];break}c.xData=[];h.levelSeriesOptions.forEach(l);y(a,"drillup",{seriesOptions:h.seriesPurgedOptions||
h.seriesOptions});k.type===c.type&&(k.drilldownLevel=h,k.options.animation=a.options.drilldown.animation,c.animateDrillupFrom&&c.chart&&c.animateDrillupFrom(h));k.options._levelNumber=d;c.remove(!1);k.xAxis&&(g=h.oldExtremes,k.xAxis.setExtremes(g.xMin,g.xMax,!1),k.yAxis.setExtremes(g.yMin,g.yMax,!1));h.resetZoomButton&&(a.resetZoomButton=h.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=[];y(a,"drillupall")}};n(p,"afterInit",function(){var a=this;a.drilldown={update:function(b,d){v(!0,a.options.drilldown,b);w(d,!0)&&a.redraw()}}});n(p,"beforeShowResetZoom",function(){if(this.drillUpButton)return!1});n(p,"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)))}});B(a.ticks,x.prototype.drillable)})});r.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()))});F(function(){b.points&&b.points.forEach(function(a,b){b=b===(d&&d.pointIndex)?"show":"fadeIn";var f="show"===b?!0:void 0,
c=a.dataLabel;if(a.graphic)a.graphic[b](f);c&&!c.hidden&&(c.fadeIn(),a.connector&&a.connector.fadeIn())})},Math.max(this.chart.options.drilldown.animation.duration-50,0));delete this.animate}};r.prototype.animateDrilldown=function(a){var b=this,d=this.chart,f=d.drilldownLevels,c,g=A(d.options.drilldown.animation),h=this.xAxis,q=d.styledMode;a||(f.forEach(function(a){b.options._ddSeriesId===a.lowerSeriesOptions._ddSeriesId&&(c=a.shapeArgs,q||(c.fill=a.color))}),c.x+=w(h.oldPos,h.pos)-h.pos,this.points.forEach(function(a){var d=
a.shapeArgs;q||(d.fill=a.color);a.graphic&&a.graphic.attr(c).animate(t(a.shapeArgs,{fill:a.color||b.color}),g);a.dataLabel&&a.dataLabel.fadeIn(g)}),delete this.animate)};r.prototype.animateDrillupFrom=function(a){var b=A(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 h=f.graphic,g=a.shapeArgs,k=function(){h.destroy();d&&c&&(d=d.destroy())};
h&&(delete f.graphic,e.chart.styledMode||(g.fill=a.color),b.duration?h.animate(g,v(b,{complete:k})):(h.attr(g),k()))})};C&&t(C.prototype,{animateDrillupTo:r.prototype.animateDrillupTo,animateDrillupFrom:r.prototype.animateDrillupFrom,animateDrilldown:function(a){var b=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],d=this.chart.options.drilldown.animation,c=b.shapeArgs,e=c.start,g=(c.end-e)/this.points.length,h=this.chart.styledMode;a||(this.points.forEach(function(a,f){var k=a.shapeArgs;
h||(c.fill=b.color,k.fill=a.color);if(a.graphic)a.graphic.attr(v(c,{start:e+f*g,end:e+(f+1)*g}))[d?"animate":"attr"](k,d)}),delete this.animate)}});u.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--&&!h;)if(e.series[g].id===this.drilldown&&-1===c.ddDupes.indexOf(this.drilldown)){var h=e.series[g];c.ddDupes.push(this.drilldown)}y(c,"drilldown",{point:this,seriesOptions:h,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))})};c.Axis.prototype.drilldownCategory=function(a,b){B(this.getDDPoints(a),function(d){d&&d.series&&d.series.visible&&d.doDrilldown&&d.doDrilldown(!0,a,b)});this.chart.applyDrilldown()};c.Axis.prototype.getDDPoints=function(a){return this.ddPoints&&this.ddPoints[a]};x.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=n(b.element,"click",function(b){d.drilldownCategory(a,b)}),g||b.css(d.chart.options.drilldown.activeAxisLabelStyle)):b&&b.removeOnDrillableClick&&(g||(b.styles={},b.css(b.basicStyles)),b.removeOnDrillableClick(),b.removeClass("highcharts-drilldown-axis-label")))};
n(u,"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(c.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(c.Series,"afterDrawTracker",function(){var a=this.chart.styledMode;this.points.forEach(function(b){b.drilldown&&b.graphic&&z(b.graphic,"pointer",!0,a)})});n(u,"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

View File

@@ -0,0 +1,48 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
interface Chart {
/**
* Add a series to the chart as drilldown from a specific point in the
* parent series. This method is used for async drilldown, when clicking
* a point in a series should result in loading and displaying a more
* high-resolution series. When not async, the setup is simpler using
* the drilldown.series options structure.
*
* @param point
* The point from which the drilldown will start.
*
* @param options
* The series options for the new, detailed series.
*/
addSeriesAsDrilldown(point: Point, options: SeriesOptionsType): void;
/**
* When the chart is drilled down to a child series, calling
* `chart.drillUp()` will drill up to the parent series.
*/
drillUp(): void;
}
interface SVGElement {
/**
* A general fadeIn method.
*
* @param animation
* The animation options for the element fade.
*/
fadeIn(animation?: (boolean|AnimationOptionsObject)): void;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals";
import * as _Highcharts from "../highcharts";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts" {
interface Series {
/**
* Get non-presentational attributes for a point. Used internally for
* both styled mode and classic. Set correct position in link with
* connector line.
*
* @param this
* The series of points.
*
* @return A hash containing those attributes that are not settable from
* CSS.
*/
markerAttribs(this: Series): SVGAttributes;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,17 @@
/*
Highcharts JS v8.0.4 (2020-03-10)
(c) 2009-2019 Sebastian Bochan, Rafal Sebestjanski
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/dumbbell",["highcharts"],function(c){b(c);b.Highcharts=c;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function c(b,l,f,c){b.hasOwnProperty(l)||(b[l]=c.apply(null,f))}b=b?b._modules:{};c(b,"modules/dumbbell.src.js",[b["parts/Globals.js"],b["parts/Utilities.js"]],function(b,c){c=c.seriesType;var f=b.pick,m=b.seriesTypes,
l=b.Series.prototype,n=m.arearange.prototype,r=m.column.prototype,q=n.pointClass.prototype;c("dumbbell","arearange",{trackByArea:!1,fillColor:"none",lineWidth:0,pointRange:1,connectorWidth:1,stickyTracking:!1,groupPadding:.2,pointPadding:.1,lowColor:"#333333",states:{hover:{lineWidthPlus:0,connectorWidthPlus:1,halo:!1}}},{trackerGroups:["group","markerGroup","dataLabelsGroup"],drawTracker:b.TrackerMixin.drawTrackerPoint,drawGraph:b.noop,crispConnector:function(a,b){a[1]===a[4]&&(a[1]=a[4]=Math.floor(a[1])+
b%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.floor(a[2])+b%2/2);return a},crispCol:r.crispCol,getConnectorAttribs:function(a){var t=this.chart,e=a.options,h=this.options,d=this.xAxis,g=this.yAxis,c=f(e.connectorWidth,h.connectorWidth),l=f(e.connectorColor,h.connectorColor,e.color,a.zone?a.zone.color:void 0,a.color),n=f(h.states&&h.states.hover&&h.states.hover.connectorWidthPlus,1),m=f(e.dashStyle,h.dashStyle),p=f(a.plotLow,a.plotY),k=g.toPixels(h.threshold||0,!0);k=f(a.plotHigh,t.inverted?g.len-k:k);a.state&&
(c+=n);0>p?p=0:p>=g.len&&(p=g.len);0>k?k=0:k>=g.len&&(k=g.len);if(0>a.plotX||a.plotX>d.len)c=0;a.upperGraphic&&(d={y:a.y,zone:a.zone},a.y=a.high,a.zone=a.zone?a.getZone():void 0,l=f(e.connectorColor,h.connectorColor,e.color,a.zone?a.zone.color:void 0,a.color),b.extend(a,d));a={d:this.crispConnector(["M",a.plotX,p,"L",a.plotX,k],c)};t.styledMode||(a.stroke=l,a["stroke-width"]=c,m&&(a.dashstyle=m));return a},drawConnector:function(a){var b=f(this.options.animationLimit,250);b=a.connector&&this.chart.pointCount<
b?"animate":"attr";a.connector||(a.connector=this.chart.renderer.path().addClass("highcharts-lollipop-stem").attr({zIndex:-1}).add(this.markerGroup));a.connector[b](this.getConnectorAttribs(a))},getColumnMetrics:function(){var a=r.getColumnMetrics.apply(this,arguments);a.offset+=a.width/2;return a},translatePoint:n.translate,setShapeArgs:m.columnrange.prototype.translate,translate:function(){this.setShapeArgs.apply(this);this.translatePoint.apply(this,arguments);this.points.forEach(function(a){var b=
a.shapeArgs,e=a.pointWidth;a.plotX=b.x;b.x=a.plotX-e/2;a.tooltipPos=null})},seriesDrawPoints:n.drawPoints,drawPoints:function(){var a=this.chart,b=this.points.length,e=this.lowColor=this.options.lowColor,c=0;for(this.seriesDrawPoints.apply(this,arguments);c<b;){var d=this.points[c];this.drawConnector(d);d.upperGraphic&&(d.upperGraphic.element.point=d,d.upperGraphic.addClass("highcharts-lollipop-high"));d.connector.element.point=d;if(d.lowerGraphic){var g=d.zone&&d.zone.color;g=f(d.options.lowColor,
e,d.options.color,g,d.color,this.color);a.styledMode||d.lowerGraphic.attr({fill:g});d.lowerGraphic.addClass("highcharts-lollipop-low")}c++}},markerAttribs:function(){var a=n.markerAttribs.apply(this,arguments);a.x=Math.floor(a.x);a.y=Math.floor(a.y);return a},pointAttribs:function(a,b){var c=l.pointAttribs.apply(this,arguments);"hover"===b&&delete c.fill;return c}},{destroyElements:q.destroyElements,isValid:q.isValid,pointSetState:q.setState,setState:function(){var a=this.series,c=a.chart,e=a.options.marker,
h=this.options,d=f(h.lowColor,a.options.lowColor,h.color,this.zone&&this.zone.color,this.color,a.color),g="attr";this.pointSetState.apply(this,arguments);this.state||(g="animate",this.lowerGraphic&&!c.styledMode&&(this.lowerGraphic.attr({fill:d}),this.upperGraphic&&(c={y:this.y,zone:this.zone},this.y=this.high,this.zone=this.zone?this.getZone():void 0,e=f(this.marker?this.marker.fillColor:void 0,e?e.fillColor:void 0,h.color,this.zone?this.zone.color:void 0,this.color),this.upperGraphic.attr({fill:e}),
b.extend(this,c))));this.connector[g](a.getConnectorAttribs(this))}});""});c(b,"masters/modules/dumbbell.src.js",[],function(){})});
//# sourceMappingURL=dumbbell.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,32 @@
/*!*
*
* Copyright (c) Highsoft AS. All rights reserved.
*
*!*/
import * as globals from "../globals.src";
import * as _Highcharts from "../highcharts.src";
/**
* Adds the module to the imported Highcharts namespace.
*
* @param highcharts
* The imported Highcharts namespace to extend.
*/
export function factory(highcharts: typeof Highcharts): void;
declare module "../highcharts.src" {
interface Series {
/**
* Get non-presentational attributes for a point. Used internally for
* both styled mode and classic. Set correct position in link with
* connector line.
*
* @param this
* The series of points.
*
* @return A hash containing those attributes that are not settable from
* CSS.
*/
markerAttribs(this: Series): SVGAttributes;
}
}
export default factory;
export let Highcharts: typeof _Highcharts;

View File

@@ -0,0 +1,556 @@
/**
* @license Highcharts JS v8.0.4 (2020-03-10)
*
* (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/dumbbell', ['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, 'modules/dumbbell.src.js', [_modules['parts/Globals.js'], _modules['parts/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 pick = H.pick,
seriesTypes = H.seriesTypes,
seriesProto = H.Series.prototype,
areaRangeProto = seriesTypes.arearange.prototype,
columnRangeProto = seriesTypes.columnrange.prototype,
colProto = seriesTypes.column.prototype,
areaRangePointProto = areaRangeProto.pointClass.prototype;
/**
* The dumbbell series is a cartesian series with higher and lower values for
* each point along an X axis, connected with a line between the values.
* Requires `highcharts-more.js` and `modules/dumbbell.js`.
*
* @sample {highcharts} highcharts/demo/dumbbell/
* Dumbbell chart
* @sample {highcharts} highcharts/series-dumbbell/styled-mode-dumbbell/
* Styled mode
*
* @extends plotOptions.arearange
* @product highcharts highstock
* @excluding fillColor, fillOpacity, lineWidth, stack, stacking,
* stickyTracking, trackByArea
* @since 8.0.0
* @optionparent plotOptions.dumbbell
*/
seriesType('dumbbell', 'arearange', {
/** @ignore-option */
trackByArea: false,
/** @ignore-option */
fillColor: 'none',
/** @ignore-option */
lineWidth: 0,
pointRange: 1,
/**
* Pixel width of the line that connects the dumbbell point's values.
*
* @since 8.0.0
* @product highcharts highstock
*/
connectorWidth: 1,
/** @ignore-option */
stickyTracking: false,
groupPadding: 0.2,
pointPadding: 0.1,
/**
* Color of the start markers in a dumbbell graph.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
* @since 8.0.0
* @product highcharts highstock
*/
lowColor: '#333333',
/**
* Color of the line that connects the dumbbell point's values.
* By default it is the series' color.
*
* @type {string}
* @product highcharts highstock
* @since 8.0.0
* @apioption plotOptions.dumbbell.connectorColor
*/
states: {
hover: {
/** @ignore-option */
lineWidthPlus: 0,
/**
* The additional connector line width for a hovered point.
*
* @since 8.0.0
* @product highcharts highstock
*/
connectorWidthPlus: 1,
/** @ignore-option */
halo: false
}
}
}, {
trackerGroups: ['group', 'markerGroup', 'dataLabelsGroup'],
drawTracker: H.TrackerMixin.drawTrackerPoint,
drawGraph: H.noop,
/**
* Correct line position by Math.floor instead of round.
* As a result the line is aligned in the same way as marker
*
* @private
*
* @function Highcharts.seriesTypes.dumbbell#crispConnector
*
* @param {Highcharts.SVGRenderer} this
* Highcharts Renderer.
* @param {Highcharts.SVGPathArray} points
* The original points on the format `['M', 0, 0, 'L', 100, 0]`.
* @param {number} width
* Connector's width.
*
* @return {Highcharts.SVGPathArray}
* The original points array, but modified to render crisply.
*
*
*/
crispConnector: function (points, width) {
if (points[1] === points[4]) {
// Substract due to #1129. Now bottom and left axis gridlines behave
// the same.
points[1] = points[4] =
Math.floor(points[1]) + (width % 2 / 2);
}
if (points[2] === points[5]) {
points[2] = points[5] =
Math.floor(points[2]) + (width % 2 / 2);
}
return points;
},
crispCol: colProto.crispCol,
/**
* Get connector line path and styles that connects dumbbell point's low and
* high values.
* @private
*
* @param {Highcharts.Series} this The series of points.
* @param {Highcharts.Point} point The point to inspect.
*
* @return {Highcharts.SVGAttributes} attribs The path and styles.
*/
getConnectorAttribs: function (point) {
var series = this,
chart = series.chart,
pointOptions = point.options,
seriesOptions = series.options,
xAxis = series.xAxis,
yAxis = series.yAxis,
connectorWidth = pick(pointOptions.connectorWidth,
seriesOptions.connectorWidth),
connectorColor = pick(pointOptions.connectorColor,
seriesOptions.connectorColor,
pointOptions.color,
point.zone ? point.zone.color : void 0,
point.color),
connectorWidthPlus = pick(seriesOptions.states &&
seriesOptions.states.hover &&
seriesOptions.states.hover.connectorWidthPlus, 1),
dashStyle = pick(pointOptions.dashStyle,
seriesOptions.dashStyle),
pointTop = pick(point.plotLow,
point.plotY),
pxThreshold = yAxis.toPixels(seriesOptions.threshold || 0,
true),
pointHeight = chart.inverted ?
yAxis.len - pxThreshold : pxThreshold,
pointBottom = pick(point.plotHigh,
pointHeight),
attribs,
origProps;
if (point.state) {
connectorWidth = connectorWidth + connectorWidthPlus;
}
if (pointTop < 0) {
pointTop = 0;
}
else if (pointTop >= yAxis.len) {
pointTop = yAxis.len;
}
if (pointBottom < 0) {
pointBottom = 0;
}
else if (pointBottom >= yAxis.len) {
pointBottom = yAxis.len;
}
if (point.plotX < 0 || point.plotX > xAxis.len) {
connectorWidth = 0;
}
// Connector should reflect upper marker's zone color
if (point.upperGraphic) {
origProps = {
y: point.y,
zone: point.zone
};
point.y = point.high;
point.zone = point.zone ? point.getZone() : void 0;
connectorColor = pick(pointOptions.connectorColor, seriesOptions.connectorColor, pointOptions.color, point.zone ? point.zone.color : void 0, point.color);
H.extend(point, origProps);
}
attribs = {
d: series.crispConnector([
'M',
point.plotX,
pointTop,
'L',
point.plotX,
pointBottom
], connectorWidth)
};
if (!chart.styledMode) {
attribs.stroke = connectorColor;
attribs['stroke-width'] = connectorWidth;
if (dashStyle) {
attribs.dashstyle = dashStyle;
}
}
return attribs;
},
/**
* Draw connector line that connects dumbbell point's low and high values.
* @private
*
* @param {Highcharts.Series} this The series of points.
* @param {Highcharts.Point} point The point to inspect.
*
* @return {void}
*/
drawConnector: function (point) {
var series = this,
animationLimit = pick(series.options.animationLimit, 250),
verb = point.connector && series.chart.pointCount < animationLimit ?
'animate' : 'attr';
if (!point.connector) {
point.connector = series.chart.renderer.path()
.addClass('highcharts-lollipop-stem')
.attr({
zIndex: -1
})
.add(series.markerGroup);
}
point.connector[verb](this.getConnectorAttribs(point));
},
/**
* Return the width and x offset of the dumbbell adjusted for grouping,
* groupPadding, pointPadding, pointWidth etc.
*
* @private
*
* @function Highcharts.seriesTypes.column#getColumnMetrics
*
* @param {Highcharts.Series} this The series of points.
*
* @return {Highcharts.ColumnMetricsObject} metrics shapeArgs
*
*/
getColumnMetrics: function () {
var metrics = colProto.getColumnMetrics.apply(this,
arguments);
metrics.offset = metrics.offset + metrics.width / 2;
return metrics;
},
translatePoint: areaRangeProto.translate,
setShapeArgs: columnRangeProto.translate,
/**
* Translate each point to the plot area coordinate system and find
* shape positions
*
* @private
*
* @function Highcharts.seriesTypes.dumbbell#translate
*
* @param {Highcharts.Series} this The series of points.
*
* @return {void}
*/
translate: function () {
// Calculate shapeargs
this.setShapeArgs.apply(this);
// Calculate point low / high values
this.translatePoint.apply(this, arguments);
// Correct x position
this.points.forEach(function (point) {
var shapeArgs = point.shapeArgs,
pointWidth = point.pointWidth;
point.plotX = shapeArgs.x;
shapeArgs.x = point.plotX - pointWidth / 2;
point.tooltipPos = null;
});
},
seriesDrawPoints: areaRangeProto.drawPoints,
/**
* Extend the arearange series' drawPoints method by applying a connector
* and coloring markers.
* @private
*
* @function Highcharts.Series#drawPoints
*
* @param {Highcharts.Series} this The series of points.
*
* @return {void}
*/
drawPoints: function () {
var series = this,
chart = series.chart,
pointLength = series.points.length,
seriesLowColor = series.lowColor = series.options.lowColor,
i = 0,
lowerGraphicColor,
point,
zoneColor;
this.seriesDrawPoints.apply(series, arguments);
// Draw connectors and color upper markers
while (i < pointLength) {
point = series.points[i];
series.drawConnector(point);
if (point.upperGraphic) {
point.upperGraphic.element.point = point;
point.upperGraphic.addClass('highcharts-lollipop-high');
}
point.connector.element.point = point;
if (point.lowerGraphic) {
zoneColor = point.zone && point.zone.color;
lowerGraphicColor = pick(point.options.lowColor, seriesLowColor, point.options.color, zoneColor, point.color, series.color);
if (!chart.styledMode) {
point.lowerGraphic.attr({
fill: lowerGraphicColor
});
}
point.lowerGraphic.addClass('highcharts-lollipop-low');
}
i++;
}
},
/**
* Get non-presentational attributes for a point. Used internally for
* both styled mode and classic. Set correct position in link with connector
* line.
*
* @see Series#pointAttribs
*
* @function Highcharts.Series#markerAttribs
*
* @param {Highcharts.Series} this The series of points.
*
* @return {Highcharts.SVGAttributes}
* A hash containing those attributes that are not settable from
* CSS.
*/
markerAttribs: function () {
var ret = areaRangeProto.markerAttribs.apply(this,
arguments);
ret.x = Math.floor(ret.x);
ret.y = Math.floor(ret.y);
return ret;
},
/**
* Get presentational attributes
*
* @private
* @function Highcharts.seriesTypes.column#pointAttribs
*
* @param {Highcharts.Series} this The series of points.
* @param {Highcharts.Point} point The point to inspect.
* @param {string} state current state of point (normal, hover, select)
*
* @return {Highcharts.SVGAttributes} pointAttribs SVGAttributes
*/
pointAttribs: function (point, state) {
var pointAttribs;
pointAttribs = seriesProto.pointAttribs.apply(this, arguments);
if (state === 'hover') {
delete pointAttribs.fill;
}
return pointAttribs;
}
}, {
// seriesTypes doesn't inherit from arearange point proto so put below
// methods rigidly.
destroyElements: areaRangePointProto.destroyElements,
isValid: areaRangePointProto.isValid,
pointSetState: areaRangePointProto.setState,
/**
* Set the point's state extended by have influence on the connector
* (between low and high value).
*
* @private
* @param {Highcharts.Point} this The point to inspect.
*
* @return {void}
*/
setState: function () {
var point = this,
series = point.series,
chart = series.chart,
seriesLowColor = series.options.lowColor,
seriesMarker = series.options.marker,
pointOptions = point.options,
pointLowColor = pointOptions.lowColor,
zoneColor = point.zone && point.zone.color,
lowerGraphicColor = pick(pointLowColor,
seriesLowColor,
pointOptions.color,
zoneColor,
point.color,
series.color),
verb = 'attr',
upperGraphicColor,
origProps;
this.pointSetState.apply(this, arguments);
if (!point.state) {
verb = 'animate';
if (point.lowerGraphic && !chart.styledMode) {
point.lowerGraphic.attr({
fill: lowerGraphicColor
});
if (point.upperGraphic) {
origProps = {
y: point.y,
zone: point.zone
};
point.y = point.high;
point.zone = point.zone ? point.getZone() : void 0;
upperGraphicColor = pick(point.marker ? point.marker.fillColor : void 0, seriesMarker ? seriesMarker.fillColor : void 0, pointOptions.color, point.zone ? point.zone.color : void 0, point.color);
point.upperGraphic.attr({
fill: upperGraphicColor
});
H.extend(point, origProps);
}
}
}
point.connector[verb](series.getConnectorAttribs(point));
}
});
/**
* The `dumbbell` series. If the [type](#series.dumbbell.type) option is
* not specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.dumbbell
* @product highcharts highstock
* @requires highcharts-more
* @requires modules/dumbbell
* @apioption series.dumbbell
*/
/**
* An array of data points for the series. For the `dumbbell` 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,low,high`. 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, 4, 2],
* [1, 2, 1],
* [2, 9, 10]
* ]
* ```
*
* 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.dumbbell.turboThreshold), this option is not
* available.
* ```js
* data: [{
* x: 1,
* low: 0,
* high: 4,
* name: "Point2",
* color: "#00FF00",
* lowColor: "#00FFFF",
* connectorWidth: 3,
* connectorColor: "#FF00FF"
* }, {
* x: 1,
* low: 5,
* high: 3,
* name: "Point1",
* color: "#FF00FF"
* }]
* ```
*
* @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<Array<(number|string),number>|Array<(number|string),number,number>|*>}
* @extends series.arearange.data
* @product highcharts highstock
* @apioption series.dumbbell.data
*/
/**
* Color of the line that connects the dumbbell point's values.
* By default it is the series' color.
*
* @type {string}
* @since 8.0.0
* @product highcharts highstock
* @apioption series.dumbbell.data.connectorColor
*/
/**
* Pixel width of the line that connects the dumbbell point's values.
*
* @type {number}
* @since 8.0.0
* @default 1
* @product highcharts highstock
* @apioption series.dumbbell.data.connectorWidth
*/
/**
* Color of the start markers in a dumbbell graph.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
* @since 8.0.0
* @default #333333
* @product highcharts highstock
* @apioption series.dumbbell.data.lowColor
*/
''; // adds doclets above to transpiled file
});
_registerModule(_modules, 'masters/modules/dumbbell.src.js', [], function () {
});
}));

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