initial commit

This commit is contained in:
2021-07-10 16:25:16 +02:00
parent bff57cbf45
commit 20fb7267a8
2426 changed files with 792090 additions and 0 deletions
@@ -0,0 +1,73 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Accessibility module
(c) 2010-2019 Highsoft AS
Author: Oystein Moseng
License: www.highcharts.com/license
*/
(function(n){"object"===typeof module&&module.exports?(n["default"]=n,module.exports=n):"function"===typeof define&&define.amd?define(function(){return n}):n("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(n){(function(a){function n(a,g){var k=a.indexOf("#each("),h=a.indexOf("#plural("),f=a.indexOf("["),m=a.indexOf("]");if(-1<k){var f=a.slice(k).indexOf(")")+k,c=a.substring(0,k),h=a.substring(f+1),f=a.substring(k+6,f).split(","),k=Number(f[1]);a="";if(g=g[f[0]])for(k=isNaN(k)?g.length:
k,k=0>k?g.length+k:Math.min(k,g.length),f=0;f<k;++f)a+=c+g[f]+h;return a.length?a:""}if(-1<h){c=a.slice(h).indexOf(")")+h;a=a.substring(h+8,c).split(",");switch(Number(g[a[0]])){case 0:a=q(a[4],a[1]);break;case 1:a=q(a[2],a[1]);break;case 2:a=q(a[3],a[1]);break;default:a=a[1]}a?(g=a,g=g.trim&&g.trim()||g.replace(/^\s+|\s+$/g,"")):g="";return g}return-1<f?(h=a.substring(0,f),a=Number(a.substring(f+1,m)),g=g[h],!isNaN(a)&&g&&(0>a?(c=g[g.length+a],void 0===c&&(c=g[0])):(c=g[a],void 0===c&&(c=g[g.length-
1]))),void 0!==c?c:""):"{"+a+"}"}var q=a.pick;a.i18nFormat=function(p,g,k){var h=function(c,a){c=c.slice(a||0);var d=c.indexOf("{"),b=c.indexOf("}");if(-1<d&&b>d)return{statement:c.substring(d+1,b),begin:a+d+1,end:a+b}},f=[],m,c;c=0;do m=h(p,c),c=p.substring(c,m&&m.begin-1),c.length&&f.push({value:c,type:"constant"}),m&&f.push({value:m.statement,type:"statement"}),c=m&&m.end+1;while(m);f.forEach(function(c){"statement"===c.type&&(c.value=n(c.value,g))});return a.format(f.reduce(function(c,a){return c+
a.value},""),g,k)};a.Chart.prototype.langFormat=function(p,g,k){p=p.split(".");for(var h=this.options.lang,f=0;f<p.length;++f)h=h&&h[p[f]];return"string"===typeof h&&a.i18nFormat(h,g,k)};a.setOptions({lang:{accessibility:{screenReaderRegionLabel:"Chart screen reader information.",navigationHint:"Use regions/landmarks to skip ahead to chart {#plural(numSeries, and navigate between data series,)}",defaultChartTitle:"Chart",longDescriptionHeading:"Long description.",noDescription:"No description available.",
structureHeading:"Structure.",viewAsDataTable:"View as data table.",chartHeading:"Chart graphic.",chartContainerLabel:"Interactive chart. {title}. Use up and down arrows to navigate with most screen readers.",rangeSelectorMinInput:"Select start date.",rangeSelectorMaxInput:"Select end date.",tableSummary:"Table representation of chart.",mapZoomIn:"Zoom chart",mapZoomOut:"Zoom out chart",rangeSelectorButton:"Select range {buttonText}",legendLabel:"Toggle series visibility",svgContainerTitle:"{chartTitle}",
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]}.",xAxisDescriptionPlural:"The chart has {numAxes} X axes displaying {#names.forEach(-1) }and {names[-1]}",
yAxisDescriptionSingular:"The chart has 1 Y axis displaying {names[0]}.",yAxisDescriptionPlural:"The chart has {numAxes} Y axes displaying {#names.forEach(-1) }and {names[-1]}"},exporting:{chartMenuLabel:"Chart export",menuButtonLabel:"View export menu",exportRegionLabel:"Chart export 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}"}}}})})(n);(function(a){function n(c){return c.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26#x27;").replace(/\//g,
"\x26#x2F;")}function q(c){return"string"===typeof c?c.replace(/<\/?[^>]+(>|$)/g,""):c}function p(c){for(var a=c.childNodes.length;a--;)c.appendChild(c.childNodes[a])}var g=a.win.document,k=a.erase,h=a.addEvent,f=a.merge,m={position:"absolute",top:"-999em",width:"1px",height:"1px",overflow:"hidden"};a.Series.prototype.commonKeys="name id category x value y".split(" ");a.Series.prototype.specialKeys="z open high q3 median q1 low close".split(" ");a.seriesTypes.pie&&(a.seriesTypes.pie.prototype.specialKeys=
[]);a.setOptions({accessibility:{enabled:!0,pointDescriptionThreshold:!1,screenReaderSectionFormatter:function(c){var a=c.options,e=c.types||[],d={chart:c,numSeries:c.series&&c.series.length},e=(1===e.length&&"pie"===e[0]||"map"===e[0])&&{}||c.getAxesDescription();return"\x3cdiv\x3e"+c.langFormat("accessibility.navigationHint",d)+"\x3c/div\x3e\x3ch3\x3e"+(a.title.text?n(a.title.text):c.langFormat("accessibility.defaultChartTitle",d))+(a.subtitle&&a.subtitle.text?". "+n(a.subtitle.text):"")+"\x3c/h3\x3e"+
(a.chart.description?"\x3ch4\x3e"+c.langFormat("accessibility.longDescriptionHeading",d)+"\x3c/h4\x3e\x3cdiv\x3e"+a.chart.description+"\x3c/div\x3e":"")+"\x3ch4\x3e"+c.langFormat("accessibility.structureHeading",d)+"\x3c/h4\x3e\x3cdiv\x3e"+(a.chart.typeDescription||c.getTypeDescription())+"\x3c/div\x3e"+(e.xAxis?"\x3cdiv\x3e"+e.xAxis+"\x3c/div\x3e":"")+(e.yAxis?"\x3cdiv\x3e"+e.yAxis+"\x3c/div\x3e":"")}}});a.addEvent(a.Series,"afterRender",function(){this.chart.options.accessibility.enabled&&this.setA11yDescription()});
a.Series.prototype.setA11yDescription=function(){var c=this.chart.options.accessibility,a=this.points&&this.points.length&&this.points[0].graphic&&this.points[0].graphic.element,e=a&&a.parentNode||this.graph&&this.graph.element||this.group&&this.group.element;e&&(e.lastChild===a&&p(e),this.points&&(this.points.length<c.pointDescriptionThreshold||!1===c.pointDescriptionThreshold)&&this.points.forEach(function(d){d.graphic&&(d.graphic.element.setAttribute("role","img"),d.graphic.element.setAttribute("tabindex",
"-1"),d.graphic.element.setAttribute("aria-label",q(d.series.options.pointDescriptionFormatter&&d.series.options.pointDescriptionFormatter(d)||c.pointDescriptionFormatter&&c.pointDescriptionFormatter(d)||d.buildPointInfoString())))}),1<this.chart.series.length||c.describeSingleSeries)&&(e.setAttribute("role",this.options.exposeElementToA11y?"img":"region"),e.setAttribute("tabindex","-1"),e.setAttribute("aria-label",q(c.seriesDescriptionFormatter&&c.seriesDescriptionFormatter(this)||this.buildSeriesInfoString())))};
a.Series.prototype.buildSeriesInfoString=function(){var c=this.chart,a=this.description||this.options.description,a=a&&c.langFormat("accessibility.series.description",{description:a,series:this}),e=c.langFormat("accessibility.series.xAxisDescription",{name:this.xAxis&&this.xAxis.getDescription(),series:this}),d=c.langFormat("accessibility.series.yAxisDescription",{name:this.yAxis&&this.yAxis.getDescription(),series:this}),b={name:this.name||"",ix:this.index+1,numSeries:c.series.length,numPoints:this.points.length,
series:this},l=1===c.types.length?"":"Combination";return(c.langFormat("accessibility.series.summary."+this.type+l,b)||c.langFormat("accessibility.series.summary.default"+l,b))+(a?" "+a:"")+(1<c.yAxis.length&&this.yAxis?" "+d:"")+(1<c.xAxis.length&&this.xAxis?" "+e:"")};a.Point.prototype.buildPointInfoString=function(){var c=this,r=c.series,e=r.chart,d=e.options.accessibility,b="",l=r.xAxis&&r.xAxis.isDatetimeAxis,d=l&&e.time.dateFormat(d.pointDateFormatter&&d.pointDateFormatter(c)||d.pointDateFormat||
a.Tooltip.prototype.getXDateFormat.call({getDateFormat:a.Tooltip.prototype.getDateFormat,chart:e},c,e.options.tooltip,r.xAxis),c.x);a.find(r.specialKeys,function(b){return void 0!==c[b]})?(l&&(b=d),r.commonKeys.concat(r.specialKeys).forEach(function(d){void 0===c[d]||l&&"x"===d||(b+=(b?". ":"")+d+", "+c[d])})):b=(this.name||d||this.category||this.id||"x, "+this.x)+", "+(void 0!==this.value?this.value:this.y);return this.index+1+". "+b+"."+(this.description?" "+this.description:"")+(1<e.series.length&&
r.name?" "+r.name:"")};a.Axis.prototype.getDescription=function(){return this.userOptions&&this.userOptions.description||this.axisTitle&&this.axisTitle.textStr||this.options.id||this.categories&&"categories"||this.isDatetimeAxis&&"Time"||"values"};h(a.Series,"afterInit",function(){var c=this.chart;c.options.accessibility.enabled&&(c.types=c.types||[],0>c.types.indexOf(this.type)&&c.types.push(this.type))});h(a.Series,"remove",function(){var c=this.chart,a=this,e=!1;c.series.forEach(function(d){d!==
a&&0>c.types.indexOf(a.type)&&(e=!0)});e||k(c.types,a.type)});a.Chart.prototype.getTypeDescription=function(){var c=this.types&&this.types[0],a=this.series&&this.series[0]||{},e=a.mapTitle,d=this.langFormat("accessibility.seriesTypeDescriptions."+c,{chart:this}),a={numSeries:this.series.length,numPoints:a.points&&a.points.length,chart:this,mapTitle:e},b=this.series&&1===this.series.length?"Single":"Multiple";return c?"map"===c?e?this.langFormat("accessibility.chartTypes.mapTypeDescription",a):this.langFormat("accessibility.chartTypes.unknownMap",
a):1<this.types.length?this.langFormat("accessibility.chartTypes.combinationChart",a):(this.langFormat("accessibility.chartTypes."+c+b,a)||this.langFormat("accessibility.chartTypes.default"+b,a))+(d?" "+d:""):this.langFormat("accessibility.chartTypes.emptyChart",a)};a.Chart.prototype.getAxesDescription=function(){var c=this.xAxis.length,a=this.yAxis.length,e={};c&&(e.xAxis=this.langFormat("accessibility.axis.xAxisDescription"+(1<c?"Plural":"Singular"),{chart:this,names:this.xAxis.map(function(d){return d.getDescription()}),
numAxes:c}));a&&(e.yAxis=this.langFormat("accessibility.axis.yAxisDescription"+(1<a?"Plural":"Singular"),{chart:this,names:this.yAxis.map(function(d){return d.getDescription()}),numAxes:a}));return e};a.Chart.prototype.addAccessibleContextMenuAttribs=function(){var c=this.exportDivElements;c&&(c.forEach(function(c){"DIV"!==c.tagName||c.children&&c.children.length||(c.setAttribute("role","menuitem"),c.setAttribute("tabindex",-1))}),c[0].parentNode.setAttribute("role","menu"),c[0].parentNode.setAttribute("aria-label",
this.langFormat("accessibility.exporting.chartMenuLabel",{chart:this})))};a.Chart.prototype.addScreenReaderRegion=function(c,a){var e=this,d=e.screenReaderRegion=g.createElement("div"),b=g.createElement("h4"),l=g.createElement("a"),t=e.screenReaderHeading=g.createElement("h4");d.setAttribute("id",c);d.setAttribute("role","region");d.setAttribute("aria-label",e.langFormat("accessibility.screenReaderRegionLabel",{chart:this}));d.innerHTML=e.options.accessibility.screenReaderSectionFormatter(e);e.getCSV&&
(l.innerHTML=e.langFormat("accessibility.viewAsDataTable",{chart:e}),l.href="#"+a,l.setAttribute("tabindex","-1"),l.onclick=e.options.accessibility.onTableAnchorClick||function(){e.viewData();g.getElementById(a).focus()},b.appendChild(l),d.appendChild(b));t.innerHTML=e.langFormat("accessibility.chartHeading",{chart:e});e.renderTo.insertBefore(t,e.renderTo.firstChild);e.renderTo.insertBefore(d,e.renderTo.firstChild);f(!0,t.style,m);f(!0,d.style,m)};h(a.Legend,"afterRender",function(){var c=this.group,
a=this.allItems,e=this.chart;c&&a&&a.length&&(c.attr({role:"region","aria-label":e.langFormat("accessibility.legendLabel")}),this.box&&this.box.attr("aria-hidden","true"),a.forEach(function(d){var b=d.legendGroup,l=d.legendItem,c=d.visible;d=e.langFormat("accessibility.legendItem",{chart:e,itemName:q(d.name)});b&&l&&(b.attr({role:"button","aria-pressed":c?"false":"true"}),d&&b.attr("aria-label",d),l.attr("aria-hidden","false"))}))});h(a.Legend,"afterColorizeItem",function(c){var a=c.item&&c.item.legendGroup;
c=c.visible?"false":"true";a&&(a.attr("aria-pressed",c),a.div&&a.div.setAttribute("aria-pressed",c))});a.Chart.prototype.callbacks.push(function(c){var a=c.options;if(a.accessibility.enabled){var e=c.container.getElementsByTagName("desc")[0],d=c.container.getElementsByTagName("text"),b="highcharts-title-"+c.index,l="highcharts-data-table-"+c.index,t="highcharts-information-region-"+c.index,u=a.title.text||c.langFormat("accessibility.defaultChartTitle",{chart:c}),v=q(c.langFormat("accessibility.svgContainerTitle",
{chartTitle:u}));v.length&&(a=g.createElementNS("http://www.w3.org/2000/svg","title"),a.textContent=v,a.id=b,e.parentNode.insertBefore(a,e));c.renderTo.setAttribute("role","region");c.renderTo.setAttribute("aria-label",c.langFormat("accessibility.chartContainerLabel",{title:q(u),chart:c}));if(c.exportSVGElements&&c.exportSVGElements[0]&&c.exportSVGElements[0].element){var e=c.exportSVGElements[0].element,f=e.onclick;e.onclick=function(){f.apply(this,Array.prototype.slice.call(arguments));c.addAccessibleContextMenuAttribs();
c.highlightExportItem(0)};e.setAttribute("role","button");e.setAttribute("aria-label",c.langFormat("accessibility.exporting.menuButtonLabel",{chart:c}));c.exportingGroup.element.setAttribute("role","region");c.exportingGroup.element.setAttribute("aria-label",c.langFormat("accessibility.exporting.exportRegionLabel",{chart:c}))}c.rangeSelector&&["minInput","maxInput"].forEach(function(b,d){c.rangeSelector[b]&&(c.rangeSelector[b].setAttribute("tabindex","-1"),c.rangeSelector[b].setAttribute("role","textbox"),
c.rangeSelector[b].setAttribute("aria-label",c.langFormat("accessibility.rangeSelector"+(d?"MaxInput":"MinInput"),{chart:c})))});[].forEach.call(d,function(b){"false"!==b.getAttribute("aria-hidden")&&b.setAttribute("aria-hidden","true")});c.addScreenReaderRegion(t,l);h(c,"afterGetTable",function(b){b.html=b.html.replace("\x3ctable ",'\x3ctable summary\x3d"'+c.langFormat("accessibility.tableSummary",{chart:c})+'"')})}})})(n);(function(a){function n(d){var b=d.index,a=d.series.points,c=a.length;if(a[b]!==
d)for(;c--;){if(a[c]===d)return c}else return b}function q(d,b){this.chart=d;this.id=b.id;this.keyCodeMap=b.keyCodeMap;this.validate=b.validate;this.init=b.init;this.terminate=b.terminate}function p(d){var b;d&&d.onclick&&f.createEvent&&(b=f.createEvent("Events"),b.initEvent("click",!0,!1),d.onclick(b))}function g(d){var b=d.chart.options.accessibility;return d.options.skipKeyboardNavigation||!1===d.options.enableMouseTracking||!d.visible||b.pointDescriptionThreshold&&b.pointDescriptionThreshold<=
d.points.length}function k(d){var b=d.series.chart.options.accessibility;return d.isNull&&b.keyboardNavigation.skipNullPoints||!1===d.visible||g(d.series)}var h=a.win,f=h.document,m=a.addEvent,c=a.fireEvent,r=a.merge,e=a.pick;a.extend(a.SVGElement.prototype,{addFocusBorder:function(d,b){this.focusBorder&&this.removeFocusBorder();var a=this.getBBox();d=e(d,3);a.x+=this.translateX?this.translateX:0;a.y+=this.translateY?this.translateY:0;this.focusBorder=this.renderer.rect(a.x-d,a.y-d,a.width+2*d,a.height+
2*d,b&&b.borderRadius).addClass("highcharts-focus-border").attr({zIndex:99}).add(this.parentGroup);this.renderer.styledMode||this.focusBorder.attr({stroke:b&&b.stroke,"stroke-width":b&&b.strokeWidth})},removeFocusBorder:function(){this.focusBorder&&(this.focusBorder.destroy(),delete this.focusBorder)}});a.Series.prototype.keyboardMoveVertical=!0;["column","pie"].forEach(function(d){a.seriesTypes[d]&&(a.seriesTypes[d].prototype.keyboardMoveVertical=!1)});a.setOptions({accessibility:{keyboardNavigation:{enabled:!0,
focusBorder:{enabled:!0,hideBrowserFocusOutline:!0,style:{color:"#335cad",lineWidth:2,borderRadius:3},margin:2},skipNullPoints:!0}}});q.prototype={run:function(d){var b=this,a=d.which||d.keyCode,c=!1,e=!1;this.keyCodeMap.forEach(function(l){-1<l[0].indexOf(a)&&(c=!0,e=!1!==l[1].call(b,a,d))});c||9!==a||(e=this.move(d.shiftKey?-1:1));return e},move:function(d){var b=this.chart;this.terminate&&this.terminate(d);b.keyboardNavigationModuleIndex+=d;var a=b.keyboardNavigationModules[b.keyboardNavigationModuleIndex];
b.focusElement&&b.focusElement.removeFocusBorder();if(a){if(a.validate&&!a.validate())return this.move(d);if(a.init)return a.init(d),!0}b.keyboardNavigationModuleIndex=0;0<d?(this.chart.exiting=!0,this.chart.tabExitAnchor.focus()):this.chart.renderTo.focus();return!1}};a.Axis.prototype.panStep=function(d,b){var a=b||3;b=this.getExtremes();var c=(b.max-b.min)/a*d,a=b.max+c,c=b.min+c,e=a-c;0>d&&c<b.dataMin?(c=b.dataMin,a=c+e):0<d&&a>b.dataMax&&(a=b.dataMax,c=a-e);this.setExtremes(c,a)};a.Chart.prototype.setFocusToElement=
function(d,b){var a=this.options.accessibility.keyboardNavigation.focusBorder;b=b||d;b.element&&b.element.focus&&(b.element.focus(),a.hideBrowserFocusOutline&&b.css({outline:"none"}));a.enabled&&(this.focusElement&&this.focusElement.removeFocusBorder(),d.addFocusBorder(a.margin,{stroke:a.style.color,strokeWidth:a.style.lineWidth,borderRadius:a.style.borderRadius}),this.focusElement=d)};a.Point.prototype.highlight=function(){var d=this.series.chart;if(this.isNull)d.tooltip&&d.tooltip.hide(0);else this.onMouseOver();
this.graphic&&d.setFocusToElement(this.graphic);d.highlightedPoint=this;return this};a.Chart.prototype.highlightAdjacentPoint=function(d){var b=this.series,a=this.highlightedPoint,c=a&&n(a)||0,e=a&&a.series.points,f=this.series&&this.series[this.series.length-1],f=f&&f.points&&f.points[f.points.length-1];if(!b[0]||!b[0].points)return!1;if(a){if(b=b[a.series.index+(d?1:-1)],c=e[c+(d?1:-1)],!c&&b&&(c=b.points[d?0:b.points.length-1]),!c)return!1}else c=d?b[0].points[0]:f;return k(c)?(b=c.series,g(b)?
this.highlightedPoint=d?b.points[b.points.length-1]:b.points[0]:this.highlightedPoint=c,this.highlightAdjacentPoint(d)):c.highlight()};a.Series.prototype.highlightFirstValidPoint=function(){var d=this.chart.highlightedPoint,b=(d&&d.series)===this?n(d):0;if(d=this.points){for(var a=b,c=d.length;a<c;++a)if(!k(d[a]))return d[a].highlight();for(;0<=b;--b)if(!k(d[b]))return d[b].highlight()}return!1};a.Chart.prototype.highlightAdjacentSeries=function(d){var b,a,c=this.highlightedPoint,e=(b=this.series&&
this.series[this.series.length-1])&&b.points&&b.points[b.points.length-1];if(!this.highlightedPoint)return b=d?this.series&&this.series[0]:b,(a=d?b&&b.points&&b.points[0]:e)?a.highlight():!1;b=this.series[c.series.index+(d?-1:1)];if(!b)return!1;var e=Infinity,f,h=b.points.length;if(void 0===c.plotX||void 0===c.plotY)a=void 0;else{for(;h--;)f=b.points[h],void 0!==f.plotX&&void 0!==f.plotY&&(f=(c.plotX-f.plotX)*(c.plotX-f.plotX)*4+(c.plotY-f.plotY)*(c.plotY-f.plotY)*1,f<e&&(e=f,a=h));a=void 0!==a&&
b.points[a]}if(!a)return!1;if(g(b))return a.highlight(),d=this.highlightAdjacentSeries(d),d?d:(c.highlight(),!1);a.highlight();return a.series.highlightFirstValidPoint()};a.Chart.prototype.highlightAdjacentPointVertical=function(d){var b=this.highlightedPoint,a=Infinity,c;if(void 0===b.plotX||void 0===b.plotY)return!1;this.series.forEach(function(l){g(l)||l.points.forEach(function(e){if(void 0!==e.plotY&&void 0!==e.plotX&&e!==b){var t=e.plotY-b.plotY,f=Math.abs(e.plotX-b.plotX),f=Math.abs(t)*Math.abs(t)+
f*f*4;l.yAxis.reversed&&(t*=-1);!(0>t&&d||0<t&&!d||5>f||k(e))&&f<a&&(a=f,c=e)}})});return c?c.highlight():!1};a.Chart.prototype.showExportMenu=function(){this.exportSVGElements&&this.exportSVGElements[0]&&(this.exportSVGElements[0].element.onclick(),this.highlightExportItem(0))};a.Chart.prototype.hideExportMenu=function(){var a=this.exportDivElements;a&&this.exportContextMenu&&(a.forEach(function(b){if("highcharts-menu-item"===b.className&&b.onmouseout)b.onmouseout()}),this.highlightedExportItem=
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.highlightedExportItem],c;if(b&&"DIV"===b.tagName&&(!b.children||!b.children.length)){c=!!(this.renderTo.getElementsByTagName("g")[0]||{}).focus;b.focus&&c&&b.focus();if(d&&d.onmouseout)d.onmouseout();if(b.onmouseover)b.onmouseover();this.highlightedExportItem=a;return!0}};a.Chart.prototype.highlightLastExportItem=
function(){var a;if(this.exportDivElements)for(a=this.exportDivElements.length;a--&&!this.highlightExportItem(a););};a.Chart.prototype.highlightRangeSelectorButton=function(a){var b=this.rangeSelector.buttons;b[this.highlightedRangeSelectorItemIx]&&b[this.highlightedRangeSelectorItemIx].setState(this.oldRangeSelectorItemState||0);this.highlightedRangeSelectorItemIx=a;return b[a]?(this.setFocusToElement(b[a].box,b[a]),this.oldRangeSelectorItemState=b[a].state,b[a].setState(2),!0):!1};a.Chart.prototype.highlightLegendItem=
function(a){var b=this.legend.allItems,d=this.highlightedLegendItemIx;return b[a]?(b[d]&&c(b[d].legendGroup.element,"mouseout"),void 0!==b[a].pageIx&&b[a].pageIx+1!==this.legend.currentPage&&this.legend.scroll(1+b[a].pageIx-this.legend.currentPage),this.highlightedLegendItemIx=a,this.setFocusToElement(b[a].legendItem,b[a].legendGroup),c(b[a].legendGroup.element,"mouseover"),!0):!1};a.Chart.prototype.addKeyboardNavigationModules=function(){function a(a,c,d){return new q(b,r({keyCodeMap:c},{id:a},d))}
var b=this;b.keyboardNavigationModules=[a("entry",[]),a("points",[[[37,39],function(a){a=39===a;return b.highlightAdjacentPoint(a)?!0:this.init(a?1:-1)}],[[38,40],function(a){a=38!==a;var c=b.options.accessibility.keyboardNavigation;if(c.mode&&"serialize"===c.mode)return b.highlightAdjacentPoint(a)?!0:this.init(a?1:-1);b[b.highlightedPoint&&b.highlightedPoint.series.keyboardMoveVertical?"highlightAdjacentPointVertical":"highlightAdjacentSeries"](a);return!0}],[[13,32],function(){b.highlightedPoint&&
b.highlightedPoint.firePointEvent("click")}]],{init:function(a){var c=b.series.length,d=0<a?0:c;if(0<a)for(delete b.highlightedPoint;d<c;){if(a=b.series[d].highlightFirstValidPoint())return a;++d}else for(;d--;)if(b.highlightedPoint=b.series[d].points[b.series[d].points.length-1],a=b.series[d].highlightFirstValidPoint())return a},terminate:function(){b.tooltip&&b.tooltip.hide(0);delete b.highlightedPoint}}),a("resetZoom",[[[9,37,38,39,40],function(a,b){return this.move(9===a&&b.shiftKey||38===a||
37===a?-1:1)}],[[13,32],function(){b.zoomOut()}]],{validate:function(){return b.resetZoomButton&&b.resetZoomButton.box},init:function(){b.setFocusToElement(b.resetZoomButton.box,b.resetZoomButton)}}),a("exporting",[[[37,38],function(){for(var a=b.highlightedExportItem||0,c=!0;a--;)if(b.highlightExportItem(a)){c=!1;break}if(c)return b.highlightLastExportItem(),!0}],[[39,40],function(){for(var a=!0,c=(b.highlightedExportItem||0)+1;c<b.exportDivElements.length;++c)if(b.highlightExportItem(c)){a=!1;break}if(a)return b.highlightExportItem(0),
!0}],[[13,32],function(){p(b.exportDivElements[b.highlightedExportItem])}]],{validate:function(){return b.exportChart&&!(b.options.exporting&&!1===b.options.exporting.enabled)},init:function(a){b.highlightedPoint=null;b.showExportMenu();0>a&&b.highlightLastExportItem()},terminate:function(){b.hideExportMenu()}}),a("mapZoom",[[[38,40,37,39],function(a){b[38===a||40===a?"yAxis":"xAxis"][0].panStep(39>a?-1:1)}],[[9],function(a,c){b.mapNavButtons[b.focusedMapNavButtonIx].setState(0);if(c.shiftKey&&!b.focusedMapNavButtonIx||
!c.shiftKey&&b.focusedMapNavButtonIx)return b.mapZoom(),this.move(c.shiftKey?-1:1);b.focusedMapNavButtonIx+=c.shiftKey?-1:1;a=b.mapNavButtons[b.focusedMapNavButtonIx];b.setFocusToElement(a.box,a);a.setState(2)}],[[13,32],function(){p(b.mapNavButtons[b.focusedMapNavButtonIx].element)}]],{validate:function(){return b.mapZoom&&b.mapNavButtons&&2===b.mapNavButtons.length},init:function(a){var c=b.mapNavButtons[0],d=b.mapNavButtons[1],c=0<a?c:d;b.mapNavButtons.forEach(function(a,c){a.element.setAttribute("tabindex",
-1);a.element.setAttribute("role","button");a.element.setAttribute("aria-label",b.langFormat("accessibility.mapZoom"+(c?"Out":"In"),{chart:b}))});b.setFocusToElement(c.box,c);c.setState(2);b.focusedMapNavButtonIx=0<a?0:1}}),a("rangeSelector",[[[37,39,38,40],function(a){a=37===a||38===a?-1:1;if(!b.highlightRangeSelectorButton(b.highlightedRangeSelectorItemIx+a))return this.move(a)}],[[13,32],function(){3!==b.oldRangeSelectorItemState&&p(b.rangeSelector.buttons[b.highlightedRangeSelectorItemIx].element)}]],
{validate:function(){return b.rangeSelector&&b.rangeSelector.buttons&&b.rangeSelector.buttons.length},init:function(a){b.rangeSelector.buttons.forEach(function(a){a.element.setAttribute("tabindex","-1");a.element.setAttribute("role","button");a.element.setAttribute("aria-label",b.langFormat("accessibility.rangeSelectorButton",{chart:b,buttonText:a.text&&a.text.textStr}))});b.highlightRangeSelectorButton(0<a?0:b.rangeSelector.buttons.length-1)}}),a("rangeSelectorInput",[[[9,38,40],function(a,c){a=
9===a&&c.shiftKey||38===a?-1:1;c=b.highlightedInputRangeIx+=a;if(1<c||0>c)return this.move(a);b.rangeSelector[c?"maxInput":"minInput"].focus()}]],{validate:function(){return b.rangeSelector&&b.rangeSelector.inputGroup&&"hidden"!==b.rangeSelector.inputGroup.element.getAttribute("visibility")&&!1!==b.options.rangeSelector.inputEnabled&&b.rangeSelector.minInput&&b.rangeSelector.maxInput},init:function(a){b.highlightedInputRangeIx=0<a?0:1;b.rangeSelector[b.highlightedInputRangeIx?"maxInput":"minInput"].focus()}}),
a("legend",[[[37,39,38,40],function(a){a=37===a||38===a?-1:1;!b.highlightLegendItem(b.highlightedLegendItemIx+a)&&1<b.legend.allItems.length&&this.init(a)}],[[13,32],function(){var a=b.legend.allItems[b.highlightedLegendItemIx].legendItem.element;p(b.legend.options.useHTML?a:a.parentNode)}]],{validate:function(){return b.legend&&b.legend.allItems&&b.legend.display&&!(b.colorAxis&&b.colorAxis.length)&&!1!==(b.options.legend&&b.options.legend.keyboardNavigation&&b.options.legend.keyboardNavigation.enabled)},
init:function(a){b.legend.allItems.forEach(function(a){a.legendGroup.element.setAttribute("tabindex","-1")});b.highlightLegendItem(0<a?0:b.legend.allItems.length-1)}})]};a.Chart.prototype.addExitAnchor=function(){var a=this;a.tabExitAnchor=f.createElement("div");a.tabExitAnchor.setAttribute("tabindex","0");r(!0,a.tabExitAnchor.style,{position:"absolute",top:"-999em",width:"1px",height:"1px",overflow:"hidden"});a.renderTo.appendChild(a.tabExitAnchor);return m(a.tabExitAnchor,"focus",function(b){b=
b||h.event;a.exiting?a.exiting=!1:(a.renderTo.focus(),b.preventDefault(),a.keyboardNavigationModuleIndex=a.keyboardNavigationModules.length-1,b=a.keyboardNavigationModules[a.keyboardNavigationModuleIndex],b.validate&&!b.validate()?b.move(-1):b.init(-1))})};a.Chart.prototype.resetKeyboardNavigation=function(){var a=this.keyboardNavigationModules&&this.keyboardNavigationModules[this.keyboardNavigationModuleIndex||0];a&&a.terminate&&a.terminate();this.focusElement&&this.focusElement.removeFocusBorder();
this.keyboardNavigationModuleIndex=0;this.keyboardReset=!0};a.addEvent(a.Series,"destroy",function(){var a=this.chart;a.highlightedPoint&&a.highlightedPoint.series===this&&(delete a.highlightedPoint,a.focusElement&&a.focusElement.removeFocusBorder())});a.Chart.prototype.callbacks.push(function(a){var b=a.options.accessibility;b.enabled&&b.keyboardNavigation.enabled&&(a.addKeyboardNavigationModules(),a.keyboardNavigationModuleIndex=0,a.container.hasAttribute&&!a.container.hasAttribute("tabIndex")&&
a.container.setAttribute("tabindex","0"),a.tabExitAnchor||(a.unbindExitAnchorFocus=a.addExitAnchor()),a.unbindKeydownHandler=m(a.renderTo,"keydown",function(b){b=b||h.event;var c=a.keyboardNavigationModules[a.keyboardNavigationModuleIndex];a.keyboardReset=!1;c&&c.run(b)&&b.preventDefault()}),a.unbindBlurHandler=m(f,"mouseup",function(){a.keyboardReset||a.pointer&&a.pointer.chartPosition||a.resetKeyboardNavigation()}),m(a,"destroy",function(){a.resetKeyboardNavigation();a.unbindExitAnchorFocus&&a.tabExitAnchor&&
a.unbindExitAnchorFocus();a.unbindKeydownHandler&&a.renderTo&&a.unbindKeydownHandler();a.unbindBlurHandler&&a.unbindBlurHandler()}))})})(n)});
//# sourceMappingURL=accessibility.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,132 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Annotations module
(c) 2009-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(n){"object"===typeof module&&module.exports?(n["default"]=n,module.exports=n):"function"===typeof define&&define.amd?define(function(){return n}):n("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(n){var A=function(a){return{addEvents:function(){var h=this;a.addEvent(h.graphic.element,"mousedown",function(e){h.onMouseDown(e)});a.objectEach(h.options.events,function(e,d){var c=function(c){"click"===d&&h.cancelClick||e.call(h,h.chart.pointer.normalize(c),h.target)};if("drag"!==
d)h.graphic.on(d,c);else a.addEvent(h,"drag",c)});h.options.draggable&&(a.addEvent(h,"drag",h.onDrag),h.graphic.renderer.styledMode||h.graphic.css({cursor:{x:"ew-resize",y:"ns-resize",xy:"move"}[h.options.draggable]}))},removeDocEvents:function(){this.removeDrag&&(this.removeDrag=this.removeDrag());this.removeMouseUp&&(this.removeMouseUp=this.removeMouseUp())},onMouseDown:function(h){var e=this,d=e.chart.pointer,c,g;2!==h.button&&(h.stopPropagation(),h=d.normalize(h),c=h.chartX,g=h.chartY,e.cancelClick=
!1,e.removeDrag=a.addEvent(a.doc,"mousemove",function(b){e.hasDragged=!0;b=d.normalize(b);b.prevChartX=c;b.prevChartY=g;a.fireEvent(e,"drag",b);c=b.chartX;g=b.chartY}),e.removeMouseUp=a.addEvent(a.doc,"mouseup",function(b){e.cancelClick=e.hasDragged;e.hasDragged=!1;e.onMouseUp(b)}))},onMouseUp:function(){var a=this.chart,e=this.target||this,d=a.options.annotations,a=a.annotations.indexOf(e);this.removeDocEvents();d[a]=e.options},onDrag:function(a){if(this.chart.isInsidePlot(a.chartX-this.chart.plotLeft,
a.chartY-this.chart.plotTop)){var e=this.mouseMoveToTranslation(a);"x"===this.options.draggable&&(e.y=0);"y"===this.options.draggable&&(e.x=0);this.points.length?this.translate(e.x,e.y):(this.shapes.forEach(function(d){d.translate(e.x,e.y)}),this.labels.forEach(function(d){d.translate(e.x,e.y)}));this.redraw(!1)}},mouseMoveToRadians:function(a,e,d){var c=a.prevChartY-d,g=a.prevChartX-e;d=a.chartY-d;a=a.chartX-e;this.chart.inverted&&(e=g,g=c,c=e,e=a,a=d,d=e);return Math.atan2(d,a)-Math.atan2(c,g)},
mouseMoveToTranslation:function(a){var e=a.chartX-a.prevChartX;a=a.chartY-a.prevChartY;var d;this.chart.inverted&&(d=a,a=e,e=d);return{x:e,y:a}},mouseMoveToScale:function(a,e,d){e=(a.chartX-e||1)/(a.prevChartX-e||1);a=(a.chartY-d||1)/(a.prevChartY-d||1);this.chart.inverted&&(d=a,a=e,e=d);return{x:e,y:a}},destroy:function(){this.removeDocEvents();a.removeEvent(this);this.hcEvents=null}}}(n),D=function(a,h){function e(d,c,g,b){this.chart=d;this.target=c;this.options=g;this.index=a.pick(g.index,b)}a.extend(e.prototype,
h);e.prototype.setVisibility=function(a){this.graphic.attr("visibility",a?"visible":"hidden");this.options.visible=a};e.prototype.render=function(){var a=this.chart,c=this.options;this.graphic=a.renderer.symbol(c.symbol,0,0,c.width,c.height).add(a.controlPointsGroup).css(c.style);this.setVisibility(c.visible);this.addEvents()};e.prototype.redraw=function(a){this.graphic[a?"animate":"attr"](this.options.positioner.call(this,this.target))};e.prototype.destroy=function(){h.destroy.call(this);this.graphic&&
(this.graphic=this.graphic.destroy());this.options=this.target=this.chart=null};e.prototype.update=function(d){var c=this.chart,g=this.target,b=this.index;d=a.merge(!0,this.options,d);this.destroy();this.constructor(c,g,d,b);this.render(c.controlPointsGroup);this.redraw()};return e}(n,A),C=function(a){function h(e,d,c){this.series={visible:!0,chart:e,getPlotBox:a.Series.prototype.getPlotBox};this.target=d||null;this.options=c;this.applyOptions(this.getOptions())}h.fromPoint=function(a){return new h(a.series.chart,
null,{x:a.x,y:a.y,xAxis:a.series.xAxis,yAxis:a.series.yAxis})};h.pointToPixels=function(a,d){var c=a.series,g=c.chart,b=a.plotX,f=a.plotY;g.inverted&&(a.mock?(b=a.plotY,f=a.plotX):(b=g.plotWidth-a.plotY,f=g.plotHeight-a.plotX));c&&!d&&(a=c.getPlotBox(),b+=a.translateX,f+=a.translateY);return{x:b,y:f}};h.pointToOptions=function(a){return{x:a.x,y:a.y,xAxis:a.series.xAxis,yAxis:a.series.yAxis}};a.extend(h.prototype,{mock:!0,hasDynamicOptions:function(){return"function"===typeof this.options},getOptions:function(){return this.hasDynamicOptions()?
this.options(this.target):this.options},applyOptions:function(a){this.command=a.command;this.setAxis(a,"x");this.setAxis(a,"y");this.refresh()},setAxis:function(e,d){d+="Axis";e=e[d];var c=this.series.chart;this.series[d]=e instanceof a.Axis?e:a.defined(e)?c[d][e]||c.get(e):null},toAnchor:function(){var a=[this.plotX,this.plotY,0,0];this.series.chart.inverted&&(a[0]=this.plotY,a[1]=this.plotX);return a},getLabelConfig:function(){return{x:this.x,y:this.y,point:this}},isInsidePane:function(){var e=
this.plotX,d=this.plotY,c=this.series.xAxis,g=this.series.yAxis,b=!0;c&&(b=a.defined(e)&&0<=e&&e<=c.len);g&&(b=b&&a.defined(d)&&0<=d&&d<=g.len);return b},refresh:function(){var a=this.series,d=a.xAxis,a=a.yAxis,c=this.getOptions();d?(this.x=c.x,this.plotX=d.toPixels(c.x,!0)):(this.x=null,this.plotX=c.x);a?(this.y=c.y,this.plotY=a.toPixels(c.y,!0)):(this.y=null,this.plotY=c.y);this.isInside=this.isInsidePane()},translate:function(a,d,c,g){this.hasDynamicOptions()||(this.plotX+=c,this.plotY+=g,this.refreshOptions())},
scale:function(a,d,c,g){if(!this.hasDynamicOptions()){var b=this.plotY*g;this.plotX=(1-c)*a+this.plotX*c;this.plotY=(1-g)*d+b;this.refreshOptions()}},rotate:function(a,d,c){if(!this.hasDynamicOptions()){var g=Math.cos(c);c=Math.sin(c);var b=this.plotX,f=this.plotY,b=b-a,f=f-d;this.plotX=b*g-f*c+a;this.plotY=b*c+f*g+d;this.refreshOptions()}},refreshOptions:function(){var a=this.series,d=a.xAxis,a=a.yAxis;this.x=this.options.x=d?this.options.x=d.toValue(this.plotX,!0):this.plotX;this.y=this.options.y=
a?a.toValue(this.plotY,!0):this.plotY}});return h}(n),y=function(a,h,e){return{init:function(a,c,g){this.annotation=a;this.chart=a.chart;this.options=c;this.points=[];this.controlPoints=[];this.index=g;this.linkPoints();this.addControlPoints()},attr:function(){this.graphic.attr.apply(this.graphic,arguments)},getPointsOptions:function(){var d=this.options;return d.points||d.point&&a.splat(d.point)},attrsFromOptions:function(a){var c=this.constructor.attrsMap,g={},b,f,d=this.chart.styledMode;for(b in a)f=
c[b],!f||d&&-1!==["fill","stroke","stroke-width"].indexOf(f)||(g[f]=a[b]);return g},anchor:function(d){var c=d.series.getPlotBox();d=d.mock?d.toAnchor():a.Tooltip.prototype.getAnchor.call({chart:d.series.chart},d);d={x:d[0]+(this.options.x||0),y:d[1]+(this.options.y||0),height:d[2]||0,width:d[3]||0};return{relativePosition:d,absolutePosition:a.merge(d,{x:d.x+c.translateX,y:d.y+c.translateY})}},point:function(d,c){if(d&&d.series)return d;c&&null!==c.series||(a.isObject(d)?c=new e(this.chart,this,d):
a.isString(d)?c=this.chart.get(d)||null:"function"===typeof d&&(c=d.call(c,this),c=c.series?c:new e(this.chart,this,d)));return c},linkPoints:function(){var a=this.getPointsOptions(),c=this.points,g=a&&a.length||0,b,f;for(b=0;b<g;b++){f=this.point(a[b],c[b]);if(!f){c.length=0;return}f.mock&&f.refresh();c[b]=f}return c},addControlPoints:function(){var d=this.options.controlPoints;(d||[]).forEach(function(c,g){c=a.merge(this.options.controlPointOptions,c);c.index||(c.index=g);d[g]=c;this.controlPoints.push(new h(this.chart,
this,c))},this)},shouldBeDrawn:function(){return!!this.points.length},render:function(){this.controlPoints.forEach(function(a){a.render()})},redraw:function(a){this.controlPoints.forEach(function(c){c.redraw(a)})},transform:function(a,c,g,b,f){if(this.chart.inverted){var d=c;c=g;g=d}this.points.forEach(function(d,k){this.transformPoint(a,c,g,b,f,k)},this)},transformPoint:function(a,c,g,b,f,p){var d=this.points[p];d.mock||(d=this.points[p]=e.fromPoint(d));d[a](c,g,b,f)},translate:function(a,c){this.transform("translate",
null,null,a,c)},translatePoint:function(a,c,g){this.transformPoint("translate",null,null,a,c,g)},rotate:function(a,c,g){this.transform("rotate",a,c,g)},scale:function(a,c,g,b){this.transform("scale",a,c,g,b)},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(d){var c=this.annotation;d=a.merge(!0,this.options,d);var g=this.graphic.parentGroup;this.destroy();this.constructor(c,d);this.render(g);this.redraw()}}}(n,D,C),z=function(a){var h={arrow:{tagName:"marker",render:!1,id:"arrow",refY:5,refX:9,markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 0 L 10 5 L 0 10 Z",strokeWidth:0}]},"reverse-arrow":{tagName:"marker",render:!1,id:"reverse-arrow",refY:5,refX:1,
markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 5 L 10 0 L 10 10 Z",strokeWidth:0}]}};a.SVGRenderer.prototype.addMarker=function(d,c){var g={id:d},b={stroke:c.color||"none",fill:c.color||"rgba(0, 0, 0, 0.75)"};g.children=c.children.map(function(f){return a.merge(b,f)});c=this.definition(a.merge(!0,{markerWidth:20,markerHeight:20,refX:0,refY:0,orient:"auto"},c,g));c.id=d;return c};var e=function(a){return function(c){this.attr(a,"url(#"+c+")")}},e={markerEndSetter:e("marker-end"),markerStartSetter:e("marker-start"),
setItemMarkers:function(d){var c=d.options,g=d.chart,b=g.options.defs,f=c.fill,p=a.defined(f)&&"none"!==f?f:c.stroke;["markerStart","markerEnd"].forEach(function(f){var k=c[f],l,e,m;if(k){for(m in b)if(l=b[m],k===l.id&&"marker"===l.tagName){e=l;break}e&&(k=d[f]=g.renderer.addMarker((c.id||a.uniqueKey())+"-"+e.id,a.merge(e,{color:p})),d.attr(f,k.attr("id")))}})}};a.SVGRenderer.prototype.definition=function(d){function c(b,f){var d;a.splat(b).forEach(function(b){var k=g.createElement(b.tagName),l={};
a.objectEach(b,function(b,a){"tagName"!==a&&"children"!==a&&"textContent"!==a&&(l[a]=b)});k.attr(l);k.add(f||g.defs);b.textContent&&k.element.appendChild(a.doc.createTextNode(b.textContent));c(b.children||[],k);d=k});return d}var g=this;return c(d)};a.addEvent(a.Chart,"afterGetContainer",function(){this.options.defs=a.merge(h,this.options.defs||{});a.objectEach(this.options.defs,function(a){"marker"===a.tagName&&!1!==a.render&&this.renderer.addMarker(a.id,a)},this)});return e}(n),z=function(a,h,e){function d(a,
b,f){this.init(a,b,f);this.collection="shapes"}var c="rgba(192,192,192,"+(a.svg?.0001:.002)+")";d.attrsMap={dashStyle:"dashstyle",strokeWidth:"stroke-width",stroke:"stroke",fill:"fill",zIndex:"zIndex"};a.merge(!0,d.prototype,h,{type:"path",setMarkers:e.setItemMarkers,toD:function(){var a=this.options.d;if(a)return"function"===typeof a?a.call(this):a;for(var b=this.points,f=b.length,c=f,d=b[0],k=c&&this.anchor(d).absolutePosition,l=0,e=2,a=k&&["M",k.x,k.y];++l<f&&c;)d=b[l],c=d.command||"L",k=this.anchor(d).absolutePosition,
"Z"===c?a[++e]=c:(c!==b[l-1].command&&(a[++e]=c),a[++e]=k.x,a[++e]=k.y),c=d.series.visible;return c?this.chart.renderer.crispLine(a,this.graphic.strokeWidth()):null},shouldBeDrawn:function(){return h.shouldBeDrawn.call(this)||!!this.options.d},render:function(g){var b=this.options,f=this.attrsFromOptions(b);this.graphic=this.annotation.chart.renderer.path(["M",0,0]).attr(f).add(g);b.className&&this.graphic.addClass(b.className);this.tracker=this.annotation.chart.renderer.path(["M",0,0]).addClass("highcharts-tracker-line").attr({zIndex:2}).add(g);
this.annotation.chart.styledMode||this.tracker.attr({"stroke-linejoin":"round",stroke:c,fill:c,"stroke-width":this.graphic.strokeWidth()+2*b.snap});h.render.call(this);a.extend(this.graphic,{markerStartSetter:e.markerStartSetter,markerEndSetter:e.markerEndSetter});this.setMarkers(this)},redraw:function(a){var b=this.toD(),f=a?"animate":"attr";b?(this.graphic[f]({d:b}),this.tracker[f]({d:b})):(this.graphic.attr({d:"M 0 -9000000000"}),this.tracker.attr({d:"M 0 -9000000000"}));this.graphic.placed=this.tracker.placed=
!!b;h.redraw.call(this,a)}});return d}(n,y,z),F=function(a,h,e){function d(a,g,b){this.init(a,g,b);this.collection="shapes"}d.attrsMap=a.merge(e.attrsMap,{width:"width",height:"height"});a.merge(!0,d.prototype,h,{type:"rect",render:function(a){var c=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.rect(0,-9E9,0,0).attr(c).add(a);h.render.call(this)},redraw:function(a){var c=this.anchor(this.points[0]).absolutePosition;if(c)this.graphic[a?"animate":"attr"]({x:c.x,y:c.y,
width:this.options.width,height:this.options.height});else this.attr({x:0,y:-9E9});this.graphic.placed=!!c;h.redraw.call(this,a)},translate:function(a,g){var b=this.annotation.userOptions[this.collection][this.index];this.translatePoint(a,g,0);b.point=this.options.point}});return d}(n,y,z),G=function(a,h,e){function d(a,g,b){this.init(a,g,b);this.collection="shapes"}d.attrsMap=a.merge(e.attrsMap,{r:"r"});a.merge(!0,d.prototype,h,{type:"circle",render:function(a){var c=this.attrsFromOptions(this.options);
this.graphic=this.annotation.chart.renderer.circle(0,-9E9,0).attr(c).add(a);h.render.call(this)},redraw:function(a){var c=this.anchor(this.points[0]).absolutePosition;if(c)this.graphic[a?"animate":"attr"]({x:c.x,y:c.y,r:this.options.r});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!c;h.redraw.call(this,a)},translate:function(a,g){var b=this.annotation.userOptions[this.collection][this.index];this.translatePoint(a,g,0);b.point=this.options.point},setRadius:function(a){this.options.r=a}});
return d}(n,y,z),E=function(a,h,e){function d(a,g,b){this.init(a,g,b);this.collection="labels"}d.shapesWithoutBackground=["connector"];d.alignedPosition=function(a,g){var b=a.align,f=a.verticalAlign,c=(g.x||0)+(a.x||0),d=(g.y||0)+(a.y||0),k,l;"right"===b?k=1:"center"===b&&(k=2);k&&(c+=(g.width-(a.width||0))/k);"bottom"===f?l=1:"middle"===f&&(l=2);l&&(d+=(g.height-(a.height||0))/l);return{x:Math.round(c),y:Math.round(d)}};d.justifiedOptions=function(a,g,b,f){var c=b.align,d=b.verticalAlign,k=g.box?
0:g.padding||0,l=g.getBBox();g={align:c,verticalAlign:d,x:b.x,y:b.y,width:g.width,height:g.height};b=f.x-a.plotLeft;var e=f.y-a.plotTop;f=b+k;0>f&&("right"===c?g.align="left":g.x=-f);f=b+l.width-k;f>a.plotWidth&&("left"===c?g.align="right":g.x=a.plotWidth-f);f=e+k;0>f&&("bottom"===d?g.verticalAlign="top":g.y=-f);f=e+l.height-k;f>a.plotHeight&&("top"===d?g.verticalAlign="bottom":g.y=a.plotHeight-f);return g};d.attrsMap={backgroundColor:"fill",borderColor:"stroke",borderWidth:"stroke-width",zIndex:"zIndex",
borderRadius:"r",padding:"padding"};a.merge(!0,d.prototype,h,{translatePoint:function(a,g){h.translatePoint.call(this,a,g,0)},translate:function(a,g){var b=this.annotation.userOptions[this.collection][this.index];this.options.x+=a;this.options.y+=g;b.x=this.options.x;b.y=this.options.y},render:function(a){var c=this.options,b=this.attrsFromOptions(c),f=c.style;this.graphic=this.annotation.chart.renderer.label("",0,-9E9,c.shape,null,null,c.useHTML,null,"annotation-label").attr(b).add(a);this.annotation.chart.styledMode||
("contrast"===f.color&&(f.color=this.annotation.chart.renderer.getContrast(-1<d.shapesWithoutBackground.indexOf(c.shape)?"#FFFFFF":c.backgroundColor)),this.graphic.css(c.style).shadow(c.shadow));c.className&&this.graphic.addClass(c.className);this.graphic.labelrank=c.labelrank;h.render.call(this)},redraw:function(c){var g=this.options,b=this.text||g.format||g.text,f=this.graphic,d=this.points[0];f.attr({text:b?a.format(b,d.getLabelConfig(),this.annotation.chart.time):g.formatter.call(d,this)});g=
this.anchor(d);(b=this.position(g))?(f.alignAttr=b,b.anchorX=g.absolutePosition.x,b.anchorY=g.absolutePosition.y,f[c?"animate":"attr"](b)):f.attr({x:0,y:-9E9});f.placed=!!b;h.redraw.call(this,c)},anchor:function(){var a=h.anchor.apply(this,arguments),g=this.options.x||0,b=this.options.y||0;a.absolutePosition.x-=g;a.absolutePosition.y-=b;a.relativePosition.x-=g;a.relativePosition.y-=b;return a},position:function(c){var g=this.graphic,b=this.annotation.chart,f=this.points[0],p=this.options,h=c.absolutePosition,
k=c.relativePosition,l;if(c=f.series.visible&&e.prototype.isInsidePane.call(f))p.distance?l=a.Tooltip.prototype.getPosition.call({chart:b,distance:a.pick(p.distance,16)},g.width,g.height,{plotX:k.x,plotY:k.y,negative:f.negative,ttBelow:f.ttBelow,h:k.height||k.width}):p.positioner?l=p.positioner.call(this):(f={x:h.x,y:h.y,width:0,height:0},l=d.alignedPosition(a.extend(p,{width:g.width,height:g.height}),f),"justify"===this.options.overflow&&(l=d.alignedPosition(d.justifiedOptions(b,g,p,l),f))),p.crop&&
(p=l.x-b.plotLeft,f=l.y-b.plotTop,c=b.isInsidePlot(p,f)&&b.isInsidePlot(p+g.width,f+g.height));return c?l:null}});a.SVGRenderer.prototype.symbols.connector=function(c,g,b,f,d){var e=d&&d.anchorX;d=d&&d.anchorY;var k,l,p=b/2;a.isNumber(e)&&a.isNumber(d)&&(k=["M",e,d],l=g-d,0>l&&(l=-f-l),l<b&&(p=e<c+b/2?l:b-l),d>g+f?k.push("L",c+p,g+f):d<g?k.push("L",c+p,g):e<c?k.push("L",c,g+f/2):e>c+b&&k.push("L",c+b,g+f/2));return k||[]};return d}(n,y,C),H=function(a,h,e){function d(a,d,b){this.init(a,d,b);this.collection=
"shapes"}d.attrsMap={width:"width",height:"height",zIndex:"zIndex"};a.merge(!0,d.prototype,h,{type:"image",render:function(a){var c=this.attrsFromOptions(this.options),b=this.options;this.graphic=this.annotation.chart.renderer.image(b.src,0,-9E9,b.width,b.height).attr(c).add(a);this.graphic.width=b.width;this.graphic.height=b.height;h.render.call(this)},redraw:function(a){var c=this.anchor(this.points[0]);if(c=e.prototype.position.call(this,c))this.graphic[a?"animate":"attr"]({x:c.x,y:c.y});else this.graphic.attr({x:0,
y:-9E9});this.graphic.placed=!!c;h.redraw.call(this,a)},translate:function(a,d){var b=this.annotation.userOptions[this.collection][this.index];this.translatePoint(a,d,0);b.point=this.options.point}});return d}(n,y,E);(function(a,h,e,d,c,g,b,f,p,w){var k=a.merge,l=a.addEvent,r=a.defined,m=a.erase,u=a.find,q=a.isString,v=a.pick,B=a.reduce,I=a.splat,x=a.destroyObjectProperties,t=a.Annotation=function(a,b){var f;this.chart=a;this.points=[];this.controlPoints=[];this.coll="annotations";this.labels=[];
this.shapes=[];this.options=b;this.userOptions=k(!0,{},b);f=this.getLabelsAndShapesOptions(this.userOptions,b);this.userOptions.labels=f.labels;this.userOptions.shapes=f.shapes;this.init(a,b)};k(!0,t.prototype,h,f,{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 r(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 f={};["labels","shapes"].forEach(function(c){a[c]&&(f[c]=I(b[c]).map(function(b,f){return k(a[c][f],b)}))});return f},addShapes:function(){(this.options.shapes||[]).forEach(function(a,b){a=this.initShape(a,b);this.options.shapes[b]=a.options},this)},addLabels:function(){(this.options.labels||[]).forEach(function(a,b){a=this.initLabel(a,b);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,f=B((this.options.labels||[]).concat(this.options.shapes||[]),function(f,k){return[a[k&&k.point&&k.point.xAxis]||f[0],b[k&&k.point&&k.point.yAxis]||f[1]]},[]);this.clipXAxis=f[0];this.clipYAxis=f[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=k(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);h.redraw.call(this,a)},redrawItems:function(a,b){for(var f=a.length;f--;)this.redrawItem(a[f],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();h.render.call(this)},setVisibility:function(a){var b=this.options;a=v(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)};h.setControlPointsVisibility.call(this,a);this.shapes.forEach(b);this.labels.forEach(b)},destroy:function(){var a=this.chart,b=function(a){a.destroy()};this.labels.forEach(b);this.shapes.forEach(b);this.clipYAxis=this.clipXAxis=null;m(a.labelCollectors,this.labelCollector);f.destroy.call(this);h.destroy.call(this);x(this,a)},remove:function(){return this.destroy()},
update:function(b){var f=this.chart,k=this.getLabelsAndShapesOptions(this.userOptions,b),c=f.annotations.indexOf(this);b=a.merge(!0,this.userOptions,b);b.labels=k.labels;b.shapes=k.shapes;this.destroy();this.constructor(f,b);f.options.annotations[c]=b;this.redraw()},initShape:function(a,b){a=k(this.options.shapeOptions,{controlPointOptions:this.options.controlPointOptions},a);b=new t.shapesMap[a.type](this,a,b);b.itemType="shape";this.shapes.push(b);return b},initLabel:function(a,f){a=k(this.options.labelOptions,
{controlPointOptions:this.options.controlPointOptions},a);f=new b(this,a,f);f.itemType="label";this.labels.push(f);return f},redrawItem:function(b,f){b.linkPoints();b.shouldBeDrawn()?(b.graphic||this.renderItem(b),b.redraw(a.pick(f,!0)&&b.graphic.placed),b.points.length&&this.adjustVisibility(b)):this.destroyItem(b)},adjustVisibility:function(a){var b=!1,f=a.graphic;a.points.forEach(function(a){!1!==a.series.visible&&!1!==a.visible&&(b=!0)});b?"hidden"===f.visibility&&f.show():f.hide()},destroyItem:function(a){m(this[a.itemType+
"s"],a);a.destroy()},renderItem:function(a){a.render("label"===a.itemType?this.labelsGroup:this.shapesGroup)}});t.shapesMap={rect:e,circle:d,path:c,image:g};t.types={};t.MockPoint=p;t.ControlPoint=w;a.extendAnnotation=function(a,b,f,c){b=b||t;k(!0,a.prototype,b.prototype,f);a.prototype.defaultOptions=k(a.prototype.defaultOptions,c||{})};a.Chart.prototype.collectionsWithUpdate.push("annotations");a.extend(a.Chart.prototype,{initAnnotation:function(b){var f=t.types[b.type]||t;b=a.merge(f.prototype.defaultOptions,
b);f=new f(this,b);this.annotations.push(f);return f},addAnnotation:function(a,b){a=this.initAnnotation(a);this.options.annotations.push(a.options);v(b,!0)&&a.redraw();return a},removeAnnotation:function(a){var b=this.annotations,f=q(a)?u(b,function(b){return b.options.id===a}):a;f&&(m(this.options.annotations,f.options),m(b,f),f.destroy())},drawAnnotations:function(){this.plotBoxClip.attr(this.plotBox);this.annotations.forEach(function(a){a.redraw()})}});a.Chart.prototype.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,f){b=a.initAnnotation(b);a.options.annotations[f]=b.options});a.drawAnnotations();l(a,"redraw",a.drawAnnotations);l(a,"destroy",function(){a.plotBoxClip.destroy();a.controlPointsGroup.destroy()})})})(n,y,F,G,z,H,E,A,C,D);(function(a){function h(){e.apply(this,
arguments)}var e=a.Annotation,d=e.MockPoint,c=e.ControlPoint;a.extendAnnotation(h,null,{setClipAxes:function(){this.clipXAxis=this.chart.xAxis[this.options.typeOptions.xAxis];this.clipYAxis=this.chart.yAxis[this.options.typeOptions.yAxis]},getPointsOptions:function(){var a=this.options.typeOptions;return a.points.map(function(b){b.xAxis=a.xAxis;b.yAxis=a.yAxis;return b})},getControlPointsOptions:function(){return this.getPointsOptions()},addControlPoints:function(){this.getControlPointsOptions().forEach(function(d,
b){b=new c(this.chart,this,a.merge(this.options.controlPointOptions,d.controlPoint),b);this.controlPoints.push(b);d.controlPoint=b.options},this)},addShapes:function(){var c=this.options.typeOptions,b=this.initShape(a.merge(c.line,{type:"path",points:this.points.map(function(a,b){return function(a){return a.annotation.points[b]}})}),!1);c.line=b.options}},{typeOptions:{xAxis:0,yAxis:0,line:{fill:"none"}},controlPointOptions:{positioner:function(a){var b=this.graphic;a=d.pointToPixels(a.points[this.index]);
return{x:a.x-b.width/2,y:a.y-b.height/2}},events:{drag:function(a,b){b.chart.isInsidePlot(a.chartX-b.chart.plotLeft,a.chartY-b.chart.plotTop)&&(a=this.mouseMoveToTranslation(a),b.translatePoint(a.x,a.y,this.index),b.options.typeOptions.points[this.index].x=b.points[this.index].x,b.options.typeOptions.points[this.index].y=b.points[this.index].y,b.redraw(!1))}}}});return e.types.crookedLine=h})(n);(function(a){function h(){d.apply(this,arguments)}var e=a.Annotation,d=e.types.crookedLine;a.extendAnnotation(h,
d,{addLabels:function(){this.getPointsOptions().forEach(function(c,d){var b=this.initLabel(a.merge(c.label,{text:this.options.typeOptions.labels[d],point:function(a){return a.annotation.points[d]}}),!1);c.label=b.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 e.types.elliottWave=h})(n);(function(a){function h(){d.apply(this,
arguments)}var e=a.Annotation,d=e.types.crookedLine,c=e.ControlPoint,g=e.MockPoint;a.extendAnnotation(h,d,{getPointsOptions:function(){var a=d.prototype.getPointsOptions.call(this);a[2]=this.heightPointOptions(a[1]);a[3]=this.heightPointOptions(a[0]);return a},getControlPointsOptions:function(){return this.getPointsOptions().slice(0,2)},heightPointOptions:function(b){b=a.merge(b);b.y+=this.options.typeOptions.height;return b},addControlPoints:function(){d.prototype.addControlPoints.call(this);var b=
this.options,f=new c(this.chart,this,a.merge(b.controlPointOptions,b.typeOptions.heightControlPoint),2);this.controlPoints.push(f);b.typeOptions.heightControlPoint=f.options},addShapes:function(){this.addLine();this.addBackground()},addLine:function(){var b=this.initShape(a.merge(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=b.options},
addBackground:function(){var b=this.initShape(a.merge(this.options.typeOptions.background,{type:"path",points:this.points.slice()}));this.options.typeOptions.background=b.options},translateSide:function(a,f,c){c=Number(c);var b=0===c?3:2;this.translatePoint(a,f,c);this.translatePoint(a,f,b)},translateHeight:function(a){this.translatePoint(0,a,2);this.translatePoint(0,a,3);this.options.typeOptions.height=this.points[3].y-this.points[0].y}},{typeOptions:{xAxis:0,yAxis:0,background:{fill:"rgba(130, 170, 255, 0.4)",
strokeWidth:0},line:{strokeWidth:1},height:-2,heightControlPoint:{positioner:function(a){var b=g.pointToPixels(a.points[2]);a=g.pointToPixels(a.points[3]);var c=(b.x+a.x)/2;return{x:c-this.graphic.width/2,y:(a.y-b.y)/(a.x-b.x)*(c-b.x)+b.y-this.graphic.height/2}},events:{drag:function(a,f){f.chart.isInsidePlot(a.chartX-f.chart.plotLeft,a.chartY-f.chart.plotTop)&&(f.translateHeight(this.mouseMoveToTranslation(a).y),f.redraw(!1))}}}},controlPointOptions:{events:{drag:function(a,f){f.chart.isInsidePlot(a.chartX-
f.chart.plotLeft,a.chartY-f.chart.plotTop)&&(a=this.mouseMoveToTranslation(a),f.translateSide(a.x,a.y,this.index),f.redraw(!1))}}}});return e.types.tunnel=h})(n);(function(a){function h(){c.apply(this,arguments)}var e=a.Annotation,d=e.MockPoint,c=e.types.crookedLine;h.findEdgeCoordinate=function(a,f,c,d){var b="x"===c?"y":"x";return(f[c]-a[c])*(d-a[b])/(f[b]-a[b])+a[c]};h.findEdgePoint=function(a,f){var b=a.series.xAxis,c=f.series.yAxis,k=d.pointToPixels(a),l=d.pointToPixels(f),e=l.x-k.x,m=l.y-k.y;
f=b.left;var g=f+b.width,b=c.top,c=b+c.height,q=0>e?f:g,v=0>m?b:c,g={x:0===e?k.x:q,y:0===m?k.y:v};0!==e&&0!==m&&(e=h.findEdgeCoordinate(k,l,"y",q),k=h.findEdgeCoordinate(k,l,"x",v),e>=b&&e<=c?(g.x=q,g.y=e):(g.x=k,g.y=v));g.x-=f;g.y-=b;a.series.chart.inverted&&(a=g.x,g.x=g.y,g.y=a);return g};var g=function(a,f){return function(b){b=b.annotation;var c=b.points,k=b.options.typeOptions.type;"horizontalLine"===k?c=[c[0],new d(b.chart,c[0].target,{x:c[0].x+1,y:c[0].y,xAxis:c[0].options.xAxis,yAxis:c[0].options.yAxis})]:
"verticalLine"===k&&(c=[c[0],new d(b.chart,c[0].target,{x:c[0].x,y:c[0].y+1,xAxis:c[0].options.xAxis,yAxis:c[0].options.yAxis})]);return h.findEdgePoint(c[a],c[f])}};h.endEdgePoint=g(0,1);h.startEdgePoint=g(1,0);a.extendAnnotation(h,c,{addShapes:function(){var b=this.options.typeOptions,f=[this.points[0],h.endEdgePoint];b.type.match(/Line/g)&&(f[0]=h.startEdgePoint);f=this.initShape(a.merge(b.line,{type:"path",points:f}),!1);b.line=f.options}});return e.types.infinityLine=h})(n);(function(a){function h(){this.startRetracements=
[];this.endRetracements=[];c.apply(this,arguments)}var e=a.Annotation,d=e.MockPoint,c=e.types.tunnel,g=function(a,f){return function(){var b=this.annotation,c=this.anchor(b.startRetracements[a]).absolutePosition,k=this.anchor(b.endRetracements[a]).absolutePosition,c=["M",Math.round(c.x),Math.round(c.y),"L",Math.round(k.x),Math.round(k.y)];f&&(k=this.anchor(b.endRetracements[a-1]).absolutePosition,b=this.anchor(b.startRetracements[a-1]).absolutePosition,c.push("L",Math.round(k.x),Math.round(k.y),"L",
Math.round(b.x),Math.round(b.y)));return c}};h.levels=[0,.236,.382,.5,.618,.786,1];a.extendAnnotation(h,c,{linkPoints:function(){c.prototype.linkPoints.call(this);this.linkRetracementsPoints()},linkRetracementsPoints:function(){var a=this.points,f=a[0].y-a[3].y,c=a[1].y-a[2].y,d=a[0].x,k=a[1].x;h.levels.forEach(function(b,g){var l=a[1].y-c*b;this.linkRetracementPoint(g,d,a[0].y-f*b,this.startRetracements);this.linkRetracementPoint(g,k,l,this.endRetracements)},this)},linkRetracementPoint:function(a,
f,c,g){var b=g[a],l=this.options.typeOptions;b?(b.options.x=f,b.options.y=c,b.refresh()):g[a]=new d(this.chart,this,{x:f,y:c,xAxis:l.xAxis,yAxis:l.yAxis})},addShapes:function(){h.levels.forEach(function(a,f){this.initShape({type:"path",d:g(f)},!1);0<f&&this.initShape({type:"path",fill:this.options.typeOptions.backgroundColors[f-1],strokeWidth:0,d:g(f,!0)})},this)},addLabels:function(){h.levels.forEach(function(b,f){var c=this.options.typeOptions;b=this.initLabel(a.merge(c.labels[f],{point:function(a){return d.pointToOptions(a.annotation.startRetracements[f])},
text:b.toString()}));c.labels[f]=b.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 e.types.fibonacci=h})(n);(function(a){function h(){c.apply(this,
arguments)}var e=a.Annotation,d=e.MockPoint,c=e.types.infinityLine;h.findEdgePoint=function(a,f,c){f=Math.atan2(c.plotY-f.plotY,c.plotX-f.plotX);return{x:a.plotX+1E7*Math.cos(f),y:a.plotY+1E7*Math.sin(f)}};h.middleLineEdgePoint=function(a){var b=a.annotation;return c.findEdgePoint(b.points[0],new d(b.chart,a,b.midPointOptions()))};var g=function(a){return function(b){var c=b.annotation,f=c.points;return h.findEdgePoint(f[a],f[0],new d(c.chart,b,c.midPointOptions()))}};h.topLineEdgePoint=g(1);h.bottomLineEdgePoint=
g(0);a.extendAnnotation(h,c,{midPointOptions:function(){var a=this.points;return{x:(a[1].x+a[2].x)/2,y:(a[1].y+a[2].y)/2,xAxis:a[0].series.xAxis,yAxis:a[0].series.yAxis}},addShapes:function(){this.addLines();this.addBackgrounds()},addLines:function(){this.initShape({type:"path",points:[this.points[0],h.middleLineEdgePoint]},!1);this.initShape({type:"path",points:[this.points[1],h.topLineEdgePoint]},!1);this.initShape({type:"path",points:[this.points[2],h.bottomLineEdgePoint]},!1)},addBackgrounds:function(){var b=
this.shapes,c=this.options.typeOptions,d=this.initShape(a.merge(c.innerBackground,{type:"path",points:[function(a){var b=a.annotation;a=b.points;b=b.midPointOptions();return{x:(a[1].x+b.x)/2,y:(a[1].y+b.y)/2,xAxis:b.xAxis,yAxis:b.yAxis}},b[1].points[1],b[2].points[1],function(a){var b=a.annotation;a=b.points;b=b.midPointOptions();return{x:(b.x+a[2].x)/2,y:(b.y+a[2].y)/2,xAxis:b.xAxis,yAxis:b.yAxis}}]})),b=this.initShape(a.merge(c.outerBackground,{type:"path",points:[this.points[1],b[1].points[1],
b[2].points[1],this.points[2]]}));c.innerBackground=d.options;c.outerBackground=b.options}},{typeOptions:{innerBackground:{fill:"rgba(130, 170, 255, 0.4)",strokeWidth:0},outerBackground:{fill:"rgba(156, 229, 161, 0.4)",strokeWidth:0}}});return e.types.pitchfork=h})(n);(function(a){function h(){a.Annotation.apply(this,arguments)}var e=a.Annotation,d=e.MockPoint;h.connectorFirstPoint=function(a){a=a.annotation;var c=a.points[0],b=d.pointToPixels(c,!0),f=b.y,e=a.options.typeOptions.label.offset;a.chart.inverted&&
(f=b.x);return{x:c.x,xAxis:c.series.xAxis,y:f+e}};h.connectorSecondPoint=function(a){var c=a.annotation;a=c.options.typeOptions;var b=c.points[0],f=a.yOffset,c=d.pointToPixels(b,!0)[c.chart.inverted?"x":"y"];0>a.label.offset&&(f*=-1);return{x:b.x,xAxis:b.series.xAxis,y:c+f}};a.extendAnnotation(h,null,{getPointsOptions:function(){return[this.options.typeOptions.point]},addShapes:function(){var c=this.options.typeOptions,d=this.initShape(a.merge(c.connector,{type:"path",points:[h.connectorFirstPoint,
h.connectorSecondPoint]}),!1);c.connector=d.options},addLabels:function(){var c=this.options.typeOptions,d=c.label,b=0,f=d.offset,e=0>d.offset?"bottom":"top",h="center";this.chart.inverted&&(b=d.offset,f=0,e="middle",h=0>d.offset?"right":"left");d=this.initLabel(a.merge(d,{verticalAlign:e,align:h,x:b,y:f}));c.label=d.options}},{typeOptions:{yOffset:10,label:{offset:-40,point:function(a){return a.annotation.points[0]},allowOverlap:!0,backgroundColor:"none",borderWidth:0,crop:!0,overflow:"none",shape:"rect",
text:"{y:.2f}"},connector:{strokeWidth:1,markerEnd:"arrow"}}});return e.types.verticalLine=h})(n);(function(a){function h(){e.apply(this,arguments)}var e=a.Annotation,d=e.ControlPoint,c=a.merge,g=a.isNumber;e.types.measure=h;a.extendAnnotation(h,null,{init:function(){e.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.options.points},shapePointsOptions:function(){var a=this.options.typeOptions,c=a.xAxis,a=a.yAxis;return[{x:this.xAxisMin,y:this.yAxisMin,xAxis:c,yAxis:a},{x:this.xAxisMax,y:this.yAxisMin,xAxis:c,yAxis:a},{x:this.xAxisMax,y:this.yAxisMax,xAxis:c,yAxis:a},{x:this.xAxisMin,y:this.yAxisMax,xAxis:c,yAxis:a}]},addControlPoints:function(){var a=this.options.typeOptions.selectType,c;c=new d(this.chart,
this,this.options.controlPointOptions,0);this.controlPoints.push(c);"xy"!==a&&(c=new d(this.chart,this,this.options.controlPointOptions,1),this.controlPoints.push(c))},addValues:function(b){var c=this.options.typeOptions,d=c.label.formatter,e=this.options.typeOptions,k=this.chart,l=k.options.chart.inverted,g=k.xAxis[e.xAxis],m=k.yAxis[e.yAxis];this.calculations.recalculate.call(this,b);c.label.enabled&&(0<this.labels.length?this.labels[0].text=d&&d.call(this)||this.calculations.defaultFormatter.call(this):
this.initLabel(a.extend({shape:"rect",backgroundColor:"none",color:"black",borderWidth:0,dashStyle:"dash",overflow:"none",align:"left",vertical:"top",crop:!0,point:function(a){a=a.annotation;var b=k.plotTop,c=k.plotLeft;return{x:(l?b:10)+g.toPixels(a.xAxisMin,!l),y:(l?-c+10:b)+m.toPixels(a.yAxisMin)}},text:d&&d.call(this)||this.calculations.defaultFormatter.call(this)},c.label)))},addShapes:function(){this.addCrosshairs();this.addBackground()},addBackground:function(){void 0!==this.shapePointsOptions()[0].x&&
this.initShape(a.extend({type:"path",points:this.shapePointsOptions()},this.options.typeOptions.background),!1)},addCrosshairs:function(){var b=this.chart,f=this.options.typeOptions,d=this.options.typeOptions.point,e=b.xAxis[f.xAxis],k=b.yAxis[f.yAxis],l=b.options.chart.inverted,g=e.toPixels(this.xAxisMin),m=e.toPixels(this.xAxisMax),h=k.toPixels(this.yAxisMin),q=k.toPixels(this.yAxisMax),v={point:d,type:"path"},d=[],b=[];l&&(g=k.toPixels(this.yAxisMin),m=k.toPixels(this.yAxisMax),h=e.toPixels(this.xAxisMin),
q=e.toPixels(this.xAxisMax));f.crosshairX.enabled&&(d=["M",g,h+(q-h)/2,"L",m,h+(q-h)/2]);f.crosshairY.enabled&&(b=["M",g+(m-g)/2,h,"L",g+(m-g)/2,q]);0<this.shapes.length?(this.shapes[0].options.d=d,this.shapes[1].options.d=b):(e=c(v,f.crosshairX),f=c(v,f.crosshairY),this.initShape(a.extend({d:d},e),!1),this.initShape(a.extend({d:b},f),!1))},onDrag:function(a){var b=this.mouseMoveToTranslation(a),c=this.options.typeOptions.selectType;a="y"===c?0:b.x;b="x"===c?0:b.y;this.translate(a,b);this.offsetX+=
a;this.offsetY+=b;this.redraw(!1,!1,!0)},resize:function(a,c,d,e){var b=this.shapes[2];"x"===e?0===d?(b.translatePoint(a,0,0),b.translatePoint(a,c,3)):(b.translatePoint(a,0,1),b.translatePoint(a,c,2)):"y"===e?0===d?(b.translatePoint(0,c,0),b.translatePoint(0,c,1)):(b.translatePoint(0,c,2),b.translatePoint(0,c,3)):(b.translatePoint(a,0,1),b.translatePoint(a,c,2),b.translatePoint(0,c,3));this.calculations.updateStartPoints.call(this,!1,!0,d,a,c);this.options.typeOptions.background.height=Math.abs(this.startYMax-
this.startYMin);this.options.typeOptions.background.width=Math.abs(this.startXMax-this.startXMin)},redraw:function(a,c,d){this.linkPoints();this.graphic||this.render();d&&this.calculations.updateStartPoints.call(this,!0,!1);this.addValues(c);this.addCrosshairs();this.redrawItems(this.shapes,a);this.redrawItems(this.labels,a);this.controlPoints.forEach(function(a){a.redraw()})},translate:function(a,c){this.shapes.forEach(function(b){b.translate(a,c)});this.options.typeOptions.point.x=this.startXMin;
this.options.typeOptions.point.y=this.startYMin},calculations:{init:function(){var a=this.options.typeOptions,c=this.chart,d=this.calculations.getPointPos,e=c.options.chart.inverted,k=c.xAxis[a.xAxis],l=c.yAxis[a.yAxis],h=a.background,m=e?h.height:h.width,e=e?h.width:h.height,h=a.selectType,u=c.plotTop,q=c.plotLeft;this.startXMin=a.point.x;this.startYMin=a.point.y;g(m)?this.startXMax=this.startXMin+m:this.startXMax=d(k,this.startXMin,parseFloat(m));g(e)?this.startYMax=this.startYMin-e:this.startYMax=
d(l,this.startYMin,parseFloat(e));"x"===h?(this.startYMin=l.toValue(u),this.startYMax=l.toValue(u+c.plotHeight)):"y"===h&&(this.startXMin=k.toValue(q),this.startXMax=k.toValue(q+c.plotWidth))},recalculate:function(a){var b=this.calculations,c=this.options.typeOptions,d=this.chart.xAxis[c.xAxis],c=this.chart.yAxis[c.yAxis],k=this.calculations.getPointPos,e=this.offsetX,g=this.offsetY;this.xAxisMin=k(d,this.startXMin,e);this.xAxisMax=k(d,this.startXMax,e);this.yAxisMin=k(c,this.startYMin,g);this.yAxisMax=
k(c,this.startYMax,g);this.min=b.min.call(this);this.max=b.max.call(this);this.average=b.average.call(this);this.bins=b.bins.call(this);a&&this.resize(0,0)},getPointPos:function(a,c,d){return a.toValue(a.toPixels(c)+d)},updateStartPoints:function(a,c,d,e,k){var b=this.options.typeOptions,f=b.selectType,g=this.chart.xAxis[b.xAxis],b=this.chart.yAxis[b.yAxis],h=this.calculations.getPointPos,q=this.startXMin,v=this.startXMax,B=this.startYMin,p=this.startYMax,x=this.offsetX,w=this.offsetY;c&&("x"===f?
0===d?this.startXMin=h(g,q,e):this.startXMax=h(g,v,e):"y"===f?0===d?this.startYMin=h(b,B,k):this.startYMax=h(b,p,k):(this.startXMax=h(g,v,e),this.startYMax=h(b,p,k)));a&&(this.startXMin=h(g,q,x),this.startXMax=h(g,v,x),this.startYMin=h(b,B,w),this.startYMax=h(b,p,w),this.offsetY=this.offsetX=0)},defaultFormatter:function(){return"Min: "+this.min+"\x3cbr\x3eMax: "+this.max+"\x3cbr\x3eAverage: "+this.average+"\x3cbr\x3eBins: "+this.bins},getExtremes:function(a,c,d,e){return{xAxisMin:Math.min(c,a),xAxisMax:Math.max(c,
a),yAxisMin:Math.min(e,d),yAxisMax:Math.max(e,d)}},min:function(){var a=Infinity,c=this.chart.series,d=this.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),e=!1;c.forEach(function(b){b.visible&&"highcharts-navigator-series"!==b.options.id&&b.points.forEach(function(b){!b.isNull&&b.y<a&&b.x>d.xAxisMin&&b.x<=d.xAxisMax&&b.y>d.yAxisMin&&b.y<=d.yAxisMax&&(a=b.y,e=!0)})});e||(a="");return a},max:function(){var a=-Infinity,c=this.chart.series,d=this.calculations.getExtremes(this.xAxisMin,
this.xAxisMax,this.yAxisMin,this.yAxisMax),e=!1;c.forEach(function(b){b.visible&&"highcharts-navigator-series"!==b.options.id&&b.points.forEach(function(b){!b.isNull&&b.y>a&&b.x>d.xAxisMin&&b.x<=d.xAxisMax&&b.y>d.yAxisMin&&b.y<=d.yAxisMax&&(a=b.y,e=!0)})});e||(a="");return a},average:function(){var a="";""!==this.max&&""!==this.min&&(a=(this.max+this.min)/2);return a},bins:function(){var a=0,c=this.chart.series,d=this.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),
e=!1;c.forEach(function(b){b.visible&&"highcharts-navigator-series"!==b.options.id&&b.points.forEach(function(b){!b.isNull&&b.x>d.xAxisMin&&b.x<=d.xAxisMax&&b.y>d.yAxisMin&&b.y<=d.yAxisMax&&(a++,e=!0)})});e||(a="");return a}}},{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(a){var b=this.index,c=a.chart,d=a.options,e=d.typeOptions,g=e.selectType,d=d.controlPointOptions,h=c.options.chart.inverted,m=c.xAxis[e.xAxis],c=c.yAxis[e.yAxis],e=a.xAxisMax,u=a.yAxisMax,q=a.calculations.getExtremes(a.xAxisMin,a.xAxisMax,a.yAxisMin,a.yAxisMax);"x"===g&&(u=(q.yAxisMax-q.yAxisMin)/2,0===b&&(e=a.xAxisMin));"y"===g&&(e=q.xAxisMin+(q.xAxisMax-q.xAxisMin)/2,0===b&&(u=a.yAxisMin));h?(a=c.toPixels(u),b=m.toPixels(e)):
(a=m.toPixels(e),b=c.toPixels(u));return{x:a-d.width/2,y:b-d.height/2}},events:{drag:function(a,c){var b=this.mouseMoveToTranslation(a);a=c.options.typeOptions.selectType;var d="y"===a?0:b.x,b="x"===a?0:b.y;c.resize(d,b,this.index,a);c.resizeX+=d;c.resizeY+=b;c.redraw(!1,!0)}}}});return e.types.measure=h})(n);A=function(){return{initUpdate:function(a){a.navigation||(a.navigation={updates:[],update:function(a,e){this.updates.forEach(function(d){d.update.call(d.context,a,e)})}})},addUpdate:function(a,
h){h.navigation||this.initUpdate(h);h.navigation.updates.push({update:a,context:h})}}}();(function(a,h){function e(b){var c=b.prototype.defaultOptions.events&&b.prototype.defaultOptions.events.click;a.merge(!0,b.prototype.defaultOptions.events,{click:function(a){var b=this,d=b.chart.navigationBindings,e=d.activeAnnotation;c&&c.click.call(b,a);e!==b?(d.deselectAnnotation(),d.activeAnnotation=b,b.setControlPointsVisibility(!0),n(d,"showPopup",{annotation:b,formType:"annotation-toolbar",options:d.annotationToFields(b),
onSubmit:function(a){var c={};"remove"===a.actionType?(d.activeAnnotation=!1,d.chart.removeAnnotation(b)):(d.fieldsToOptions(a.fields,c),d.deselectAnnotation(),a=c.typeOptions,"measure"===b.options.type&&(a.crosshairY.enabled=0!==a.crosshairY.strokeWidth,a.crosshairX.enabled=0!==a.crosshairX.strokeWidth),b.update(c))}})):(d.deselectAnnotation(),n(d,"closePopup"));a.activeAnnotation=!0}})}var d=a.doc,c=a.addEvent,g=a.pick,b=a.merge,f=a.extend,p=a.isNumber,n=a.fireEvent,k=a.isArray,l=a.isObject,r=a.objectEach;
a.NavigationBindings=function(a,b){this.chart=a;this.options=b;this.eventsToUnbind=[];this.container=d.getElementsByClassName(this.options.bindingsClassName)};a.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:[]};a.NavigationBindings.annotationsNonEditable={rectangle:["crosshairX",
"crosshairY","label"]};f(a.NavigationBindings.prototype,{initEvents:function(){var a=this,b=a.chart,d=a.container,e=a.options;a.boundClassNames={};r(e.bindings,function(b){a.boundClassNames[b.className]=b});[].forEach.call(d,function(b){a.eventsToUnbind.push(c(b,"click",function(b){var c=a.getButtonEvents(d,b);c&&a.bindingsButtonClick(c.button,c.events,b)}))});r(e.events||{},function(b,d){a.eventsToUnbind.push(c(a,d,b))});a.eventsToUnbind.push(c(b.container,"click",function(c){!b.cancelClick&&b.isInsidePlot(c.chartX-
b.plotLeft,c.chartY-b.plotTop)&&a.bindingsChartClick(this,c)}));a.eventsToUnbind.push(c(b.container,"mousemove",function(b){a.bindingsContainerMouseMove(this,b)}))},initUpdate:function(){var a=this;h.addUpdate(function(b){a.update(b)},this.chart)},bindingsButtonClick:function(a,b,c){var d=this.chart;this.selectedButtonElement&&(n(this,"deselectButton",{button:this.selectedButtonElement}),this.nextEvent&&(this.currentUserDetails&&"annotations"===this.currentUserDetails.coll&&d.removeAnnotation(this.currentUserDetails),
this.mouseMoveEvent=this.nextEvent=!1));this.selectedButton=b;this.selectedButtonElement=a;n(this,"selectButton",{button:a});b.init&&b.init.call(this,a,c);(b.start||b.steps)&&d.renderer.boxWrapper.addClass("highcharts-draw-mode")},bindingsChartClick:function(a,b){a=this.selectedButton;var c=this.chart.renderer.boxWrapper;this.activeAnnotation&&!b.activeAnnotation&&b.target.parentNode&&!b.target.closest(".highcharts-popup")&&(n(this,"closePopup"),this.deselectAnnotation());a&&a.start&&(this.nextEvent?
(this.nextEvent(b,this.currentUserDetails),this.steps&&(this.stepIndex++,a.steps[this.stepIndex]?this.mouseMoveEvent=this.nextEvent=a.steps[this.stepIndex]:(n(this,"deselectButton",{button:this.selectedButtonElement}),c.removeClass("highcharts-draw-mode"),a.end&&a.end.call(this,b,this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1,this.selectedButton=null))):(this.currentUserDetails=a.start.call(this,b),a.steps?(this.stepIndex=0,this.steps=!0,this.mouseMoveEvent=this.nextEvent=a.steps[this.stepIndex]):
(n(this,"deselectButton",{button:this.selectedButtonElement}),c.removeClass("highcharts-draw-mode"),this.steps=!1,this.selectedButton=null,a.end&&a.end.call(this,b,this.currentUserDetails))))},bindingsContainerMouseMove:function(a,b){this.mouseMoveEvent&&this.mouseMoveEvent(b,this.currentUserDetails)},fieldsToOptions:function(a,b){r(a,function(a,c){var d=parseFloat(a),e=c.split("."),f=b,k=e.length-1;!p(d)||a.match(/px/g)||c.match(/format/g)||(a=d);""!==a&&"undefined"!==a&&e.forEach(function(b,c){var d=
g(e[c+1],"");k===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(b){function c(d,e,g,q){var m;g&&-1===n.indexOf(e)&&(0<=(g.indexOf&&g.indexOf(e))||g[e]||!0===g)&&(k(d)?(q[e]=[],d.forEach(function(a,b){l(a)?(q[e][b]={},r(a,function(a,d){c(a,d,f[e],q[e][b])})):c(a,0,f[e],q[e])})):l(d)?(m={},k(q)?(q.push(m),m[e]={},m=m[e]):
q[e]=m,r(d,function(a,b){c(a,b,0===e?g:f[e],m)})):"format"===e?q[e]=[a.format(d,b.labels[0].points[0]).toString(),"text"]:k(q)?q.push([d,h(d)]):q[e]=[d,h(d)])}var d=b.options,e=a.NavigationBindings.annotationsEditable,f=e.nestedOptions,h=this.utils.getFieldType,m=g(d.type,d.shapes&&d.shapes[0]&&d.shapes[0].type,d.labels&&d.labels[0]&&d.labels[0].itemType,"label"),n=a.NavigationBindings.annotationsNonEditable[d.langKey]||[],p={langKey:d.langKey,type:m};r(d,function(a,b){"typeOptions"===b?(p[b]={},
r(d[b],function(a,d){c(a,d,f,p[b],!0)})):c(a,b,e[m],p)});return p},getClickedClassNames:function(b,c){var d=c.target;c=[];for(var e;d&&((e=a.attr(d,"class"))&&(c=c.concat(e.split(" ").map(function(a){return[a,d]}))),d=d.parentNode,d!==b););return c},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=b(!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.options.typeOptions,d=this.chart.xAxis[0].toValue(a.chartX);a=this.chart.yAxis[0].toValue(a.chartY);b.update({typeOptions:{background:{width:d-c.point.x,height:c.point.y-a}}})},getFieldType:function(a){return{string:"text",number:"number","boolean":"checkbox"}[typeof a]}}});a.Chart.prototype.initNavigationBindings=function(){var b=
this.options;b&&b.navigation&&b.navigation.bindings&&(this.navigationBindings=new a.NavigationBindings(this,b.navigation),this.navigationBindings.initEvents(),this.navigationBindings.initUpdate())};c(a.Chart,"load",function(){this.initNavigationBindings()});c(a.Chart,"destroy",function(){this.navigationBindings&&this.navigationBindings.destroy()});c(a.NavigationBindings,"deselectButton",function(){this.selectedButtonElement=null});a.Annotation&&(e(a.Annotation),a.objectEach(a.Annotation.types,function(a){e(a)}));
a.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-wrapper",bindings:{circleAnnotation:{className:"highcharts-circle-annotation",start:function(b){var c=this.chart.xAxis[0].toValue(b.chartX);b=this.chart.yAxis[0].toValue(b.chartY);return this.chart.addAnnotation({langKey:"circle",shapes:[{type:"circle",point:{xAxis:0,yAxis:0,x:c,y:b},r:5,controlPoints:[{positioner:function(b){var c=a.Annotation.MockPoint.pointToPixels(b.points[0]);
b=b.options.r;return{x:c.x+b*Math.cos(Math.PI/4)-this.graphic.width/2,y:c.y+b*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)}}}]}]})},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);b.update({shapes:[{r:Math.max(Math.sqrt(Math.pow(d-
a.chartX,2)+Math.pow(c-a.chartY,2)),5)}]})}]},rectangleAnnotation:{className:"highcharts-rectangle-annotation",start:function(b){var c=this.chart.xAxis[0].toValue(b.chartX);b=this.chart.yAxis[0].toValue(b.chartY);return this.chart.addAnnotation({langKey:"rectangle",shapes:[{type:"rect",point:{x:c,y:b,xAxis:0,yAxis:0},width:5,height:5,controlPoints:[{positioner:function(b){var c=a.Annotation.MockPoint.pointToPixels(b.points[0]);return{x:c.x+b.options.width-4,y:c.y+b.options.height-4}},events:{drag:function(a,
b){var c=b.annotation;a=this.mouseMoveToTranslation(a);b.options.width=Math.max(b.options.width+a.x,5);b.options.height=Math.max(b.options.height+a.y,5);c.options.shapes[0]=b.options;c.userOptions.shapes[0]=b.options;b.redraw(!1)}}}]}]})},steps:[function(a,b){var c=this.chart.yAxis[0],d=b.options.shapes[0].point,e=this.chart.xAxis[0].toPixels(d.x),c=c.toPixels(d.y);b.update({shapes:[{width:Math.max(a.chartX-e,5),height:Math.max(a.chartY-c,5),point:{x:d.x,y:d.y}}]})}]},labelAnnotation:{className:"highcharts-label-annotation",
start:function(b){var c=this.chart.xAxis[0].toValue(b.chartX);b=this.chart.yAxis[0].toValue(b.chartY);this.chart.addAnnotation({langKey:"label",labelOptions:{format:"{y:.2f}"},labels:[{point:{x:c,y:b,xAxis:0,yAxis:0},controlPoints:[{symbol:"triangle-down",positioner:function(b){if(!b.graphic.placed)return{x:0,y:-9E7};b=a.Annotation.MockPoint.pointToPixels(b.points[0]);return{x:b.x-this.graphic.width/2,y:b.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)}}}],overflow:"none",crop:!0}]})}}},events:{}}})})(n,A);(function(a){var h=a.addEvent,e=a.createElement,d=a.objectEach,c=a.pick,g=a.wrap,
b=a.isString,f=a.isObject,n=a.isArray,w=/\d/g;g(a.Pointer.prototype,"onContainerMouseDown",function(a,c){var d=c.target&&c.target.className;b(d)&&0<=d.indexOf("highcharts-popup-field")||a.apply(this,Array.prototype.slice.call(arguments,1))});a.Popup=function(a){this.init(a)};a.Popup.prototype={init:function(a){this.container=e("div",{className:"highcharts-popup"},null,a);this.lang=this.getLangpack();this.addCloseBtn()},addCloseBtn:function(){var a=this,b;b=e("div",{className:"highcharts-popup-close"},
null,this.container);["click","touchstart"].forEach(function(c){h(b,c,function(){a.closePopup()})})},addColsContainer:function(a){var b;b=e("div",{className:"highcharts-popup-lhs-col"},null,a);a=e("div",{className:"highcharts-popup-rhs-col"},null,a);e("div",{className:"highcharts-popup-rhs-col-wrapper"},null,a);return{lhsCol:b,rhsCol:a}},addInput:function(a,b,c,d){var f=a.split("."),f=f[f.length-1],g=this.lang;b="highcharts-"+b+"-"+f;b.match(w)||e("label",{innerHTML:g[f]||f,htmlFor:b},null,c);e("input",
{name:b,value:d[0],type:d[1],className:"highcharts-popup-field"},null,c).setAttribute("highcharts-data-name",a)},addButton:function(a,b,c,d,f){var g=this,k=this.closePopup,l=this.getFields,m;m=e("button",{innerHTML:b},null,a);["click","touchstart"].forEach(function(a){h(m,a,function(){k.call(g);return d(l(f,c))})});return m},getFields:function(a,b){var c=a.querySelectorAll("input"),d=a.querySelectorAll("#highcharts-select-series \x3e option:checked")[0];a=a.querySelectorAll("#highcharts-select-volume \x3e option:checked")[0];
var e,f,g;g={actionType:b,linkedTo:d&&d.getAttribute("value"),fields:{}};c.forEach(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 a.getOptions().lang.navigation.popup},
annotations:{addToolbar:function(a,b,d){var f=this,g=this.lang,h=this.popup.container,k=this.showForm,l;-1===h.className.indexOf("highcharts-annotation-toolbar")&&(h.className+=" highcharts-annotation-toolbar");h.style.top=a.plotTop+10+"px";e("span",{innerHTML:c(g[b.langKey]||b.langKey,b.shapes&&b.shapes[0].type)},null,h);l=this.addButton(h,g.removeButton||"remove","remove",d,h);l.className+=" highcharts-annotation-remove-button";l=this.addButton(h,g.editButton||"edit","edit",function(){k.call(f,
"annotation-edit",a,b,d)},h);l.className+=" highcharts-annotation-edit-button"},addForm:function(a,b,c,d){var f=this.popup.container,g=this.lang,h,k;e("h2",{innerHTML:g[b.langKey]||b.langKey,className:"highcharts-popup-main-title"},null,f);k=e("div",{className:"highcharts-popup-lhs-col highcharts-popup-lhs-full"},null,f);h=e("div",{className:"highcharts-popup-bottom-row"},null,f);this.annotations.addFormFields.call(this,k,a,"",b,[],!0);this.addButton(h,d?g.addButton||"add":g.saveButton||"save",d?
"add":"save",c,f)},addFormFields:function(a,b,c,g,h,q){var k=this,l=this.annotations.addFormFields,m=this.addInput,r=this.lang,p,u;d(g,function(d,e){p=""!==c?c+"."+e:e;f(d)&&(!n(d)||n(d)&&f(d[0])?(u=r[e]||e,u.match(w)||h.push([!0,u,a]),l.call(k,a,b,p,d,h,!1)):h.push([k,p,"annotation",a,d]))});q&&(h=h.sort(function(a){return a[1].match(/format/g)?-1:1}),h.forEach(function(a){!0===a[0]?e("span",{className:"highcharts-annotation-title",innerHTML:a[1]},null,a[2]):m.apply(a[0],a.splice(1))}))}},indicators:{addForm:function(a,
b,c){var d=this.indicators,e=this.lang,f;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");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,f){var g=this,k=c.querySelectorAll(".highcharts-popup-lhs-col")[0];c=c.querySelectorAll(".highcharts-popup-rhs-col")[0];var l=a.getOptions(),r="edit"===f,n=r?b.series:l.plotOptions,p=this.indicators.addFormFields,x,t,w;t=e("ul",{className:"highcharts-indicator-list"},null,k);x=c.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];d(n,function(a,c){var d=a.options;if(a.params||d&&d.params){var f=g.indicators.getNameType(a,c),
k=f.type;w=e("li",{className:"highcharts-indicator-list",innerHTML:f.name},null,t);["click","touchstart"].forEach(function(c){h(w,c,function(){p.call(g,b,r?a:n[k],f.type,x);r&&a.options&&e("input",{type:"hidden",name:"highcharts-id-"+k,value:a.options.id},null,x).setAttribute("highcharts-data-series-id",a.options.id)})})}});0<t.childNodes.length&&t.childNodes[0].click()},getNameType:function(b,c){var d=b.options,e=a.seriesTypes,e=e[c]&&e[c].prototype.nameBase||c.toUpperCase();d&&d.type&&(c=b.options.type,
e=b.name);return{name:e,type:c}},listAllSeries:function(a,b,c,d){a="highcharts-"+b+"-type-"+a;var f,g;e("label",{innerHTML:this.lang[b]||b,htmlFor:a},null,d);f=e("select",{name:a,className:"highcharts-popup-field"},null,d);f.setAttribute("id","highcharts-select-"+b);c.series.forEach(function(a){g=a.options;!g.params&&g.id&&"highcharts-navigator-series"!==g.id&&e("option",{innerHTML:g.name||g.id,value:g.id},null,f)})},addFormFields:function(a,b,c,d){var f=b.params||b.options.params,g=this.indicators.getNameType;
d.innerHTML="";e("h3",{className:"highcharts-indicator-title",innerHTML:g(b,c).name},null,d);e("input",{type:"hidden",name:"highcharts-type-"+c,value:c},null,d);this.indicators.listAllSeries.call(this,c,"series",a,d);f.volumeSeriesID&&this.indicators.listAllSeries.call(this,c,"volume",a,d);this.indicators.addParamInputs.call(this,a,"params",f,c,d)},addParamInputs:function(a,b,c,e,g){var h=this,k=this.indicators.addParamInputs,l=this.addInput,m;d(c,function(c,d){m=b+"."+d;f(c)?k.call(h,a,m,c,e,g):
"params.volumeSeriesID"!==m&&l.call(h,m,e,g,[c,"text"])})},getAmount:function(){var a=0;d(this.series,function(b){var c=b.options;(b.params||c&&c.params)&&a++});return a}},tabs:{init:function(a){var b=this.tabs;a=this.indicators.getAmount.call(a);var c;c=b.addMenuItem.call(this,"add");b.addMenuItem.call(this,"edit",a);b.addContentItem.call(this,"add");b.addContentItem.call(this,"edit");b.switchTabs.call(this,a);b.selectTab.call(this,c,0)},addMenuItem:function(a,b){var c=this.popup.container,d="highcharts-tab-item",
f=this.lang;0===b&&(d+=" highcharts-tab-disabled");b=e("span",{innerHTML:f[a+"Button"]||a,className:d},null,c);b.setAttribute("highcharts-data-tab-type",a);return b},addContentItem:function(){return e("div",{className:"highcharts-tab-item-content"},null,this.popup.container)},switchTabs:function(a){var b=this,c;this.popup.container.querySelectorAll(".highcharts-tab-item").forEach(function(d,e){c=d.getAttribute("highcharts-data-tab-type");"edit"===c&&0===a||["click","touchstart"].forEach(function(a){h(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"),c;for(c=0;c<b.length;c++)b[c].classList.remove("highcharts-tab-item-active"),a[c].classList.remove("highcharts-tab-item-show")}}};
h(a.NavigationBindings,"showPopup",function(b){this.popup||(this.popup=new a.Popup(this.chart.container));this.popup.showForm(b.formType,this.chart,b.options,b.onSubmit)});h(a.NavigationBindings,"closePopup",function(){this.popup&&this.popup.closePopup()})})(n)});
//# sourceMappingURL=annotations-advanced.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,94 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Annotations module
(c) 2009-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(m){"object"===typeof module&&module.exports?(m["default"]=m,module.exports=m):"function"===typeof define&&define.amd?define(function(){return m}):m("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(m){var y=function(a){return{addEvents:function(){var e=this;a.addEvent(e.graphic.element,"mousedown",function(d){e.onMouseDown(d)});a.objectEach(e.options.events,function(d,b){var c=function(c){"click"===b&&e.cancelClick||d.call(e,e.chart.pointer.normalize(c),e.target)};if("drag"!==
b)e.graphic.on(b,c);else a.addEvent(e,"drag",c)});e.options.draggable&&(a.addEvent(e,"drag",e.onDrag),e.graphic.renderer.styledMode||e.graphic.css({cursor:{x:"ew-resize",y:"ns-resize",xy:"move"}[e.options.draggable]}))},removeDocEvents:function(){this.removeDrag&&(this.removeDrag=this.removeDrag());this.removeMouseUp&&(this.removeMouseUp=this.removeMouseUp())},onMouseDown:function(e){var d=this,b=d.chart.pointer,c,f;2!==e.button&&(e.stopPropagation(),e=b.normalize(e),c=e.chartX,f=e.chartY,d.cancelClick=
!1,d.removeDrag=a.addEvent(a.doc,"mousemove",function(l){d.hasDragged=!0;l=b.normalize(l);l.prevChartX=c;l.prevChartY=f;a.fireEvent(d,"drag",l);c=l.chartX;f=l.chartY}),d.removeMouseUp=a.addEvent(a.doc,"mouseup",function(c){d.cancelClick=d.hasDragged;d.hasDragged=!1;d.onMouseUp(c)}))},onMouseUp:function(){var a=this.chart,d=this.target||this,b=a.options.annotations,a=a.annotations.indexOf(d);this.removeDocEvents();b[a]=d.options},onDrag:function(a){if(this.chart.isInsidePlot(a.chartX-this.chart.plotLeft,
a.chartY-this.chart.plotTop)){var d=this.mouseMoveToTranslation(a);"x"===this.options.draggable&&(d.y=0);"y"===this.options.draggable&&(d.x=0);this.points.length?this.translate(d.x,d.y):(this.shapes.forEach(function(b){b.translate(d.x,d.y)}),this.labels.forEach(function(b){b.translate(d.x,d.y)}));this.redraw(!1)}},mouseMoveToRadians:function(a,d,b){var c=a.prevChartY-b,f=a.prevChartX-d;b=a.chartY-b;a=a.chartX-d;this.chart.inverted&&(d=f,f=c,c=d,d=a,a=b,b=d);return Math.atan2(b,a)-Math.atan2(c,f)},
mouseMoveToTranslation:function(a){var d=a.chartX-a.prevChartX;a=a.chartY-a.prevChartY;var b;this.chart.inverted&&(b=a,a=d,d=b);return{x:d,y:a}},mouseMoveToScale:function(a,d,b){d=(a.chartX-d||1)/(a.prevChartX-d||1);a=(a.chartY-b||1)/(a.prevChartY-b||1);this.chart.inverted&&(b=a,a=d,d=b);return{x:d,y:a}},destroy:function(){this.removeDocEvents();a.removeEvent(this);this.hcEvents=null}}}(m),A=function(a,e){function d(b,c,f,d){this.chart=b;this.target=c;this.options=f;this.index=a.pick(f.index,d)}a.extend(d.prototype,
e);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(){e.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,f=this.target,d=this.index;b=a.merge(!0,this.options,b);this.destroy();this.constructor(c,f,b,d);this.render(c.controlPointsGroup);this.redraw()};return d}(m,y),z=function(a){function e(d,b,c){this.series={visible:!0,chart:d,getPlotBox:a.Series.prototype.getPlotBox};this.target=b||null;this.options=c;this.applyOptions(this.getOptions())}e.fromPoint=function(a){return new e(a.series.chart,
null,{x:a.x,y:a.y,xAxis:a.series.xAxis,yAxis:a.series.yAxis})};e.pointToPixels=function(a,b){var c=a.series,f=c.chart,d=a.plotX,h=a.plotY;f.inverted&&(a.mock?(d=a.plotY,h=a.plotX):(d=f.plotWidth-a.plotY,h=f.plotHeight-a.plotX));c&&!b&&(a=c.getPlotBox(),d+=a.translateX,h+=a.translateY);return{x:d,y:h}};e.pointToOptions=function(a){return{x:a.x,y:a.y,xAxis:a.series.xAxis,yAxis:a.series.yAxis}};a.extend(e.prototype,{mock:!0,hasDynamicOptions:function(){return"function"===typeof this.options},getOptions:function(){return this.hasDynamicOptions()?
this.options(this.target):this.options},applyOptions:function(a){this.command=a.command;this.setAxis(a,"x");this.setAxis(a,"y");this.refresh()},setAxis:function(d,b){b+="Axis";d=d[b];var c=this.series.chart;this.series[b]=d instanceof a.Axis?d:a.defined(d)?c[b][d]||c.get(d):null},toAnchor:function(){var a=[this.plotX,this.plotY,0,0];this.series.chart.inverted&&(a[0]=this.plotY,a[1]=this.plotX);return a},getLabelConfig:function(){return{x:this.x,y:this.y,point:this}},isInsidePane:function(){var d=
this.plotX,b=this.plotY,c=this.series.xAxis,f=this.series.yAxis,l=!0;c&&(l=a.defined(d)&&0<=d&&d<=c.len);f&&(l=l&&a.defined(b)&&0<=b&&b<=f.len);return l},refresh:function(){var a=this.series,b=a.xAxis,a=a.yAxis,c=this.getOptions();b?(this.x=c.x,this.plotX=b.toPixels(c.x,!0)):(this.x=null,this.plotX=c.x);a?(this.y=c.y,this.plotY=a.toPixels(c.y,!0)):(this.y=null,this.plotY=c.y);this.isInside=this.isInsidePane()},translate:function(a,b,c,f){this.hasDynamicOptions()||(this.plotX+=c,this.plotY+=f,this.refreshOptions())},
scale:function(a,b,c,f){if(!this.hasDynamicOptions()){var d=this.plotY*f;this.plotX=(1-c)*a+this.plotX*c;this.plotY=(1-f)*b+d;this.refreshOptions()}},rotate:function(a,b,c){if(!this.hasDynamicOptions()){var f=Math.cos(c);c=Math.sin(c);var d=this.plotX,h=this.plotY,d=d-a,h=h-b;this.plotX=d*f-h*c+a;this.plotY=d*c+h*f+b;this.refreshOptions()}},refreshOptions:function(){var a=this.series,b=a.xAxis,a=a.yAxis;this.x=this.options.x=b?this.options.x=b.toValue(this.plotX,!0):this.plotX;this.y=this.options.y=
a?a.toValue(this.plotY,!0):this.plotY}});return e}(m),t=function(a,e,d){return{init:function(a,c,f){this.annotation=a;this.chart=a.chart;this.options=c;this.points=[];this.controlPoints=[];this.index=f;this.linkPoints();this.addControlPoints()},attr:function(){this.graphic.attr.apply(this.graphic,arguments)},getPointsOptions:function(){var b=this.options;return b.points||b.point&&a.splat(b.point)},attrsFromOptions:function(a){var c=this.constructor.attrsMap,f={},b,d,e=this.chart.styledMode;for(b in a)d=
c[b],!d||e&&-1!==["fill","stroke","stroke-width"].indexOf(d)||(f[d]=a[b]);return f},anchor:function(b){var c=b.series.getPlotBox();b=b.mock?b.toAnchor():a.Tooltip.prototype.getAnchor.call({chart:b.series.chart},b);b={x:b[0]+(this.options.x||0),y:b[1]+(this.options.y||0),height:b[2]||0,width:b[3]||0};return{relativePosition:b,absolutePosition:a.merge(b,{x:b.x+c.translateX,y:b.y+c.translateY})}},point:function(b,c){if(b&&b.series)return b;c&&null!==c.series||(a.isObject(b)?c=new d(this.chart,this,b):
a.isString(b)?c=this.chart.get(b)||null:"function"===typeof b&&(c=b.call(c,this),c=c.series?c:new d(this.chart,this,b)));return c},linkPoints:function(){var a=this.getPointsOptions(),c=this.points,f=a&&a.length||0,d,h;for(d=0;d<f;d++){h=this.point(a[d],c[d]);if(!h){c.length=0;return}h.mock&&h.refresh();c[d]=h}return c},addControlPoints:function(){var b=this.options.controlPoints;(b||[]).forEach(function(c,f){c=a.merge(this.options.controlPointOptions,c);c.index||(c.index=f);b[f]=c;this.controlPoints.push(new e(this.chart,
this,c))},this)},shouldBeDrawn:function(){return!!this.points.length},render:function(){this.controlPoints.forEach(function(a){a.render()})},redraw:function(a){this.controlPoints.forEach(function(c){c.redraw(a)})},transform:function(a,c,f,d,h){if(this.chart.inverted){var b=c;c=f;f=b}this.points.forEach(function(b,g){this.transformPoint(a,c,f,d,h,g)},this)},transformPoint:function(a,c,f,l,h,e){var b=this.points[e];b.mock||(b=this.points[e]=d.fromPoint(b));b[a](c,f,l,h)},translate:function(a,c){this.transform("translate",
null,null,a,c)},translatePoint:function(a,c,f){this.transformPoint("translate",null,null,a,c,f)},rotate:function(a,c,f){this.transform("rotate",a,c,f)},scale:function(a,c,f,d){this.transform("scale",a,c,f,d)},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(b){var c=this.annotation;b=a.merge(!0,this.options,b);var f=this.graphic.parentGroup;this.destroy();this.constructor(c,b);this.render(f);this.redraw()}}}(m,A,z),w=function(a){var e={arrow:{tagName:"marker",render:!1,id:"arrow",refY:5,refX:9,markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 0 L 10 5 L 0 10 Z",strokeWidth:0}]},"reverse-arrow":{tagName:"marker",render:!1,id:"reverse-arrow",refY:5,refX:1,
markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 5 L 10 0 L 10 10 Z",strokeWidth:0}]}};a.SVGRenderer.prototype.addMarker=function(b,c){var f={id:b},d={stroke:c.color||"none",fill:c.color||"rgba(0, 0, 0, 0.75)"};f.children=c.children.map(function(c){return a.merge(d,c)});c=this.definition(a.merge(!0,{markerWidth:20,markerHeight:20,refX:0,refY:0,orient:"auto"},c,f));c.id=b;return c};var d=function(a){return function(c){this.attr(a,"url(#"+c+")")}},d={markerEndSetter:d("marker-end"),markerStartSetter:d("marker-start"),
setItemMarkers:function(b){var c=b.options,f=b.chart,d=f.options.defs,h=c.fill,e=a.defined(h)&&"none"!==h?h:c.stroke;["markerStart","markerEnd"].forEach(function(l){var g=c[l],k,p,q;if(g){for(q in d)if(k=d[q],g===k.id&&"marker"===k.tagName){p=k;break}p&&(g=b[l]=f.renderer.addMarker((c.id||a.uniqueKey())+"-"+p.id,a.merge(p,{color:e})),b.attr(l,g.attr("id")))}})}};a.SVGRenderer.prototype.definition=function(b){function c(b,d){var l;a.splat(b).forEach(function(b){var g=f.createElement(b.tagName),k={};
a.objectEach(b,function(a,c){"tagName"!==c&&"children"!==c&&"textContent"!==c&&(k[c]=a)});g.attr(k);g.add(d||f.defs);b.textContent&&g.element.appendChild(a.doc.createTextNode(b.textContent));c(b.children||[],g);l=g});return l}var f=this;return c(b)};a.addEvent(a.Chart,"afterGetContainer",function(){this.options.defs=a.merge(e,this.options.defs||{});a.objectEach(this.options.defs,function(a){"marker"===a.tagName&&!1!==a.render&&this.renderer.addMarker(a.id,a)},this)});return d}(m),w=function(a,e,d){function b(a,
c,b){this.init(a,c,b);this.collection="shapes"}var c="rgba(192,192,192,"+(a.svg?.0001:.002)+")";b.attrsMap={dashStyle:"dashstyle",strokeWidth:"stroke-width",stroke:"stroke",fill:"fill",zIndex:"zIndex"};a.merge(!0,b.prototype,e,{type:"path",setMarkers:d.setItemMarkers,toD:function(){var a=this.options.d;if(a)return"function"===typeof a?a.call(this):a;for(var c=this.points,b=c.length,d=b,e=c[0],g=d&&this.anchor(e).absolutePosition,k=0,p=2,a=g&&["M",g.x,g.y];++k<b&&d;)e=c[k],d=e.command||"L",g=this.anchor(e).absolutePosition,
"Z"===d?a[++p]=d:(d!==c[k-1].command&&(a[++p]=d),a[++p]=g.x,a[++p]=g.y),d=e.series.visible;return d?this.chart.renderer.crispLine(a,this.graphic.strokeWidth()):null},shouldBeDrawn:function(){return e.shouldBeDrawn.call(this)||!!this.options.d},render:function(b){var f=this.options,h=this.attrsFromOptions(f);this.graphic=this.annotation.chart.renderer.path(["M",0,0]).attr(h).add(b);f.className&&this.graphic.addClass(f.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:c,fill:c,"stroke-width":this.graphic.strokeWidth()+2*f.snap});e.render.call(this);a.extend(this.graphic,{markerStartSetter:d.markerStartSetter,markerEndSetter:d.markerEndSetter});this.setMarkers(this)},redraw:function(a){var c=this.toD(),b=a?"animate":"attr";c?(this.graphic[b]({d:c}),this.tracker[b]({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,a)}});return b}(m,t,w),D=function(a,e,d){function b(a,b,d){this.init(a,b,d);this.collection="shapes"}b.attrsMap=a.merge(d.attrsMap,{width:"width",height:"height"});a.merge(!0,b.prototype,e,{type:"rect",render:function(a){var c=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.rect(0,-9E9,0,0).attr(c).add(a);e.render.call(this)},redraw:function(a){var c=this.anchor(this.points[0]).absolutePosition;if(c)this.graphic[a?"animate":"attr"]({x:c.x,y:c.y,
width:this.options.width,height:this.options.height});else this.attr({x:0,y:-9E9});this.graphic.placed=!!c;e.redraw.call(this,a)},translate:function(a,b){var c=this.annotation.userOptions[this.collection][this.index];this.translatePoint(a,b,0);c.point=this.options.point}});return b}(m,t,w),E=function(a,e,d){function b(a,b,d){this.init(a,b,d);this.collection="shapes"}b.attrsMap=a.merge(d.attrsMap,{r:"r"});a.merge(!0,b.prototype,e,{type:"circle",render:function(a){var c=this.attrsFromOptions(this.options);
this.graphic=this.annotation.chart.renderer.circle(0,-9E9,0).attr(c).add(a);e.render.call(this)},redraw:function(a){var c=this.anchor(this.points[0]).absolutePosition;if(c)this.graphic[a?"animate":"attr"]({x:c.x,y:c.y,r:this.options.r});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!c;e.redraw.call(this,a)},translate:function(a,b){var c=this.annotation.userOptions[this.collection][this.index];this.translatePoint(a,b,0);c.point=this.options.point},setRadius:function(a){this.options.r=a}});
return b}(m,t,w),C=function(a,e,d){function b(a,b,d){this.init(a,b,d);this.collection="labels"}b.shapesWithoutBackground=["connector"];b.alignedPosition=function(a,b){var c=a.align,d=a.verticalAlign,f=(b.x||0)+(a.x||0),e=(b.y||0)+(a.y||0),g,k;"right"===c?g=1:"center"===c&&(g=2);g&&(f+=(b.width-(a.width||0))/g);"bottom"===d?k=1:"middle"===d&&(k=2);k&&(e+=(b.height-(a.height||0))/k);return{x:Math.round(f),y:Math.round(e)}};b.justifiedOptions=function(a,b,d,e){var c=d.align,f=d.verticalAlign,g=b.box?
0:b.padding||0,k=b.getBBox();b={align:c,verticalAlign:f,x:d.x,y:d.y,width:b.width,height:b.height};d=e.x-a.plotLeft;var p=e.y-a.plotTop;e=d+g;0>e&&("right"===c?b.align="left":b.x=-e);e=d+k.width-g;e>a.plotWidth&&("left"===c?b.align="right":b.x=a.plotWidth-e);e=p+g;0>e&&("bottom"===f?b.verticalAlign="top":b.y=-e);e=p+k.height-g;e>a.plotHeight&&("top"===f?b.verticalAlign="bottom":b.y=a.plotHeight-e);return b};b.attrsMap={backgroundColor:"fill",borderColor:"stroke",borderWidth:"stroke-width",zIndex:"zIndex",
borderRadius:"r",padding:"padding"};a.merge(!0,b.prototype,e,{translatePoint:function(a,b){e.translatePoint.call(this,a,b,0)},translate:function(a,b){var c=this.annotation.userOptions[this.collection][this.index];this.options.x+=a;this.options.y+=b;c.x=this.options.x;c.y=this.options.y},render:function(a){var c=this.options,d=this.attrsFromOptions(c),h=c.style;this.graphic=this.annotation.chart.renderer.label("",0,-9E9,c.shape,null,null,c.useHTML,null,"annotation-label").attr(d).add(a);this.annotation.chart.styledMode||
("contrast"===h.color&&(h.color=this.annotation.chart.renderer.getContrast(-1<b.shapesWithoutBackground.indexOf(c.shape)?"#FFFFFF":c.backgroundColor)),this.graphic.css(c.style).shadow(c.shadow));c.className&&this.graphic.addClass(c.className);this.graphic.labelrank=c.labelrank;e.render.call(this)},redraw:function(c){var b=this.options,d=this.text||b.format||b.text,h=this.graphic,n=this.points[0];h.attr({text:d?a.format(d,n.getLabelConfig(),this.annotation.chart.time):b.formatter.call(n,this)});b=
this.anchor(n);(d=this.position(b))?(h.alignAttr=d,d.anchorX=b.absolutePosition.x,d.anchorY=b.absolutePosition.y,h[c?"animate":"attr"](d)):h.attr({x:0,y:-9E9});h.placed=!!d;e.redraw.call(this,c)},anchor:function(){var a=e.anchor.apply(this,arguments),b=this.options.x||0,d=this.options.y||0;a.absolutePosition.x-=b;a.absolutePosition.y-=d;a.relativePosition.x-=b;a.relativePosition.y-=d;return a},position:function(c){var e=this.graphic,l=this.annotation.chart,h=this.points[0],n=this.options,B=c.absolutePosition,
g=c.relativePosition,k;if(c=h.series.visible&&d.prototype.isInsidePane.call(h))n.distance?k=a.Tooltip.prototype.getPosition.call({chart:l,distance:a.pick(n.distance,16)},e.width,e.height,{plotX:g.x,plotY:g.y,negative:h.negative,ttBelow:h.ttBelow,h:g.height||g.width}):n.positioner?k=n.positioner.call(this):(h={x:B.x,y:B.y,width:0,height:0},k=b.alignedPosition(a.extend(n,{width:e.width,height:e.height}),h),"justify"===this.options.overflow&&(k=b.alignedPosition(b.justifiedOptions(l,e,n,k),h))),n.crop&&
(n=k.x-l.plotLeft,h=k.y-l.plotTop,c=l.isInsidePlot(n,h)&&l.isInsidePlot(n+e.width,h+e.height));return c?k:null}});a.SVGRenderer.prototype.symbols.connector=function(b,d,e,h,n){var c=n&&n.anchorX;n=n&&n.anchorY;var g,k,f=e/2;a.isNumber(c)&&a.isNumber(n)&&(g=["M",c,n],k=d-n,0>k&&(k=-h-k),k<e&&(f=c<b+e/2?k:e-k),n>d+h?g.push("L",b+f,d+h):n<d?g.push("L",b+f,d):c<b?g.push("L",b,d+h/2):c>b+e&&g.push("L",b+e,d+h/2));return g||[]};return b}(m,t,z),F=function(a,e,d){function b(a,b,d){this.init(a,b,d);this.collection=
"shapes"}b.attrsMap={width:"width",height:"height",zIndex:"zIndex"};a.merge(!0,b.prototype,e,{type:"image",render:function(a){var b=this.attrsFromOptions(this.options),c=this.options;this.graphic=this.annotation.chart.renderer.image(c.src,0,-9E9,c.width,c.height).attr(b).add(a);this.graphic.width=c.width;this.graphic.height=c.height;e.render.call(this)},redraw:function(a){var b=this.anchor(this.points[0]);if(b=d.prototype.position.call(this,b))this.graphic[a?"animate":"attr"]({x:b.x,y:b.y});else this.graphic.attr({x:0,
y:-9E9});this.graphic.placed=!!b;e.redraw.call(this,a)},translate:function(a,b){var c=this.annotation.userOptions[this.collection][this.index];this.translatePoint(a,b,0);c.point=this.options.point}});return b}(m,t,C);(function(a,e,d,b,c,f,l,h,n,m){var g=a.merge,k=a.addEvent,p=a.defined,q=a.erase,x=a.find,u=a.isString,v=a.pick,G=a.reduce,H=a.splat,I=a.destroyObjectProperties,r=a.Annotation=function(a,b){var c;this.chart=a;this.points=[];this.controlPoints=[];this.coll="annotations";this.labels=[];
this.shapes=[];this.options=b;this.userOptions=g(!0,{},b);c=this.getLabelsAndShapesOptions(this.userOptions,b);this.userOptions.labels=c.labels;this.userOptions.shapes=c.shapes;this.init(a,b)};g(!0,r.prototype,e,h,{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 p(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]=H(b[d]).map(function(b,c){return g(a[d][c],b)}))});return c},addShapes:function(){(this.options.shapes||[]).forEach(function(a,b){a=this.initShape(a,b);this.options.shapes[b]=a.options},this)},addLabels:function(){(this.options.labels||[]).forEach(function(a,b){a=this.initLabel(a,b);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=G((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=g(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=v(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 a=this.chart,b=function(a){a.destroy()};this.labels.forEach(b);this.shapes.forEach(b);this.clipYAxis=this.clipXAxis=null;q(a.labelCollectors,this.labelCollector);h.destroy.call(this);e.destroy.call(this);I(this,a)},remove:function(){return this.destroy()},
update:function(b){var c=this.chart,d=this.getLabelsAndShapesOptions(this.userOptions,b),g=c.annotations.indexOf(this);b=a.merge(!0,this.userOptions,b);b.labels=d.labels;b.shapes=d.shapes;this.destroy();this.constructor(c,b);c.options.annotations[g]=b;this.redraw()},initShape:function(a,b){a=g(this.options.shapeOptions,{controlPointOptions:this.options.controlPointOptions},a);b=new r.shapesMap[a.type](this,a,b);b.itemType="shape";this.shapes.push(b);return b},initLabel:function(a,b){a=g(this.options.labelOptions,
{controlPointOptions:this.options.controlPointOptions},a);b=new l(this,a,b);b.itemType="label";this.labels.push(b);return b},redrawItem:function(b,c){b.linkPoints();b.shouldBeDrawn()?(b.graphic||this.renderItem(b),b.redraw(a.pick(c,!0)&&b.graphic.placed),b.points.length&&this.adjustVisibility(b)):this.destroyItem(b)},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){q(this[a.itemType+
"s"],a);a.destroy()},renderItem:function(a){a.render("label"===a.itemType?this.labelsGroup:this.shapesGroup)}});r.shapesMap={rect:d,circle:b,path:c,image:f};r.types={};r.MockPoint=n;r.ControlPoint=m;a.extendAnnotation=function(a,b,c,d){b=b||r;g(!0,a.prototype,b.prototype,c);a.prototype.defaultOptions=g(a.prototype.defaultOptions,d||{})};a.Chart.prototype.collectionsWithUpdate.push("annotations");a.extend(a.Chart.prototype,{initAnnotation:function(b){var c=r.types[b.type]||r;b=a.merge(c.prototype.defaultOptions,
b);c=new c(this,b);this.annotations.push(c);return c},addAnnotation:function(a,b){a=this.initAnnotation(a);this.options.annotations.push(a.options);v(b,!0)&&a.redraw();return a},removeAnnotation:function(a){var b=this.annotations,c=u(a)?x(b,function(b){return b.options.id===a}):a;c&&(q(this.options.annotations,c.options),q(b,c),c.destroy())},drawAnnotations:function(){this.plotBoxClip.attr(this.plotBox);this.annotations.forEach(function(a){a.redraw()})}});a.Chart.prototype.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();k(a,"redraw",a.drawAnnotations);k(a,"destroy",function(){a.plotBoxClip.destroy();a.controlPointsGroup.destroy()})})})(m,t,D,E,w,F,C,y,z,A);y=function(){return{initUpdate:function(a){a.navigation||
(a.navigation={updates:[],update:function(a,d){this.updates.forEach(function(b){b.update.call(b.context,a,d)})}})},addUpdate:function(a,e){e.navigation||this.initUpdate(e);e.navigation.updates.push({update:a,context:e})}}}();(function(a,e){function d(b){var c=b.prototype.defaultOptions.events&&b.prototype.defaultOptions.events.click;a.merge(!0,b.prototype.defaultOptions.events,{click:function(a){var b=this,d=b.chart.navigationBindings,g=d.activeAnnotation;c&&c.click.call(b,a);g!==b?(d.deselectAnnotation(),
d.activeAnnotation=b,b.setControlPointsVisibility(!0),m(d,"showPopup",{annotation:b,formType:"annotation-toolbar",options:d.annotationToFields(b),onSubmit:function(a){var c={};"remove"===a.actionType?(d.activeAnnotation=!1,d.chart.removeAnnotation(b)):(d.fieldsToOptions(a.fields,c),d.deselectAnnotation(),a=c.typeOptions,"measure"===b.options.type&&(a.crosshairY.enabled=0!==a.crosshairY.strokeWidth,a.crosshairX.enabled=0!==a.crosshairX.strokeWidth),b.update(c))}})):(d.deselectAnnotation(),m(d,"closePopup"));
a.activeAnnotation=!0}})}var b=a.doc,c=a.addEvent,f=a.pick,l=a.merge,h=a.extend,n=a.isNumber,m=a.fireEvent,g=a.isArray,k=a.isObject,p=a.objectEach;a.NavigationBindings=function(a,c){this.chart=a;this.options=c;this.eventsToUnbind=[];this.container=b.getElementsByClassName(this.options.bindingsClassName)};a.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:[]};a.NavigationBindings.annotationsNonEditable={rectangle:["crosshairX","crosshairY","label"]};h(a.NavigationBindings.prototype,{initEvents:function(){var a=this,b=a.chart,d=a.container,g=a.options;a.boundClassNames={};p(g.bindings,function(b){a.boundClassNames[b.className]=b});[].forEach.call(d,function(b){a.eventsToUnbind.push(c(b,"click",function(b){var c=a.getButtonEvents(d,b);c&&a.bindingsButtonClick(c.button,
c.events,b)}))});p(g.events||{},function(b,d){a.eventsToUnbind.push(c(a,d,b))});a.eventsToUnbind.push(c(b.container,"click",function(c){!b.cancelClick&&b.isInsidePlot(c.chartX-b.plotLeft,c.chartY-b.plotTop)&&a.bindingsChartClick(this,c)}));a.eventsToUnbind.push(c(b.container,"mousemove",function(b){a.bindingsContainerMouseMove(this,b)}))},initUpdate:function(){var a=this;e.addUpdate(function(b){a.update(b)},this.chart)},bindingsButtonClick:function(a,b,c){var d=this.chart;this.selectedButtonElement&&
(m(this,"deselectButton",{button:this.selectedButtonElement}),this.nextEvent&&(this.currentUserDetails&&"annotations"===this.currentUserDetails.coll&&d.removeAnnotation(this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1));this.selectedButton=b;this.selectedButtonElement=a;m(this,"selectButton",{button:a});b.init&&b.init.call(this,a,c);(b.start||b.steps)&&d.renderer.boxWrapper.addClass("highcharts-draw-mode")},bindingsChartClick:function(a,b){a=this.selectedButton;var c=this.chart.renderer.boxWrapper;
this.activeAnnotation&&!b.activeAnnotation&&b.target.parentNode&&!b.target.closest(".highcharts-popup")&&(m(this,"closePopup"),this.deselectAnnotation());a&&a.start&&(this.nextEvent?(this.nextEvent(b,this.currentUserDetails),this.steps&&(this.stepIndex++,a.steps[this.stepIndex]?this.mouseMoveEvent=this.nextEvent=a.steps[this.stepIndex]:(m(this,"deselectButton",{button:this.selectedButtonElement}),c.removeClass("highcharts-draw-mode"),a.end&&a.end.call(this,b,this.currentUserDetails),this.mouseMoveEvent=
this.nextEvent=!1,this.selectedButton=null))):(this.currentUserDetails=a.start.call(this,b),a.steps?(this.stepIndex=0,this.steps=!0,this.mouseMoveEvent=this.nextEvent=a.steps[this.stepIndex]):(m(this,"deselectButton",{button:this.selectedButtonElement}),c.removeClass("highcharts-draw-mode"),this.steps=!1,this.selectedButton=null,a.end&&a.end.call(this,b,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),g=c.split("."),k=b,e=g.length-1;!n(d)||a.match(/px/g)||c.match(/format/g)||(a=d);""!==a&&"undefined"!==a&&g.forEach(function(b,c){var d=f(g[c+1],"");e===c?k[b]=a:(k[b]||(k[b]=d.match(/\d/g)?[]:{}),k=k[b])})});return b},deselectAnnotation:function(){this.activeAnnotation&&(this.activeAnnotation.setControlPointsVisibility(!1),this.activeAnnotation=!1)},annotationToFields:function(b){function c(d,e,u,f){var v;u&&-1===n.indexOf(e)&&(0<=(u.indexOf&&u.indexOf(e))||
u[e]||!0===u)&&(g(d)?(f[e]=[],d.forEach(function(a,b){k(a)?(f[e][b]={},p(a,function(a,d){c(a,d,q[e],f[e][b])})):c(a,0,q[e],f[e])})):k(d)?(v={},g(f)?(f.push(v),v[e]={},v=v[e]):f[e]=v,p(d,function(a,b){c(a,b,0===e?u:q[e],v)})):"format"===e?f[e]=[a.format(d,b.labels[0].points[0]).toString(),"text"]:g(f)?f.push([d,h(d)]):f[e]=[d,h(d)])}var d=b.options,e=a.NavigationBindings.annotationsEditable,q=e.nestedOptions,h=this.utils.getFieldType,l=f(d.type,d.shapes&&d.shapes[0]&&d.shapes[0].type,d.labels&&d.labels[0]&&
d.labels[0].itemType,"label"),n=a.NavigationBindings.annotationsNonEditable[d.langKey]||[],m={langKey:d.langKey,type:l};p(d,function(a,b){"typeOptions"===b?(m[b]={},p(d[b],function(a,d){c(a,d,q,m[b],!0)})):c(a,b,e[l],m)});return m},getClickedClassNames:function(b,c){var d=c.target;c=[];for(var g;d&&((g=a.attr(d,"class"))&&(c=c.concat(g.split(" ").map(function(a){return[a,d]}))),d=d.parentNode,d!==b););return c},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.options.typeOptions,d=this.chart.xAxis[0].toValue(a.chartX);a=this.chart.yAxis[0].toValue(a.chartY);b.update({typeOptions:{background:{width:d-c.point.x,height:c.point.y-a}}})},getFieldType:function(a){return{string:"text",
number:"number","boolean":"checkbox"}[typeof a]}}});a.Chart.prototype.initNavigationBindings=function(){var b=this.options;b&&b.navigation&&b.navigation.bindings&&(this.navigationBindings=new a.NavigationBindings(this,b.navigation),this.navigationBindings.initEvents(),this.navigationBindings.initUpdate())};c(a.Chart,"load",function(){this.initNavigationBindings()});c(a.Chart,"destroy",function(){this.navigationBindings&&this.navigationBindings.destroy()});c(a.NavigationBindings,"deselectButton",function(){this.selectedButtonElement=
null});a.Annotation&&(d(a.Annotation),a.objectEach(a.Annotation.types,function(a){d(a)}));a.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-wrapper",bindings:{circleAnnotation:{className:"highcharts-circle-annotation",start:function(b){var c=this.chart.xAxis[0].toValue(b.chartX);b=this.chart.yAxis[0].toValue(b.chartY);return this.chart.addAnnotation({langKey:"circle",shapes:[{type:"circle",point:{xAxis:0,yAxis:0,x:c,y:b},
r:5,controlPoints:[{positioner:function(b){var c=a.Annotation.MockPoint.pointToPixels(b.points[0]);b=b.options.r;return{x:c.x+b*Math.cos(Math.PI/4)-this.graphic.width/2,y:c.y+b*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)}}}]}]})},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);b.update({shapes:[{r:Math.max(Math.sqrt(Math.pow(d-a.chartX,2)+Math.pow(c-a.chartY,2)),5)}]})}]},rectangleAnnotation:{className:"highcharts-rectangle-annotation",start:function(b){var c=this.chart.xAxis[0].toValue(b.chartX);b=this.chart.yAxis[0].toValue(b.chartY);return this.chart.addAnnotation({langKey:"rectangle",shapes:[{type:"rect",point:{x:c,y:b,xAxis:0,yAxis:0},width:5,height:5,controlPoints:[{positioner:function(b){var c=a.Annotation.MockPoint.pointToPixels(b.points[0]);
return{x:c.x+b.options.width-4,y:c.y+b.options.height-4}},events:{drag:function(a,b){var c=b.annotation;a=this.mouseMoveToTranslation(a);b.options.width=Math.max(b.options.width+a.x,5);b.options.height=Math.max(b.options.height+a.y,5);c.options.shapes[0]=b.options;c.userOptions.shapes[0]=b.options;b.redraw(!1)}}}]}]})},steps:[function(a,b){var c=this.chart.yAxis[0],d=b.options.shapes[0].point,g=this.chart.xAxis[0].toPixels(d.x),c=c.toPixels(d.y);b.update({shapes:[{width:Math.max(a.chartX-g,5),height:Math.max(a.chartY-
c,5),point:{x:d.x,y:d.y}}]})}]},labelAnnotation:{className:"highcharts-label-annotation",start:function(b){var c=this.chart.xAxis[0].toValue(b.chartX);b=this.chart.yAxis[0].toValue(b.chartY);this.chart.addAnnotation({langKey:"label",labelOptions:{format:"{y:.2f}"},labels:[{point:{x:c,y:b,xAxis:0,yAxis:0},controlPoints:[{symbol:"triangle-down",positioner:function(b){if(!b.graphic.placed)return{x:0,y:-9E7};b=a.Annotation.MockPoint.pointToPixels(b.points[0]);return{x:b.x-this.graphic.width/2,y:b.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)}}}],overflow:"none",crop:!0}]})}}},events:{}}})})(m,
y);(function(a){var e=a.addEvent,d=a.createElement,b=a.objectEach,c=a.pick,f=a.wrap,l=a.isString,h=a.isObject,m=a.isArray,t=/\d/g;f(a.Pointer.prototype,"onContainerMouseDown",function(a,b){var c=b.target&&b.target.className;l(c)&&0<=c.indexOf("highcharts-popup-field")||a.apply(this,Array.prototype.slice.call(arguments,1))});a.Popup=function(a){this.init(a)};a.Popup.prototype={init:function(a){this.container=d("div",{className:"highcharts-popup"},null,a);this.lang=this.getLangpack();this.addCloseBtn()},
addCloseBtn:function(){var a=this,b;b=d("div",{className:"highcharts-popup-close"},null,this.container);["click","touchstart"].forEach(function(c){e(b,c,function(){a.closePopup()})})},addColsContainer:function(a){var b;b=d("div",{className:"highcharts-popup-lhs-col"},null,a);a=d("div",{className:"highcharts-popup-rhs-col"},null,a);d("div",{className:"highcharts-popup-rhs-col-wrapper"},null,a);return{lhsCol:b,rhsCol:a}},addInput:function(a,b,c,e){var g=a.split("."),g=g[g.length-1],k=this.lang;b="highcharts-"+
b+"-"+g;b.match(t)||d("label",{innerHTML:k[g]||g,htmlFor:b},null,c);d("input",{name:b,value:e[0],type:e[1],className:"highcharts-popup-field"},null,c).setAttribute("highcharts-data-name",a)},addButton:function(a,b,c,f,h){var g=this,k=this.closePopup,p=this.getFields,q;q=d("button",{innerHTML:b},null,a);["click","touchstart"].forEach(function(a){e(q,a,function(){k.call(g);return f(p(h,c))})});return q},getFields:function(a,b){var c=a.querySelectorAll("input"),d=a.querySelectorAll("#highcharts-select-series \x3e option:checked")[0];
a=a.querySelectorAll("#highcharts-select-volume \x3e option:checked")[0];var e,g,k;k={actionType:b,linkedTo:d&&d.getAttribute("value"),fields:{}};c.forEach(function(a){g=a.getAttribute("highcharts-data-name");(e=a.getAttribute("highcharts-data-series-id"))?k.seriesId=a.value:g?k.fields[g]=a.value:k.type=a.value});a&&(k.fields["params.volumeSeriesID"]=a.getAttribute("value"));return k},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 a.getOptions().lang.navigation.popup},annotations:{addToolbar:function(a,b,e){var g=this,k=this.lang,f=this.popup.container,p=this.showForm,h;-1===f.className.indexOf("highcharts-annotation-toolbar")&&(f.className+=" highcharts-annotation-toolbar");f.style.top=a.plotTop+10+"px";d("span",{innerHTML:c(k[b.langKey]||b.langKey,b.shapes&&b.shapes[0].type)},null,f);h=this.addButton(f,k.removeButton||"remove","remove",e,f);h.className+=" highcharts-annotation-remove-button";
h=this.addButton(f,k.editButton||"edit","edit",function(){p.call(g,"annotation-edit",a,b,e)},f);h.className+=" highcharts-annotation-edit-button"},addForm:function(a,b,c,e){var g=this.popup.container,k=this.lang,f,h;d("h2",{innerHTML:k[b.langKey]||b.langKey,className:"highcharts-popup-main-title"},null,g);h=d("div",{className:"highcharts-popup-lhs-col highcharts-popup-lhs-full"},null,g);f=d("div",{className:"highcharts-popup-bottom-row"},null,g);this.annotations.addFormFields.call(this,h,a,"",b,[],
!0);this.addButton(f,e?k.addButton||"add":k.saveButton||"save",e?"add":"save",c,g)},addFormFields:function(a,c,e,f,l,u){var g=this,k=this.annotations.addFormFields,p=this.addInput,q=this.lang,n,x;b(f,function(b,d){n=""!==e?e+"."+d:d;h(b)&&(!m(b)||m(b)&&h(b[0])?(x=q[d]||d,x.match(t)||l.push([!0,x,a]),k.call(g,a,c,n,b,l,!1)):l.push([g,n,"annotation",a,b]))});u&&(l=l.sort(function(a){return a[1].match(/format/g)?-1:1}),l.forEach(function(a){!0===a[0]?d("span",{className:"highcharts-annotation-title",
innerHTML:a[1]},null,a[2]):p.apply(a[0],a.splice(1))}))}},indicators:{addForm:function(a,b,c){var d=this.indicators,e=this.lang,g;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");g=b[0].querySelectorAll(".highcharts-popup-rhs-col")[0];this.addButton(g,e.addButton||"add","add",c,g);this.addColsContainer(b[1]);d.addIndicatorList.call(this,a,b[1],"edit");g=b[1].querySelectorAll(".highcharts-popup-rhs-col")[0];
this.addButton(g,e.saveButton||"save","edit",c,g);this.addButton(g,e.removeButton||"remove","remove",c,g)},addIndicatorList:function(c,k,f){var g=this,h=k.querySelectorAll(".highcharts-popup-lhs-col")[0];k=k.querySelectorAll(".highcharts-popup-rhs-col")[0];var p=a.getOptions(),l="edit"===f,m=l?c.series:p.plotOptions,n=this.indicators.addFormFields,t,r,w;r=d("ul",{className:"highcharts-indicator-list"},null,h);t=k.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];b(m,function(a,b){var k=a.options;
if(a.params||k&&k.params){var f=g.indicators.getNameType(a,b),h=f.type;w=d("li",{className:"highcharts-indicator-list",innerHTML:f.name},null,r);["click","touchstart"].forEach(function(b){e(w,b,function(){n.call(g,c,l?a:m[h],f.type,t);l&&a.options&&d("input",{type:"hidden",name:"highcharts-id-"+h,value:a.options.id},null,t).setAttribute("highcharts-data-series-id",a.options.id)})})}});0<r.childNodes.length&&r.childNodes[0].click()},getNameType:function(b,c){var d=b.options,e=a.seriesTypes,e=e[c]&&
e[c].prototype.nameBase||c.toUpperCase();d&&d.type&&(c=b.options.type,e=b.name);return{name:e,type:c}},listAllSeries:function(a,b,c,e){a="highcharts-"+b+"-type-"+a;var g,f;d("label",{innerHTML:this.lang[b]||b,htmlFor:a},null,e);g=d("select",{name:a,className:"highcharts-popup-field"},null,e);g.setAttribute("id","highcharts-select-"+b);c.series.forEach(function(a){f=a.options;!f.params&&f.id&&"highcharts-navigator-series"!==f.id&&d("option",{innerHTML:f.name||f.id,value:f.id},null,g)})},addFormFields:function(a,
b,c,e){var g=b.params||b.options.params,f=this.indicators.getNameType;e.innerHTML="";d("h3",{className:"highcharts-indicator-title",innerHTML:f(b,c).name},null,e);d("input",{type:"hidden",name:"highcharts-type-"+c,value:c},null,e);this.indicators.listAllSeries.call(this,c,"series",a,e);g.volumeSeriesID&&this.indicators.listAllSeries.call(this,c,"volume",a,e);this.indicators.addParamInputs.call(this,a,"params",g,c,e)},addParamInputs:function(a,c,d,e,f){var g=this,k=this.indicators.addParamInputs,p=
this.addInput,l;b(d,function(b,d){l=c+"."+d;h(b)?k.call(g,a,l,b,e,f):"params.volumeSeriesID"!==l&&p.call(g,l,e,f,[b,"text"])})},getAmount:function(){var a=0;b(this.series,function(b){var c=b.options;(b.params||c&&c.params)&&a++});return a}},tabs:{init:function(a){var b=this.tabs;a=this.indicators.getAmount.call(a);var c;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,e="highcharts-tab-item",f=this.lang;0===b&&(e+=" highcharts-tab-disabled");b=d("span",{innerHTML:f[a+"Button"]||a,className:e},null,c);b.setAttribute("highcharts-data-tab-type",a);return b},addContentItem:function(){return d("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"),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(a.NavigationBindings,"showPopup",function(b){this.popup||(this.popup=new a.Popup(this.chart.container));this.popup.showForm(b.formType,this.chart,b.options,b.onSubmit)});e(a.NavigationBindings,"closePopup",function(){this.popup&&this.popup.closePopup()})})(m)});
//# sourceMappingURL=annotations.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,11 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Arrow Symbols
(c) 2017-2019 Lars A. V. Cabrera
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define(function(){return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){(function(a){a.SVGRenderer.prototype.symbols.arrow=function(e,c,a,d){return["M",e,c+d/2,"L",e+a,c,"L",e,c+d/2,"L",e+a,c+d]};a.SVGRenderer.prototype.symbols["arrow-half"]=function(e,c,b,d){return a.SVGRenderer.prototype.symbols.arrow(e,c,b/2,d)};a.SVGRenderer.prototype.symbols["triangle-left"]=
function(a,c,b,d){return["M",a+b,c,"L",a,c+d/2,"L",a+b,c+d,"Z"]};a.SVGRenderer.prototype.symbols["arrow-filled"]=a.SVGRenderer.prototype.symbols["triangle-left"];a.SVGRenderer.prototype.symbols["triangle-left-half"]=function(b,c,f,d){return a.SVGRenderer.prototype.symbols["triangle-left"](b,c,f/2,d)};a.SVGRenderer.prototype.symbols["arrow-filled-half"]=a.SVGRenderer.prototype.symbols["triangle-left-half"]})(b)});
//# sourceMappingURL=arrow-symbols.js.map
@@ -0,0 +1 @@
{"version":3,"file":"arrow-symbols.js.map","lineCount":10,"mappings":"A;;;;;;;;AASC,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,QAAS,EAAG,CACf,MAAOH,EADQ,CAAnB,CADG,CAKHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CATY,CAAnB,CAAA,CAWC,QAAS,CAACD,CAAD,CAAa,CACnB,SAAS,CAACE,CAAD,CAAI,CAwCVA,CAAAC,YAAAC,UAAAC,QAAAC,MAAA,CAAwCC,QAAS,CAACC,CAAD,CAAIC,CAAJ,CAAOC,CAAP,CAAUC,CAAV,CAAa,CAC1D,MAAO,CACH,GADG,CACEH,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,CAqC9DT,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,CAgCtET,EAAAC,YAAAC,UAAAC,QAAA,CAAgC,eAAhC,CAAA;AAAmD,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,CA8BzET,EAAAC,YAAAC,UAAAC,QAAA,CAAgC,cAAhC,CAAA,CACQH,CAAAC,YAAAC,UAAAC,QAAA,CAAgC,eAAhC,CA8BRH,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,CAAoDC,CAApD,CAAuDC,CAAvD,CAA2D,CAA3D,CAA8DC,CAA9D,CADmE,CAyB9ET,EAAAC,YAAAC,UAAAC,QAAA,CAAgC,mBAAhC,CAAA,CACQH,CAAAC,YAAAC,UAAAC,QAAA,CAAgC,oBAAhC,CApME,CAAb,CAAA,CAsMCL,CAtMD,CADmB,CAXvB;","sources":["arrow-symbols.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","H","SVGRenderer","prototype","symbols","arrow","H.SVGRenderer.prototype.symbols.arrow","x","y","w","h"]}
@@ -0,0 +1,225 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
* (c) 2017 Highsoft AS
* Authors: Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*/
/**
* 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'];
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,23 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Boost module
(c) 2010-2019 Highsoft AS
Author: Torstein Honsi
License: www.highcharts.com/license
*/
(function(k){"object"===typeof module&&module.exports?(k["default"]=k,module.exports=k):"function"===typeof define&&define.amd?define(function(){return k}):k("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(k){(function(b){var k=b.win.document,ba=function(){},ca=b.Color,w=b.Series,f=b.seriesTypes,q=b.extend,x=b.addEvent,da=b.fireEvent,ea=b.isNumber,fa=b.merge,ga=b.pick,y=b.wrap,I;b.initCanvasBoost=function(){b.seriesTypes.heatmap&&b.wrap(b.seriesTypes.heatmap.prototype,"drawPoints",function(){var a=
this.chart,c=this.getContext(),g=this.chart.inverted,m=this.xAxis,d=this.yAxis;c?(this.points.forEach(function(b){var e=b.plotY;void 0===e||isNaN(e)||null===b.y||(e=b.shapeArgs,b=a.styledMode?b.series.colorAttribs(b):b.series.pointAttribs(b),c.fillStyle=b.fill,g?c.fillRect(d.len-e.y+m.left,m.len-e.x+d.top,-e.height,-e.width):c.fillRect(e.x+m.left,e.y+d.top,e.width,e.height))}),this.canvasToSVG()):this.chart.showLoading("Your browser doesn't support HTML5 canvas, \x3cbr\x3eplease use a modern browser")});
b.extend(w.prototype,{getContext:function(){var a=this.chart,c=a.chartWidth,g=a.chartHeight,b=a.seriesGroup||this.group,d=this,f,e=function(a,d,g,c,b,e,m){a.call(this,g,d,c,b,e,m)};a.isChartSeriesBoosting()&&(d=a,b=a.seriesGroup);f=d.ctx;d.canvas||(d.canvas=k.createElement("canvas"),d.renderTarget=a.renderer.image("",0,0,c,g).addClass("highcharts-boost-canvas").add(b),d.ctx=f=d.canvas.getContext("2d"),a.inverted&&["moveTo","lineTo","rect","arc"].forEach(function(a){y(f,a,e)}),d.boostCopy=function(){d.renderTarget.attr({href:d.canvas.toDataURL("image/png")})},
d.boostClear=function(){f.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!==g&&(d.canvas.height=g);d.renderTarget.attr({x:0,y:0,width:c,height:g,style:"pointer-events: none",href:""});d.boostClipRect.attr(a.getBoostClipRect(d));return f},canvasToSVG:function(){this.chart.isChartSeriesBoosting()?this.boostClear&&this.boostClear():
(this.boostCopy||this.chart.boostCopy)&&(this.boostCopy||this.chart.boostCopy)()},cvsLineTo:function(a,c,g){a.lineTo(c,g)},renderCanvas:function(){var a=this,c=a.options,g=a.chart,m=this.xAxis,d=this.yAxis,f=(g.options.boost||{}).timeRendering||!1,e,k=0,J=a.processedXData,w=a.processedYData,K=c.data,l=m.getExtremes(),z=l.min,A=l.max,l=d.getExtremes(),y=l.min,ha=l.max,L={},B,ia=!!a.sampling,M,C=c.marker&&c.marker.radius,N=this.cvsDrawPoint,D=c.lineWidth?this.cvsLineTo:!1,O=C&&1>=C?this.cvsMarkerSquare:
this.cvsMarkerCircle,ja=this.cvsStrokeBatch||1E3,ka=!1!==c.enableMouseTracking,P,l=c.threshold,p=d.getThreshold(l),Q=ea(l),R=p,la=this.fill,S=a.pointArrayMap&&"low,high"===a.pointArrayMap.join(","),T=!!c.stacking,U=a.cropStart||0,l=g.options.loading,ma=a.requireSorting,V,na=c.connectNulls,W=!J,E,F,r,v,G,n=T?a.data:J||K,oa=a.fillOpacity?(new ca(a.color)).setOpacity(ga(c.fillOpacity,.75)).get():a.color,X=function(){la?(e.fillStyle=oa,e.fill()):(e.strokeStyle=a.color,e.lineWidth=c.lineWidth,e.stroke())},
Z=function(d,c,b,h){0===k&&(e.beginPath(),D&&(e.lineJoin="round"));g.scroller&&"highcharts-navigator-series"===a.options.className?(c+=g.scroller.top,b&&(b+=g.scroller.top)):c+=g.plotTop;d+=g.plotLeft;V?e.moveTo(d,c):N?N(e,d,c,b,P):D?D(e,d,c):O&&O.call(a,e,d,c,C,h);k+=1;k===ja&&(X(),k=0);P={clientX:d,plotY:c,yBottom:b}},pa="x"===c.findNearestPointBy,aa=this.xData||this.options.xData||this.processedXData||!1,H=function(a,c,b){G=pa?a:a+","+c;ka&&!L[G]&&(L[G]=!0,g.inverted&&(a=m.len-a,c=d.len-c),M.push({x:aa?
aa[U+b]:!1,clientX:a,plotX:a,plotY:c,i:U+b}))};this.renderTarget&&this.renderTarget.attr({href:""});(this.points||this.graph)&&this.destroyGraphics();a.plotGroup("group","series",a.visible?"visible":"hidden",c.zIndex,g.seriesGroup);a.markerGroup=a.group;x(a,"destroy",function(){a.markerGroup=null});M=this.points=[];e=this.getContext();a.buildKDTree=ba;this.boostClear&&this.boostClear();this.visible&&(99999<K.length&&(g.options.loading=fa(l,{labelStyle:{backgroundColor:b.color("#ffffff").setOpacity(.75).get(),
padding:"1em",borderRadius:"0.5em"},style:{backgroundColor:"none",opacity:1}}),b.clearTimeout(I),g.showLoading("Drawing..."),g.options.loading=l),f&&console.time("canvas rendering"),b.eachAsync(n,function(c,b){var e,h,f,k=!1,l=!1,t=!1,u=!1,Y="undefined"===typeof g.index,q=!0;if(!Y){W?(e=c[0],h=c[1],n[b+1]&&(t=n[b+1][0]),n[b-1]&&(u=n[b-1][0])):(e=c,h=w[b],n[b+1]&&(t=n[b+1]),n[b-1]&&(u=n[b-1]));t&&t>=z&&t<=A&&(k=!0);u&&u>=z&&u<=A&&(l=!0);S?(W&&(h=c.slice(1,3)),f=h[0],h=h[1]):T&&(e=c.x,h=c.stackY,f=
h-c.y);c=null===h;ma||(q=h>=y&&h<=ha);if(!c&&(e>=z&&e<=A&&q||k||l))if(e=Math.round(m.toPixels(e,!0)),ia){if(void 0===r||e===B){S||(f=h);if(void 0===v||h>F)F=h,v=b;if(void 0===r||f<E)E=f,r=b}e!==B&&(void 0!==r&&(h=d.toPixels(F,!0),p=d.toPixels(E,!0),Z(e,Q?Math.min(h,R):h,Q?Math.max(p,R):p,b),H(e,h,v),p!==h&&H(e,p,r)),r=v=void 0,B=e)}else h=Math.round(d.toPixels(h,!0)),Z(e,h,p,b),H(e,h,b);V=c&&!na;0===b%5E4&&(a.boostCopy||a.chart.boostCopy)&&(a.boostCopy||a.chart.boostCopy)()}return!Y},function(){var c=
g.loadingDiv,b=g.loadingShown;X();a.canvasToSVG();f&&console.timeEnd("canvas rendering");da(a,"renderedCanvas");b&&(q(c.style,{transition:"opacity 250ms",opacity:0}),g.loadingShown=!1,I=setTimeout(function(){c.parentNode&&c.parentNode.removeChild(c);g.loadingDiv=g.loadingSpan=null},250));delete a.buildKDTree;a.buildKDTree()},g.renderer.forExport?Number.MAX_VALUE:void 0))}});f.scatter.prototype.cvsMarkerCircle=function(a,c,b,f){a.moveTo(c,b);a.arc(c,b,f,0,2*Math.PI,!1)};f.scatter.prototype.cvsMarkerSquare=
function(a,c,b,f){a.rect(c-f,b-f,2*f,2*f)};f.scatter.prototype.fill=!0;f.bubble&&(f.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)},f.bubble.prototype.cvsStrokeBatch=1);q(f.area.prototype,{cvsDrawPoint:function(a,b,g,f,d){d&&b!==d.clientX&&(a.moveTo(d.clientX,d.yBottom),a.lineTo(d.clientX,d.plotY),a.lineTo(b,g),a.lineTo(b,f))},fill:!0,fillOpacity:!0,sampling:!0});q(f.column.prototype,{cvsDrawPoint:function(a,b,g,f){a.rect(b-1,
g,1,f-g)},fill:!0,sampling:!0});b.Chart.prototype.callbacks.push(function(a){x(a,"predraw",function(){a.renderTarget&&a.renderTarget.attr({href:""});a.canvas&&a.canvas.getContext("2d").clearRect(0,0,a.canvas.width,a.canvas.height)});x(a,"render",function(){a.boostCopy&&a.boostCopy()})})}})(k)});
//# sourceMappingURL=boost-canvas.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,756 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
* 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.
*/
var win = H.win,
doc = win.document,
noop = function () {},
Color = H.Color,
Series = H.Series,
seriesTypes = H.seriesTypes,
extend = H.extend,
addEvent = H.addEvent,
fireEvent = H.fireEvent,
isNumber = H.isNumber,
merge = H.merge,
pick = H.pick,
wrap = H.wrap,
CHUNK_SIZE = 50000,
destroyLoadingDiv;
/**
* Initialize the canvas boost.
*
* @function Highcharts.initCanvasBoost
*/
H.initCanvasBoost = function () {
if (H.seriesTypes.heatmap) {
H.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 (
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);
}
});
}
H.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 : false,
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: H.color('#ffffff')
.setOpacity(0.75).get(),
padding: '1em',
borderRadius: '0.5em'
},
style: {
backgroundColor: 'none',
opacity: 1
}
});
H.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 (minI === undefined || clientX === lastClientX) {
if (!isRange) {
low = y;
}
if (maxI === undefined || y > maxVal) {
maxVal = y;
maxI = i;
}
if (minI === undefined || low < minVal) {
minVal = low;
minI = i;
}
}
// Add points and reset
if (clientX !== lastClientX) {
if (minI !== undefined) { // maxI also a number
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 = undefined;
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 : undefined);
}
});
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) {
function canvasToSVG() {
if (chart.boostCopy) {
chart.boostCopy();
}
}
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);
});
};
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,65 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Boost module
(c) 2010-2019 Highsoft AS
Author: Torstein Honsi
License: www.highcharts.com/license
*/
(function(u){"object"===typeof module&&module.exports?(u["default"]=u,module.exports=u):"function"===typeof define&&define.amd?define(function(){return u}):u("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(u){(function(l){function u(){var a=Array.prototype.slice.call(arguments),c=-Number.MAX_VALUE;a.forEach(function(a){if("undefined"!==typeof a&&null!==a&&"undefined"!==typeof a.length&&0<a.length)return c=a.length,!0});return c}function V(a){var c=0,d=0,f=G(a.options.boost&&a.options.boost.allowForce,
!0),b;if("undefined"!==typeof a.boostForceChartBoost)return a.boostForceChartBoost;if(1<a.series.length)for(var l=0;l<a.series.length;l++)b=a.series[l],0!==b.options.boostThreshold&&!1!==b.visible&&"heatmap"!==b.type&&(H[b.type]&&++d,u(b.processedXData,b.options.data,b.points)>=(b.options.boostThreshold||Number.MAX_VALUE)&&++c);a.boostForceChartBoost=f&&(d===a.series.length&&0<c||5<c);return a.boostForceChartBoost}function P(a){return G(a&&a.options&&a.options.boost&&a.options.boost.enabled,!0)}function pa(a){function c(){k.length&&
l.error("[highcharts boost] shader error - "+k.join("\n"))}function d(b,e){var c=a.createShader("vertex"===e?a.VERTEX_SHADER:a.FRAGMENT_SHADER);a.shaderSource(c,b);a.compileShader(c);return a.getShaderParameter(c,a.COMPILE_STATUS)?c:(k.push("when compiling "+e+" shader:\n"+a.getShaderInfoLog(c)),!1)}function f(){function b(b){return a.getUniformLocation(h,b)}var f=d("#version 100\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 plotHeight;\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 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 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 \x3d aVertexPosition.w;\nfloat zMax \x3d bubbleZMax;\nfloat zMin \x3d bubbleZMin;\nfloat radius \x3d 0.0;\nfloat pos \x3d 0.0;\nfloat zRange \x3d zMax - zMin;\nif (bubbleSizeAbs){\nvalue \x3d value - bubbleZThreshold;\nzMax \x3d max(zMax - bubbleZThreshold, zMin - bubbleZThreshold);\nzMin \x3d 0.0;\n}\nif (value \x3c zMin){\nradius \x3d bubbleZMin / 2.0 - 1.0;\n} else {\npos \x3d zRange \x3e 0.0 ? (value - zMin) / zRange : 0.5;\nif (bubbleSizeByArea \x26\x26 pos \x3e 0.0){\npos \x3d sqrt(pos);\n}\nradius \x3d 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\n){\nfloat sign \x3d 1.0;\nfloat cvsOffset \x3d 0.0;\nif (cvsCoord) {\nsign *\x3d -1.0;\ncvsOffset \x3d 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);// + xAxisPos;\n}\nfloat yToPixels(float value, float checkTreshold){\nfloat v;\nif (skipTranslation){\nv \x3d value;// + yAxisPos;\n} else {\nv \x3d translate(value, 0.0, yAxisTrans, yAxisMin, yAxisMinPad, yAxisPointRange, yAxisLen, yAxisCVSCoord);// + yAxisPos;\nif (v \x3e plotHeight) {\nv \x3d plotHeight;\n}\n}\nif (checkTreshold \x3e 0.0 \x26\x26 hasThreshold) {\nv \x3d min(v, translatedThreshold);\n}\nreturn v;\n}\nvoid main(void) {\nif (isBubble){\ngl_PointSize \x3d bubbleRadius();\n} else {\ngl_PointSize \x3d pSize;\n}\nvColor \x3d aColor;\nif (isInverted) {\ngl_Position \x3d uPMatrix * vec4(xToPixels(aVertexPosition.y) + yAxisPos, yToPixels(aVertexPosition.x, aVertexPosition.z) + xAxisPos, 0.0, 1.0);\n} else {\ngl_Position \x3d uPMatrix * vec4(xToPixels(aVertexPosition.x) + xAxisPos, yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, 0.0, 1.0);\n}\n}",
"vertex"),l=d("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 \x3d fillColor;\nvec4 tcol;\nif (hasColor) {\ncol \x3d vColor;\n}\nif (isCircle) {\ntcol \x3d texture2D(uSampler, gl_PointCoord.st);\ncol *\x3d tcol;\nif (tcol.r \x3c 0.0) {\ndiscard;\n} else {\ngl_FragColor \x3d col;\n}\n} else {\ngl_FragColor \x3d col;\n}\n}","fragment");
if(!f||!l)return h=!1,c(),!1;h=a.createProgram();a.attachShader(h,f);a.attachShader(h,l);a.linkProgram(h);if(!a.getProgramParameter(h,a.LINK_STATUS))return k.push(a.getProgramInfoLog(h)),c(),h=!1;a.useProgram(h);a.bindAttribLocation(h,0,"aVertexPosition");m=b("uPMatrix");Q=b("pSize");n=b("fillColor");g=b("isBubble");D=b("bubbleSizeAbs");e=b("bubbleSizeByArea");I=b("uSampler");z=b("skipTranslation");A=b("isCircle");B=b("isInverted");p=b("plotHeight");return!0}function b(b,e){a&&h&&(b=N[b]=N[b]||a.getUniformLocation(h,
b),a.uniform1f(b,e))}var N={},h,m,Q,n,g,D,e,z,A,B,p,k=[],I;return a&&!f()?!1:{psUniform:function(){return Q},pUniform:function(){return m},fillColorUniform:function(){return n},setPlotHeight:function(b){a&&h&&a.uniform1f(p,b)},setBubbleUniforms:function(c,d,f){var l=c.options,v=Number.MAX_VALUE,w=-Number.MAX_VALUE;a&&h&&"bubble"===c.type&&(v=G(l.zMin,Math.min(v,Math.max(d,!1===l.displayNegative?l.zThreshold:-Number.MAX_VALUE))),w=G(l.zMax,Math.max(w,f)),a.uniform1i(g,1),a.uniform1i(A,1),a.uniform1i(e,
"width"!==c.options.sizeBy),a.uniform1i(D,c.options.sizeByAbsoluteValue),b("bubbleZMin",v),b("bubbleZMax",w),b("bubbleZThreshold",c.options.zThreshold),b("bubbleMinSize",c.minPxSize),b("bubbleMaxSize",c.maxPxSize))},bind:function(){a&&h&&a.useProgram(h)},program:function(){return h},create:f,setUniform:b,setPMatrix:function(b){a&&h&&a.uniformMatrix4fv(m,!1,b)},setColor:function(b){a&&h&&a.uniform4f(n,b[0]/255,b[1]/255,b[2]/255,b[3])},setPointSize:function(b){a&&h&&a.uniform1f(Q,b)},setSkipTranslation:function(b){a&&
h&&a.uniform1i(z,!0===b?1:0)},setTexture:function(b){a&&h&&a.uniform1i(I,b)},setDrawAsCircle:function(b){a&&h&&a.uniform1i(A,b?1:0)},reset:function(){a&&h&&(a.uniform1i(g,0),a.uniform1i(A,0))},setInverted:function(b){a&&h&&a.uniform1i(B,b)},destroy:function(){a&&h&&(a.deleteProgram(h),h=!1)}}}function R(a,c,d){function f(){b&&(a.deleteBuffer(b),l=b=!1);k=0;h=d||2;n=[]}var b=!1,l=!1,h=d||2,m=!1,k=0,n;return{destroy:f,bind:function(){if(!b)return!1;a.vertexAttribPointer(l,h,a.FLOAT,!1,0,0)},data:n,
build:function(d,D,e){var g;n=d||[];if(!(n&&0!==n.length||m))return f(),!1;h=e||h;b&&a.deleteBuffer(b);m||(g=new Float32Array(n));b=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b);a.bufferData(a.ARRAY_BUFFER,m||g,a.STATIC_DRAW);l=a.getAttribLocation(c.program(),D);a.enableVertexAttribArray(l);return!0},render:function(c,d,e){var g=m?m.length:n.length;if(!b||!g)return!1;if(!c||c>g||0>c)c=0;if(!d||d>g)d=g;a.drawArrays(a[(e||"points").toUpperCase()],c/h,(d-c)/h);return!0},allocate:function(a){k=-1;m=
new Float32Array(4*a)},push:function(a,b,c,d){m&&(m[++k]=a,m[++k]=b,m[++k]=c,m[++k]=d)}}}function qa(a){function c(a){var b,c;return a.isSeriesBoosting?(b=!!a.options.stacking,c=a.xData||a.options.xData||a.processedXData,b=(b?a.data:c||a.options.data).length,"treemap"===a.type?b*=12:"heatmap"===a.type?b*=6:fa[a.type]&&(b*=2),b):0}function d(){e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function f(a,b){function c(a){a&&(b.colorData.push(a[0]),b.colorData.push(a[1]),b.colorData.push(a[2]),b.colorData.push(a[3]))}
function e(a,b,e,d,w){c(w);q.usePreallocated?D.push(a,b,e?1:0,d||1):(B.push(a),B.push(b),B.push(e?1:0),B.push(d||1))}function d(){b.segments.length&&(b.segments[b.segments.length-1].to=B.length)}function w(){b.segments.length&&b.segments[b.segments.length-1].from===B.length||(d(),b.segments.push({from:B.length}))}function g(a,b,d,w,g){c(g);e(a+d,b);c(g);e(a,b);c(g);e(a,b+w);c(g);e(a,b+w);c(g);e(a+d,b+w);c(g);e(a+d,b)}function f(a,c){q.useGPUTranslations||(b.skipTranslation=!0,a.x=y.toPixels(a.x,!0),
a.y=z.toPixels(a.y,!0));c?B=[a.x,a.y,0,2].concat(B):e(a.x,a.y,0,2)}var ha=a.pointArrayMap&&"low,high"===a.pointArrayMap.join(","),h=a.chart,O=a.options,m=!!O.stacking,k=O.data,S=a.xAxis.getExtremes(),N=S.min,S=S.max,p=a.yAxis.getExtremes(),v=p.min,p=p.max,n=a.xData||O.xData||a.processedXData,A=a.yData||O.yData||a.processedYData,u=a.zData||O.zData||a.processedZData,z=a.yAxis,y=a.xAxis,F=a.chart.plotHeight,I=a.chart.plotWidth,G=!n||0===n.length,H=O.connectNulls,r=a.points||!1,Q=!1,J=!1,x,T,U,k=m?a.data:
n||k,n={x:Number.MAX_VALUE,y:0},K={x:-Number.MAX_VALUE,y:0},L=0,M=!1,t,ca,E=-1,Z=!1,aa=!1,ba,W="undefined"===typeof h.index,X=!1,da=!1,V=fa[a.type],ea=!1,P=!0,ga=!0,R=O.threshold;if(!(O.boostData&&0<O.boostData.length)){h.inverted&&(F=a.chart.plotWidth,I=a.chart.plotHeight);a.closestPointRangePx=Number.MAX_VALUE;w();if(r&&0<r.length)b.skipTranslation=!0,b.drawMode="triangles",r[0].node&&r[0].node.levelDynamic&&r.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}),r.forEach(function(b){var c=b.plotY,e;"undefined"===typeof c||isNaN(c)||null===b.y||(c=b.shapeArgs,e=h.styledMode?b.series.colorAttribs(b):e=b.series.pointAttribs(b),b=e["stroke-width"]||0,T=l.color(e.fill).rgba,T[0]/=255,T[1]/=255,T[2]/=255,"treemap"===a.type&&(b=b||1,U=l.color(e.stroke).rgba,U[0]/=255,U[1]/=255,U[2]/=255,g(c.x,c.y,c.width,c.height,U),b/=2),"heatmap"===a.type&&h.inverted&&(c.x=y.len-c.x,c.y=z.len-c.y,c.width=-c.width,c.height=-c.height),g(c.x+
b,c.y+b,c.width-2*b,c.height-2*b,T))});else{for(;E<k.length-1;){x=k[++E];if(W)break;G?(r=x[0],t=x[1],k[E+1]&&(aa=k[E+1][0]),k[E-1]&&(Z=k[E-1][0]),3<=x.length&&(ca=x[2],x[2]>b.zMax&&(b.zMax=x[2]),x[2]<b.zMin&&(b.zMin=x[2]))):(r=x,t=A[E],k[E+1]&&(aa=k[E+1]),k[E-1]&&(Z=k[E-1]),u&&u.length&&(ca=u[E],u[E]>b.zMax&&(b.zMax=u[E]),u[E]<b.zMin&&(b.zMin=u[E])));if(H||null!==r&&null!==t){if(aa&&aa>=N&&aa<=S&&(X=!0),Z&&Z>=N&&Z<=S&&(da=!0),ha?(G&&(t=x.slice(1,3)),ba=t[0],t=t[1]):m&&(r=x.x,t=x.stackY,ba=t-x.y),
null!==v&&"undefined"!==typeof v&&null!==p&&"undefined"!==typeof p&&(P=t>=v&&t<=p),r>S&&K.x<S&&(K.x=r,K.y=t),r<N&&n.x>N&&(n.x=r,n.y=t),null!==t||!H)if(null!==t&&(P||X||da)){if(r>=N&&r<=S&&(ea=!0),ea||X||da){if(!q.useGPUTranslations&&(b.skipTranslation=!0,r=y.toPixels(r,!0),t=z.toPixels(t,!0),t>F&&(t=F),r>I&&"points"===b.drawMode))continue;if(V){x=ba;if(!1===ba||"undefined"===typeof ba)x=0>t?t:0;ha||m||(x=Math.max(R,v));q.useGPUTranslations||(x=z.toPixels(x,!0));e(r,x,0,0,!1)}b.hasMarkers&&ea&&!1!==
Q&&(a.closestPointRangePx=Math.min(a.closestPointRangePx,Math.abs(r-Q)));!q.useGPUTranslations&&!q.usePreallocated&&Q&&1>Math.abs(r-Q)&&J&&1>Math.abs(t-J)?q.debug.showSkipSummary&&++L:(O.step&&!ga&&e(r,J,0,2,!1),e(r,t,0,"bubble"===a.type?ca||1:2,!1),Q=r,J=t,M=!0,ga=!1)}}else w()}else w()}q.debug.showSkipSummary&&console.log("skipped points:",L);M||!1===H||"line_strip"!==a.drawMode||(n.x<Number.MAX_VALUE&&f(n,!0),K.x>-Number.MAX_VALUE&&f(K))}d()}}function b(){v=[];y.data=B=[];u=[];D&&D.destroy()}function k(a){g&&
(g.setUniform("xAxisTrans",a.transA),g.setUniform("xAxisMin",a.min),g.setUniform("xAxisMinPad",a.minPixelPadding),g.setUniform("xAxisPointRange",a.pointRange),g.setUniform("xAxisLen",a.len),g.setUniform("xAxisPos",a.pos),g.setUniform("xAxisCVSCoord",!a.horiz))}function h(a){g&&(g.setUniform("yAxisTrans",a.transA),g.setUniform("yAxisMin",a.min),g.setUniform("yAxisMinPad",a.minPixelPadding),g.setUniform("yAxisPointRange",a.pointRange),g.setUniform("yAxisLen",a.len),g.setUniform("yAxisPos",a.pos),g.setUniform("yAxisCVSCoord",
!a.horiz))}function m(a,b){g.setUniform("hasThreshold",a);g.setUniform("translatedThreshold",b)}function p(c){if(c)z=c.chartWidth||800,A=c.chartHeight||400;else return!1;if(!(e&&z&&A&&g))return!1;q.debug.timeRendering&&console.time("gl rendering");e.canvas.width=z;e.canvas.height=A;g.bind();e.viewport(0,0,z,A);g.setPMatrix([2/z,0,0,0,0,-(2/A),0,0,0,0,-2,0,-1,1,-1,1]);g.setPlotHeight(c.plotHeight);1<q.lineWidth&&!l.isMS&&e.lineWidth(q.lineWidth);D.build(y.data,"aVertexPosition",4);D.bind();g.setInverted(c.inverted);
v.forEach(function(a,b){var d=a.series.options,f=d.marker,C;C="undefined"!==typeof d.lineWidth?d.lineWidth:1;var w=d.threshold,n=J(w),N=a.series.yAxis.getThreshold(w),w=G(d.marker?d.marker.enabled:null,a.series.xAxis.isRadial?!0:null,a.series.closestPointRangePx>2*((d.marker?d.marker.radius:10)||10)),f=F[f&&f.symbol||a.series.symbol]||F.circle;if(!(0===a.segments.length||a.segmentslength&&a.segments[0].from===a.segments[0].to)){f.isReady&&(e.bindTexture(e.TEXTURE_2D,f.handle),g.setTexture(f.handle));
c.styledMode?f=a.series.markerGroup&&a.series.markerGroup.getStyle("fill"):(f=a.series.pointAttribs&&a.series.pointAttribs().fill||a.series.color,d.colorByPoint&&(f=a.series.chart.options.colors[b]));a.series.fillOpacity&&d.fillOpacity&&(f=(new ia(f)).setOpacity(G(d.fillOpacity,1)).get());f=l.color(f).rgba;q.useAlpha||(f[3]=1);"lines"===a.drawMode&&q.useAlpha&&1>f[3]&&(f[3]/=10);"add"===d.boostBlending?(e.blendFunc(e.SRC_ALPHA,e.ONE),e.blendEquation(e.FUNC_ADD)):"mult"===d.boostBlending||"multiply"===
d.boostBlending?e.blendFunc(e.DST_COLOR,e.ZERO):"darken"===d.boostBlending?(e.blendFunc(e.ONE,e.ONE),e.blendEquation(e.FUNC_MIN)):e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);g.reset();0<a.colorData.length&&(g.setUniform("hasColor",1),b=R(e,g),b.build(a.colorData,"aColor",4),b.bind());g.setColor(f);k(a.series.xAxis);h(a.series.yAxis);m(n,N);"points"===a.drawMode&&(d.marker&&d.marker.radius?g.setPointSize(2*d.marker.radius):g.setPointSize(1));g.setSkipTranslation(a.skipTranslation);
"bubble"===a.series.type&&g.setBubbleUniforms(a.series,a.zMin,a.zMax);g.setDrawAsCircle(H[a.series.type]||!1);if(0<C||"line_strip"!==a.drawMode)for(C=0;C<a.segments.length;C++)D.render(a.segments[C].from,a.segments[C].to,a.drawMode);if(a.hasMarkers&&w)for(d.marker&&d.marker.radius?g.setPointSize(2*d.marker.radius):g.setPointSize(10),g.setDrawAsCircle(!0),C=0;C<a.segments.length;C++)D.render(a.segments[C].from,a.segments[C].to,"POINTS")}});q.debug.timeRendering&&console.timeEnd("gl rendering");a&&
a();b()}function n(a){d();if(a.renderer.forExport)return p(a);I?p(a):setTimeout(function(){n(a)},1)}var g=!1,D=!1,e=!1,z=0,A=0,B=!1,u=!1,y={},I=!1,v=[],F={},fa={column:!0,columnrange:!0,bar:!0,area:!0,arearange:!0},H={scatter:!0,bubble:!0},q={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 y={allocateBufferForSingleSeries:function(a){var b=
0;q.usePreallocated&&(a.isSeriesBoosting&&(b=c(a)),D.allocate(b))},pushSeries:function(a){0<v.length&&v[v.length-1].hasMarkers&&(v[v.length-1].markerTo=u.length);q.debug.timeSeriesProcessing&&console.time("building "+a.type+" series");v.push({segments:[],markerFrom:u.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"});f(a,v[v.length-1]);q.debug.timeSeriesProcessing&&console.timeEnd("building "+a.type+" series")},setSize:function(a,b){z===a&&A===b||!g||(z=a,A=b,g.bind(),g.setPMatrix([2/z,0,0,0,0,-(2/A),0,0,0,0,-2,0,-1,1,-1,1]))},inited:function(){return I},setThreshold:m,init:function(a,c){function d(a,b){var c={isReady:!1,texture:K.createElement("canvas"),handle:e.createTexture()},d=c.texture.getContext("2d");
F[a]=c;c.texture.width=512;c.texture.height=512;d.mozImageSmoothingEnabled=!1;d.webkitImageSmoothingEnabled=!1;d.msImageSmoothingEnabled=!1;d.imageSmoothingEnabled=!1;d.strokeStyle="rgba(255, 255, 255, 0)";d.fillStyle="#FFF";b(d);try{e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,c.handle),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,c.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,
e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),c.isReady=!0}catch(xa){}}var f=0,h=["webgl","experimental-webgl","moz-webgl","webkit-3d"];I=!1;if(!a)return!1;for(q.debug.timeSetup&&console.time("gl setup");f<h.length&&!(e=a.getContext(h[f],{}));f++);if(e)c||b();else return!1;e.enable(e.BLEND);e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA);e.disable(e.DEPTH_TEST);e.depthFunc(e.LESS);g=pa(e);if(!g)return!1;D=R(e,g);d("circle",
function(a){a.beginPath();a.arc(256,256,256,0,2*Math.PI);a.stroke();a.fill()});d("square",function(a){a.fillRect(0,0,512,512)});d("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()});d("triangle",function(a){a.beginPath();a.moveTo(0,512);a.lineTo(256,0);a.lineTo(512,512);a.lineTo(0,512);a.fill()});d("triangle-down",function(a){a.beginPath();a.moveTo(0,0);a.lineTo(256,512);a.lineTo(512,0);a.lineTo(0,0);a.fill()});I=!0;q.debug.timeSetup&&
console.timeEnd("gl setup");return!0},render:n,settings:q,valid:function(){return!1!==e},clear:d,flush:b,setXAxis:k,setYAxis:h,data:B,gl:function(){return e},allocateBuffer:function(a){var b=0;q.usePreallocated&&(a.series.forEach(function(a){a.isSeriesBoosting&&(b+=c(a))}),D.allocate(b))},destroy:function(){b();D.destroy();g.destroy();e&&(ra(F,function(a){F[a].handle&&e.deleteTexture(F[a].handle)}),e.canvas.width=1,e.canvas.height=1)},setOptions:function(a){sa(!0,q,a)}}}function ja(a,c){var d=a.chartWidth,
f=a.chartHeight,b=a,k=a.seriesGroup||c.group,h=K.implementation.hasFeature("www.http://w3.org/TR/SVG11/feature#Extensibility","1.1"),b=a.isChartSeriesBoosting()?a:c,h=!1;b.renderTarget||(b.canvas=ta,a.renderer.forExport||!h?(b.renderTarget=a.renderer.image("",0,0,d,f).addClass("highcharts-boost-canvas").add(k),b.boostClear=function(){b.renderTarget.attr({href:""})},b.boostCopy=function(){b.boostResizeTarget();b.renderTarget.attr({href:b.canvas.toDataURL("image/png")})}):(b.renderTargetFo=a.renderer.createElement("foreignObject").add(k),
b.renderTarget=K.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(){d=a.chartWidth;f=a.chartHeight;(b.renderTargetFo||b.renderTarget).attr({x:0,y:0,width:d,
height:f}).css({pointerEvents:"none",mixedBlendMode:"normal",opacity:1});b instanceof l.Chart&&b.markerGroup.translate(a.plotLeft,a.plotTop)},b.boostClipRect=a.renderer.clipRect(),(b.renderTargetFo||b.renderTarget).clip(b.boostClipRect),b instanceof l.Chart&&(b.markerGroup=b.renderer.g().add(k),b.markerGroup.translate(c.xAxis.pos,c.yAxis.pos)));b.canvas.width=d;b.canvas.height=f;b.boostClipRect.attr(a.getBoostClipRect(b));b.boostResizeTarget();b.boostClear();b.ogl||(b.ogl=qa(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)||l.error("[highcharts boost] - unable to init WebGL renderer"),b.ogl.setOptions(a.options.boost||{}),b instanceof l.Chart&&b.ogl.allocateBuffer(a));b.ogl.setSize(d,f);return b.ogl}function ka(a,c,d){a&&c.renderTarget&&c.canvas&&!(d||c.chart).isChartSeriesBoosting()&&a.render(d||c.chart)}function la(a,c){a&&c.renderTarget&&c.canvas&&!c.chart.isChartSeriesBoosting()&&
a.allocateBufferForSingleSeries(c)}function ua(a){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 a.call(this);this.chart.isBoosting=!0;if(a=ja(this.chart,this))la(a,this),a.pushSeries(this);ka(a,this)}var L=l.win,K=L.document,va=function(){},ma=l.Chart,ia=l.Color,p=l.Series,k=l.seriesTypes,ra=l.objectEach,na=l.extend,M=l.addEvent,wa=l.fireEvent,J=l.isNumber,sa=
l.merge,G=l.pick,y=l.wrap,W=l.getOptions().plotOptions,ta=K.createElement("canvas"),X,oa="area arearange column columnrange bar line scatter heatmap bubble treemap".split(" "),H={};oa.forEach(function(a){H[a]=1});ia.prototype.names={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"};ma.prototype.isChartSeriesBoosting=function(){return G(this.options.boost&&this.options.boost.seriesThreshold,50)<=this.series.length||V(this)};ma.prototype.getBoostClipRect=function(a){var c={x:this.plotLeft,y:this.plotTop,width:this.plotWidth,height:this.plotHeight};a===this&&this.yAxis.forEach(function(a){c.y=Math.min(a.pos,c.y);c.height=Math.max(a.pos-this.plotTop+a.len,c.height)},this);return c};l.eachAsync=function(a,c,d,f,b,k){b=b||0;f=f||3E4;for(var h=b+f,m=!0;m&&b<
h&&b<a.length;)m=c(a[b],b),++b;m&&(b<a.length?k?l.eachAsync(a,c,d,f,b,k):L.requestAnimationFrame?L.requestAnimationFrame(function(){l.eachAsync(a,c,d,f,b)}):setTimeout(function(){l.eachAsync(a,c,d,f,b)}):d&&d())};p.prototype.getPoint=function(a){var c=a,d=this.xData||this.options.xData||this.processedXData||!1;!a||a instanceof this.pointClass||(c=(new this.pointClass).init(this,this.options.data[a.i],d?d[a.i]:void 0),c.category=c.x,c.dist=a.dist,c.distX=a.distX,c.plotX=a.plotX,c.plotY=a.plotY,c.index=
a.i);return c};y(p.prototype,"searchPoint",function(a){return this.getPoint(a.apply(this,[].slice.call(arguments,1)))});M(p,"destroy",function(){var a=this,c=a.chart;c.markerGroup===a.markerGroup&&(a.markerGroup=null);c.hoverPoints&&(c.hoverPoints=c.hoverPoints.filter(function(c){return c.series===a}));c.hoverPoint&&c.hoverPoint.series===a&&(c.hoverPoint=null)});y(p.prototype,"getExtremes",function(a){if(!this.isSeriesBoosting||!this.hasExtremes||!this.hasExtremes())return a.apply(this,Array.prototype.slice.call(arguments,
1))});oa.forEach(function(a){W[a]&&(W[a].boostThreshold=5E3,W[a].boostData=[],k[a].prototype.fillOpacity=!0)});["translate","generatePoints","drawTracker","drawPoints","render"].forEach(function(a){function c(c){var d=this.options.stacking&&("translate"===a||"generatePoints"===a);if(!this.isSeriesBoosting||d||!P(this.chart)||"heatmap"===this.type||"treemap"===this.type||!H[this.type]||0===this.options.boostThreshold)c.call(this);else if(this[a+"Canvas"])this[a+"Canvas"]()}y(p.prototype,a,c);"translate"===
a&&"column bar arearange columnrange heatmap treemap".split(" ").forEach(function(d){k[d]&&y(k[d].prototype,a,c)})});y(p.prototype,"processData",function(a){function c(a){return d.chart.isChartSeriesBoosting()||(a?a.length:0)>=(d.options.boostThreshold||Number.MAX_VALUE)}var d=this,f=this.options.data;P(this.chart)&&H[this.type]?(c(f)&&"heatmap"!==this.type&&"treemap"!==this.type&&!this.options.stacking&&this.hasExtremes&&this.hasExtremes(!0)||(a.apply(this,Array.prototype.slice.call(arguments,1)),
f=this.processedXData),(this.isSeriesBoosting=c(f))?this.enterBoost():this.exitBoost&&this.exitBoost()):a.apply(this,Array.prototype.slice.call(arguments,1))});M(p,"hide",function(){this.canvas&&this.renderTarget&&(this.ogl&&this.ogl.clear(),this.boostClear())});p.prototype.enterBoost=function(){this.alteredByBoost=[];["allowDG","directTouch","stickyTracking"].forEach(function(a){this.alteredByBoost.push({prop:a,val:this[a],own:this.hasOwnProperty(a)})},this);this.directTouch=this.allowDG=!1;this.stickyTracking=
!0;this.animate=null;this.labelBySeries&&(this.labelBySeries=this.labelBySeries.destroy())};p.prototype.exitBoost=function(){(this.alteredByBoost||[]).forEach(function(a){a.own?this[a.prop]=a.val:delete this[a.prop]},this);this.boostClear&&this.boostClear()};p.prototype.hasExtremes=function(a){var c=this.options,d=this.xAxis&&this.xAxis.options,f=this.yAxis&&this.yAxis.options;return c.data.length>(c.boostThreshold||Number.MAX_VALUE)&&J(f.min)&&J(f.max)&&(!a||J(d.min)&&J(d.max))};p.prototype.destroyGraphics=
function(){var a=this,c=this.points,d,f;if(c)for(f=0;f<c.length;f+=1)(d=c[f])&&d.destroyElements&&d.destroyElements();["graph","area","tracker"].forEach(function(b){a[b]&&(a[b]=a[b].destroy())})};l.hasWebGLSupport=function(){var a=0,c,d=["webgl","experimental-webgl","moz-webgl","webkit-3d"],f=!1;if("undefined"!==typeof L.WebGLRenderingContext)for(c=K.createElement("canvas");a<d.length;a++)try{if(f=c.getContext(d[a]),"undefined"!==typeof f&&null!==f)return!0}catch(b){}return!1};l.hasWebGLSupport()?
(l.extend(p.prototype,{renderCanvas:function(){function a(a,b){var c,d,f=!1,g="undefined"===typeof k.index,l=!0;if(!g&&(J?(c=a[0],d=a[1]):(c=a,d=n[b]),G?(J&&(d=a.slice(1,3)),f=d[0],d=d[1]):H&&(c=a.x,d=a.stackY,f=d-a.y),w||(l=d>=z&&d<=A),null!==d&&c>=u&&c<=e&&l))if(a=h.toPixels(c,!0),K){if(void 0===Y||a===y){G||(f=d);if(void 0===C||d>M)M=d,C=b;if(void 0===Y||f<L)L=f,Y=b}a!==y&&(void 0!==Y&&(d=m.toPixels(M,!0),F=m.toPixels(L,!0),R(a,d,C),F!==d&&R(a,F,Y)),Y=C=void 0,y=a)}else d=Math.ceil(m.toPixels(d,
!0)),R(a,d,b);return!g}function c(){wa(d,"renderedCanvas");delete d.buildKDTree;d.buildKDTree();P.debug.timeKDTree&&console.timeEnd("kd tree building")}var d=this,f=d.options||{},b=!1,k=d.chart,h=this.xAxis,m=this.yAxis,p=f.xData||d.processedXData,n=f.yData||d.processedYData,g=f.data,b=h.getExtremes(),u=b.min,e=b.max,b=m.getExtremes(),z=b.min,A=b.max,B={},y,K=!!d.sampling,I,v=!1!==f.enableMouseTracking,F=m.getThreshold(f.threshold),G=d.pointArrayMap&&"low,high"===d.pointArrayMap.join(","),H=!!f.stacking,
q=d.cropStart||0,w=d.requireSorting,J=!p,L,M,Y,C,P,W="x"===f.findNearestPointBy,V=this.xData||this.options.xData||this.processedXData||!1,R=function(a,b,c){a=Math.ceil(a);X=W?a:a+","+b;v&&!B[X]&&(B[X]=!0,k.inverted&&(a=h.len-a,b=m.len-b),I.push({x:V?V[q+c]:!1,clientX:a,plotX:a,plotY:b,i:q+c}))},b=ja(k,d);k.isBoosting=!0;P=b.settings;if(this.visible){if(this.points||this.graph)this.animate=null,this.destroyGraphics();k.isChartSeriesBoosting()?(this.markerGroup=k.markerGroup,this.renderTarget&&(this.renderTarget=
this.renderTarget.destroy())):this.markerGroup=d.plotGroup("markerGroup","markers",!0,1,k.seriesGroup);I=this.points=[];d.buildKDTree=va;b&&(la(b,this),b.pushSeries(d),ka(b,this,k));k.renderer.forExport||(P.debug.timeKDTree&&console.time("kd tree building"),l.eachAsync(H?d.data:p||g,a,c))}}}),["heatmap","treemap"].forEach(function(a){k[a]&&y(k[a].prototype,"drawPoints",ua)}),k.bubble&&(delete k.bubble.prototype.buildKDTree,y(k.bubble.prototype,"markerAttribs",function(a){return this.isSeriesBoosting?
!1:a.apply(this,[].slice.call(arguments,1))})),k.scatter.prototype.fill=!0,na(k.area.prototype,{fill:!0,fillOpacity:!0,sampling:!0}),na(k.column.prototype,{fill:!0,sampling:!0}),l.Chart.prototype.callbacks.push(function(a){M(a,"predraw",function(){a.boostForceChartBoost=void 0;a.boostForceChartBoost=V(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)})})):"undefined"!==typeof l.initCanvasBoost?l.initCanvasBoost():l.error(26)})(u)});
//# sourceMappingURL=boost.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,17 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
(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(function(){return f}):f("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(f){(function(g){var f=g.addEvent,n=g.pick,u=g.extend,v=g.isArray,r=g.fireEvent,m=g.Axis,t=g.Series;u(m.prototype,{isInBreak:function(b,c){var e=b.repeat||Infinity,d=b.from,a=b.to-b.from;c=c>=d?(c-d)%e:e-(d-c)%e;return b.inclusive?c<=a:c<a&&0!==c},isInAnyBreak:function(b,c){var e=this.options.breaks,
d=e&&e.length,a,k,h;if(d){for(;d--;)this.isInBreak(e[d],b)&&(a=!0,k||(k=n(e[d].showPoints,!this.isXAxis)));h=a&&c?a&&!k:a}return h}});f(m,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});f(m,"afterSetTickPositions",function(){if(this.isBroken){var b=this.tickPositions,c=this.tickPositions.info,e=[],d;for(d=0;d<b.length;d++)this.isInAnyBreak(b[d])||e.push(b[d]);this.tickPositions=e;this.tickPositions.info=c}});f(m,"afterSetOptions",function(){this.isBroken&&
(this.options.ordinal=!1)});m.prototype.setBreaks=function(b,c){function e(b){var d=b,c,e;for(e=0;e<a.breakArray.length;e++)if(c=a.breakArray[e],c.to<=b)d-=c.len;else if(c.from>=b)break;else if(a.isInBreak(c,b)){d-=b-c.from;break}return d}function d(b){var c,d;for(d=0;d<a.breakArray.length&&!(c=a.breakArray[d],c.from>=b);d++)c.to<b?b+=c.len:a.isInBreak(c,b)&&(b+=c.len);return b}var a=this,k=v(b)&&!!b.length;a.isDirty=a.isBroken!==k;a.isBroken=k;a.options.breaks=a.userOptions.breaks=b;a.forceRedraw=
!0;k||a.val2lin!==e||(delete a.val2lin,delete a.lin2val);k&&(a.userOptions.ordinal=!1,a.val2lin=e,a.lin2val=d,a.setExtremes=function(a,b,c,d,e){if(this.isBroken){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(b);)b-=this.closestPointRange}m.prototype.setExtremes.call(this,a,b,c,d,e)},a.setAxisTranslation=function(b){m.prototype.setAxisTranslation.call(this,b);this.unitLength=null;if(this.isBroken){b=a.options.breaks;var c=[],d=[],e=0,k,f,h=a.userMin||a.min,g=a.userMax||
a.max,q=n(a.pointRangePadding,0),l,p;b.forEach(function(b){f=b.repeat||Infinity;a.isInBreak(b,h)&&(h+=b.to%f-h%f);a.isInBreak(b,g)&&(g-=g%f-b.from%f)});b.forEach(function(a){l=a.from;for(f=a.repeat||Infinity;l-f>h;)l-=f;for(;l<h;)l+=f;for(p=l;p<g;p+=f)c.push({value:p,move:"in"}),c.push({value:p+(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});k=0;l=h;c.forEach(function(a){k+="in"===a.move?1:-1;1===
k&&"in"===a.move&&(l=a.value);0===k&&(d.push({from:l,to:a.value,len:a.value-l-(a.size||0)}),e+=a.value-l-(a.size||0))});a.breakArray=d;a.unitLength=g-h-e+q;r(a,"afterBreaks");a.staticScale?a.transA=a.staticScale:a.unitLength&&(a.transA*=(g-a.min+q)/a.unitLength);q&&(a.minPixelPadding=a.transA*a.minPointOffset);a.min=h;a.max=g}});n(c,!0)&&this.chart.redraw()};f(t,"afterGeneratePoints",function(){var b=this.xAxis,c=this.yAxis,e=this.points,d,a=e.length,f=this.options.connectNulls,h;if(b&&c&&(b.options.breaks||
c.options.breaks))for(;a--;)d=e[a],h=null===d.y&&!1===f,h||!b.isInAnyBreak(d.x,!0)&&!c.isInAnyBreak(d.y,!0)||(e.splice(a,1),this.data[a]&&this.data[a].destroyElements())});f(t,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,n(this.pointArrayMap,["y"]))});g.Series.prototype.drawBreaks=function(b,c){var e=this,d=e.points,a,f,h,g;b&&c.forEach(function(c){a=b.breakArray||[];f=b.isXAxis?b.min:n(e.options.threshold,b.min);d.forEach(function(d){g=n(d["stack"+c.toUpperCase()],
d[c]);a.forEach(function(a){h=!1;if(f<a.from&&g>a.to||f>a.from&&g<a.from)h="pointBreak";else if(f<a.from&&g>a.from&&g<a.to||f>a.from&&g>a.to&&g<a.from)h="pointInBreak";h&&r(b,h,{point:d,brk:a})})})})};g.Series.prototype.gappedPath=function(){var b=this.currentDataGrouping,c=b&&b.gapSize,b=this.options.gapSize,e=this.points.slice(),d=e.length-1,a=this.yAxis;if(b&&0<d)for("value"!==this.options.gapUnit&&(b*=this.closestPointRange),c&&c>b&&(b=c);d--;)e[d+1].x-e[d].x>b&&(c=(e[d].x+e[d+1].x)/2,e.splice(d+
1,0,{isNull:!0,x:c}),this.options.stacking&&(c=a.stacks[this.stackKey][c]=new g.StackItem(a,a.options.stackLabels,!1,c,this.stack),c.total=0));return this.getGraphPath(e)}})(f)});
//# sourceMappingURL=broken-axis.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,539 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
*
* (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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/**
* (c) 2009-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
var addEvent = H.addEvent,
pick = H.pick,
extend = H.extend,
isArray = H.isArray,
fireEvent = H.fireEvent,
Axis = H.Axis,
Series = H.Series;
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;
}
});
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<*>} [breaks]
* The breaks to add. When `undefined` it removes existing breaks.
*
* @param {boolean} [redraw=true]
* Whether to redraw the chart immediately.
*/
Axis.prototype.setBreaks = function (breaks, redraw) {
var axis = this,
isBroken = (isArray(breaks) && !!breaks.length);
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;
}
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;
}
axis.isDirty = axis.isBroken !== isBroken;
axis.isBroken = isBroken;
axis.options.breaks = axis.userOptions.breaks = breaks;
axis.forceRedraw = true; // Force recalculation in setScale
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 it to before and
// after the break ( #3857 )
if (this.isBroken) {
while (this.isInAnyBreak(newMin)) {
newMin -= this.closestPointRange;
}
while (this.isInAnyBreak(newMax)) {
newMax -= this.closestPointRange;
}
}
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,
breakArrayT = [], // Temporary one
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 series = this,
xAxis = series.xAxis,
yAxis = series.yAxis,
points = series.points,
point,
i = points.length,
connectNulls = series.options.connectNulls,
nullGap;
if (xAxis && yAxis && (xAxis.options.breaks || yAxis.options.breaks)) {
while (i--) {
point = points[i];
// Respect nulls inside the break (#4275)
nullGap = point.y === null && connectNulls === false;
if (
!nullGap &&
(
xAxis.isInAnyBreak(point.x, true) ||
yAxis.isInAnyBreak(point.y, true)
)
) {
points.splice(i, 1);
if (this.data[i]) {
// Removes the graphics for this point if they exist
this.data[i].destroyElements();
}
}
}
}
});
addEvent(Series, 'afterRender', function drawPointsWrapped() {
this.drawBreaks(this.xAxis, ['x']);
this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
});
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
*/
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,
xRange,
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
* @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"]
* @apioption plotOptions.series.gapUnit
*/
if (gapSize && i > 0) { // #5008
// Gap unit is relative
if (this.options.gapUnit !== 'value') {
gapSize *= this.closestPointRange;
}
// Setting a new gapSize in case dataGrouping is enabled (#7686)
if (groupingSize && groupingSize > gapSize) {
gapSize = groupingSize;
}
// extension for ordinal breaks
while (i--) {
if (points[i + 1].x - points[i].x > gapSize) {
xRange = (points[i].x + points[i + 1].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;
}
}
}
}
// Call base method
return this.getGraphPath(points);
};
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,14 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
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(function(){return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){(function(a){var r=a.pick,n=a.isNumber,v=a.relativeLength,p=a.seriesType,f=a.seriesTypes.column.prototype;p("bullet","column",{targetOptions:{width:"140%",height:3,borderWidth:0},tooltip:{pointFormat:'\x3cspan style\x3d"color:{series.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.y}\x3c/b\x3e. Target: \x3cb\x3e{point.target}\x3c/b\x3e\x3cbr/\x3e'}},
{pointArrayMap:["y","target"],parallelArrays:["x","y","target"],drawPoints:function(){var b=this,k=b.chart,h=b.options,p=h.animationLimit||250;f.drawPoints.apply(this);b.points.forEach(function(c){var f=c.options,g,d=c.targetGraphic,l=c.target,m=c.y,q,t,e,u;n(l)&&null!==l?(e=a.merge(h.targetOptions,f.targetOptions),t=e.height,g=c.shapeArgs,q=v(e.width,g.width),u=b.yAxis.translate(l,!1,!0,!1,!0)-e.height/2-.5,g=b.crispCol.apply({chart:k,borderWidth:e.borderWidth,options:{crisp:h.crisp}},[g.x+g.width/
2-q/2,u,q,t]),d?(d[k.pointCount<p?"animate":"attr"](g),n(m)&&null!==m?d.element.point=c:d.element.point=void 0):c.targetGraphic=d=k.renderer.rect().attr(g).add(b.group),k.styledMode||d.attr({fill:r(e.color,f.color,b.zones.length&&(c.getZone.call({series:b,x:c.x,y:l,options:{}}).color||b.color)||void 0,c.color,b.color),stroke:r(e.borderColor,c.borderColor,b.options.borderColor),"stroke-width":e.borderWidth}),n(m)&&null!==m&&(d.element.point=c),d.addClass(c.getClassName()+" highcharts-bullet-target",
!0)):d&&(c.targetGraphic=d.destroy())})},getExtremes:function(b){var a=this.targetData,h;f.getExtremes.call(this,b);a&&a.length&&(b=this.dataMax,h=this.dataMin,f.getExtremes.call(this,a),this.dataMax=Math.max(this.dataMax,b),this.dataMin=Math.min(this.dataMin,h))}},{destroy:function(){this.targetGraphic&&(this.targetGraphic=this.targetGraphic.destroy());f.pointClass.prototype.destroy.apply(this,arguments)}})})(a)});
//# sourceMappingURL=bullet.js.map
@@ -0,0 +1 @@
{"version":3,"file":"bullet.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,QAAS,EAAG,CACf,MAAOH,EADQ,CAAnB,CADG,CAKHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CATY,CAAnB,CAAA,CAWC,QAAS,CAACD,CAAD,CAAa,CACnB,SAAS,CAACE,CAAD,CAAI,CAAA,IASNC,EAAOD,CAAAC,KATD,CAUNC,EAAWF,CAAAE,SAVL,CAWNC,EAAiBH,CAAAG,eAXX,CAYNC,EAAaJ,CAAAI,WAZP,CAaNC,EAAcL,CAAAM,YAAAC,OAAAC,UAWlBJ,EAAA,CAAW,QAAX,CAAqB,QAArB,CAiBM,CAMEK,cAAe,CAQXC,MAAO,MARI,CAeXC,OAAQ,CAfG,CAoDXC,YAAa,CApDF,CANjB,CA6DEC,QAAS,CACLC,YAAa,mKADR,CA7DX,CAjBN;AAmFO,CACCC,cAAe,CAAC,GAAD,CAAM,QAAN,CADhB,CAECC,eAAgB,CAAC,GAAD,CAAM,GAAN,CAAW,QAAX,CAFjB,CAYCC,WAAYA,QAAS,EAAG,CAAA,IAChBC,EAAS,IADO,CAEhBC,EAAQD,CAAAC,MAFQ,CAGhBC,EAAUF,CAAAE,QAHM,CAIhBC,EAAiBD,CAAAC,eAAjBA,EAA2C,GAE/ChB,EAAAY,WAAAK,MAAA,CAA6B,IAA7B,CAEAJ,EAAAK,OAAAC,QAAA,CAAsB,QAAS,CAACC,CAAD,CAAQ,CAAA,IAC/BC,EAAeD,CAAAL,QADgB,CAE/BO,CAF+B,CAG/BC,EAAgBH,CAAAG,cAHe,CAK/BC,EAAYJ,CAAAK,OALmB,CAM/BC,EAAWN,CAAAO,EANoB,CAO/BtB,CAP+B,CAQ/BC,CAR+B,CAS/BF,CAT+B,CAU/BuB,CAEA9B,EAAA,CAAS2B,CAAT,CAAJ,EAAyC,IAAzC,GAA2BA,CAA3B,EACIpB,CAmFA,CAnFgBT,CAAAiC,MAAA,CACZb,CAAAX,cADY,CAEZiB,CAAAjB,cAFY,CAmFhB,CA/EAE,CA+EA,CA/ESF,CAAAE,OA+ET,CA7EAgB,CA6EA,CA7EYF,CAAAE,UA6EZ,CA5EAjB,CA4EA,CA5EQP,CAAA,CACJM,CAAAC,MADI,CAEJiB,CAAAjB,MAFI,CA4ER,CAxEAsB,CAwEA,CAxEId,CAAAgB,MAAAC,UAAA,CACAN,CADA,CAEA,CAAA,CAFA,CAGA,CAAA,CAHA,CAIA,CAAA,CAJA,CAKA,CAAA,CALA,CAwEJ,CAlEIpB,CAAAE,OAkEJ,CAlE2B,CAkE3B,CAlE+B,EAkE/B,CAhEAyB,CAgEA,CAhEkBlB,CAAAmB,SAAAf,MAAA,CAAsB,CAEpCH,MAAOA,CAF6B,CAGpCP,YAAaH,CAAAG,YAHuB,CAIpCQ,QAAS,CACLkB,MAAOlB,CAAAkB,MADF,CAJ2B,CAAtB,CAOf,CACCX,CAAAY,EADD,CACeZ,CAAAjB,MADf;AACiC,CADjC,CACqCA,CADrC,CAC6C,CAD7C,CAECsB,CAFD,CAGCtB,CAHD,CAICC,CAJD,CAPe,CAgElB,CAlDIiB,CAAJ,EAEIA,CAAA,CACIT,CAAAqB,WAAA,CAAmBnB,CAAnB,CACI,SADJ,CAEI,MAHR,CAAA,CAIEe,CAJF,CAOA,CAAIlC,CAAA,CAAS6B,CAAT,CAAJ,EAAuC,IAAvC,GAA0BA,CAA1B,CACIH,CAAAa,QAAAhB,MADJ,CACkCA,CADlC,CAGIG,CAAAa,QAAAhB,MAHJ,CAGkC1B,IAAAA,EAZtC,EAeI0B,CAAAG,cAfJ,CAe0BA,CAf1B,CAe0CT,CAAAuB,SAAAC,KAAA,EAAAC,KAAA,CAE5BR,CAF4B,CAAAS,IAAA,CAG7B3B,CAAA4B,MAH6B,CAmC1C,CA5BK3B,CAAA4B,WA4BL,EA3BInB,CAAAgB,KAAA,CAAmB,CACfI,KAAM/C,CAAA,CACFQ,CAAAwC,MADE,CAEFvB,CAAAuB,MAFE,CAGD/B,CAAAgC,MAAAC,OAHC,GAGuB1B,CAAA2B,QAAAC,KAAA,CAAmB,CACxCnC,OAAQA,CADgC,CAExCqB,EAAGd,CAAAc,EAFqC,CAGxCP,EAAGH,CAHqC,CAIxCT,QAAS,EAJ+B,CAAnB,CAAA6B,MAHvB,EAQU/B,CAAA+B,MARV,GAQ4BlD,IAAAA,EAR5B,CASF0B,CAAAwB,MATE,CAUF/B,CAAA+B,MAVE,CADS,CAafK,OAAQrD,CAAA,CACJQ,CAAA8C,YADI,CAEJ9B,CAAA8B,YAFI,CAGJrC,CAAAE,QAAAmC,YAHI,CAbO,CAkBf,eAAgB9C,CAAAG,YAlBD,CAAnB,CA2BJ,CAJIV,CAAA,CAAS6B,CAAT,CAIJ,EAJuC,IAIvC,GAJ0BA,CAI1B,GAHIH,CAAAa,QAAAhB,MAGJ,CAHkCA,CAGlC,EAAAG,CAAA4B,SAAA,CAAuB/B,CAAAgC,aAAA,EAAvB,CACA,2BADA;AAC6B,CAAA,CAD7B,CApFJ,EAsFW7B,CAtFX,GAuFIH,CAAAG,cAvFJ,CAuF0BA,CAAA8B,QAAA,EAvF1B,CAZmC,CAAvC,CARoB,CAZzB,CAkICC,YAAaA,QAAS,CAACC,CAAD,CAAQ,CAAA,IAEtBC,EADS3C,IACI2C,WAFS,CAItBC,CAEJzD,EAAAsD,YAAAN,KAAA,CAA6B,IAA7B,CAAmCO,CAAnC,CAEIC,EAAJ,EAAkBA,CAAAV,OAAlB,GACIY,CAIA,CAZS7C,IAQF8C,QAIP,CAHAF,CAGA,CAZS5C,IASF+C,QAGP,CAFA5D,CAAAsD,YAAAN,KAAA,CAA6B,IAA7B,CAAmCQ,CAAnC,CAEA,CAZS3C,IAWT8C,QACA,CADiBE,IAAAC,IAAA,CAXRjD,IAWiB8C,QAAT,CAAyBD,CAAzB,CACjB,CAZS7C,IAYT+C,QAAA,CAAiBC,IAAAE,IAAA,CAZRlD,IAYiB+C,QAAT,CAAyBH,CAAzB,CALrB,CAR0B,CAlI/B,CAnFP,CAwOI,CAQIJ,QAASA,QAAS,EAAG,CACb,IAAA9B,cAAJ,GACI,IAAAA,cADJ,CACyB,IAAAA,cAAA8B,QAAA,EADzB,CAGArD,EAAAgE,WAAA7D,UAAAkD,QAAApC,MAAA,CAA+C,IAA/C,CAAqDgD,SAArD,CAJiB,CARzB,CAxOJ,CAxBU,CAAb,CAAA,CAwWCxE,CAxWD,CADmB,CAXvB;","sources":["bullet.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","H","pick","isNumber","relativeLength","seriesType","columnProto","seriesTypes","column","prototype","targetOptions","width","height","borderWidth","tooltip","pointFormat","pointArrayMap","parallelArrays","drawPoints","series","chart","options","animationLimit","apply","points","forEach","point","pointOptions","shapeArgs","targetGraphic","targetVal","target","pointVal","y","merge","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","yMin","yMax","dataMax","dataMin","Math","max","min","pointClass","arguments"]}
@@ -0,0 +1,388 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
*
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
* (c) 2010-2019 Kacper Madej
*
* License: www.highcharts.com/license
*/
var pick = H.pick,
isNumber = H.isNumber,
relativeLength = H.relativeLength,
seriesType = H.seriesType,
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
* @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'],
/**
* 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 = H.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 = undefined;
}
} 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)) || undefined,
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) {
point.targetGraphic = targetGraphic.destroy(); // #1269
}
});
},
/**
* 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);
}
}
},
/** @lends Highcharts.seriesTypes.ohlc.prototype.pointClass.prototype */
{
/**
* Destroys target graphic.
*
* @private
* @function
*/
destroy: function () {
if (this.targetGraphic) {
this.targetGraphic = this.targetGraphic.destroy();
}
columnProto.pointClass.prototype.destroy.apply(this, arguments);
}
});
/**
* 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
* @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
*/
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,11 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
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(function(){return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){(function(a){var e=a.addEvent,h=a.PlotLineOrBand,f=a.merge,g={currentDateIndicator:!0,color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:void 0,rotation:0,style:{fontSize:"10px"}}};e(a.Axis,"afterSetOptions",function(){var a=this.options,b=a.currentDateIndicator;
b&&("object"===typeof b?(b.label&&b.label.format&&(b.label.formatter=void 0),b=f(g,b)):b=f(g),b.value=new Date,a.plotLines||(a.plotLines=[]),a.plotLines.push(b))});e(h,"render",function(){var c=this.options,b,d;c.currentDateIndicator&&c.label&&(b=c.label.format,d=c.label.formatter,c.value=new Date,c.label.text="function"===typeof d?d(this):a.dateFormat(b,new Date),this.label&&this.label.attr({text:c.label.text}))})})(a)});
//# sourceMappingURL=current-date-indicator.js.map
@@ -0,0 +1 @@
{"version":3,"file":"current-date-indicator.js.map","lineCount":10,"mappings":"A;;;;;;;;AASC,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,QAAS,EAAG,CACf,MAAOH,EADQ,CAAnB,CADG,CAKHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CATY,CAAnB,CAAA,CAWC,QAAS,CAACD,CAAD,CAAa,CACnB,SAAS,CAACE,CAAD,CAAI,CAAA,IAaNC,EAAWD,CAAAC,SAbL,CAeNC,EAAiBF,CAAAE,eAfX,CAgBNC,EAAQH,CAAAG,MAhBF,CAkBNC,EAAgB,CAkBhBC,qBAAsB,CAAA,CAlBN,CAmBhBC,MAAO,SAnBS,CAoBhBC,MAAO,CApBS,CAqBhBC,MAAO,CACHC,OAAQ,qBADL,CAEHC,UAAWX,IAAAA,EAFR,CAGHY,SAAU,CAHP,CAIHC,MAAO,CACHC,SAAU,MADP,CAJJ,CArBS,CA+BpBZ,EAAA,CAnCWD,CAAAc,KAmCX,CAAe,iBAAf,CAAkC,QAAS,EAAG,CAAA,IACtCC,EAAU,IAAAA,QAD4B,CAEtCC,EAAaD,CAAAV,qBAEbW;CAAJ,GAC8B,QAA1B,GAAI,MAAOA,EAAX,EAEQA,CAAAR,MAGJ,EAHwBQ,CAAAR,MAAAC,OAGxB,GAFIO,CAAAR,MAAAE,UAEJ,CAFiCX,IAAAA,EAEjC,EAAAiB,CAAA,CAAab,CAAA,CAAMC,CAAN,CAAqBY,CAArB,CALjB,EAOIA,CAPJ,CAOiBb,CAAA,CAAMC,CAAN,CASjB,CANAY,CAAAC,MAMA,CANmB,IAAIC,IAMvB,CAJKH,CAAAI,UAIL,GAHIJ,CAAAI,UAGJ,CAHwB,EAGxB,EAAAJ,CAAAI,UAAAC,KAAA,CAAuBJ,CAAvB,CAjBJ,CAJ0C,CAA9C,CA0BAf,EAAA,CAASC,CAAT,CAAyB,QAAzB,CAAmC,QAAS,EAAG,CAAA,IACvCa,EAAU,IAAAA,QAD6B,CAEvCN,CAFuC,CAGvCC,CAEAK,EAAAV,qBAAJ,EAAoCU,CAAAP,MAApC,GACIC,CAWA,CAXSM,CAAAP,MAAAC,OAWT,CAVAC,CAUA,CAVYK,CAAAP,MAAAE,UAUZ,CARAK,CAAAE,MAQA,CARgB,IAAIC,IAQpB,CANIH,CAAAP,MAAAa,KAMJ,CAPyB,UAAzB,GAAI,MAAOX,EAAX,CACyBA,CAAA,CAAU,IAAV,CADzB,CAGyBV,CAAAsB,WAAA,CAAab,CAAb,CAAqB,IAAIS,IAAzB,CAIzB,CAAI,IAAAV,MAAJ,EACI,IAAAA,MAAAe,KAAA,CAAgB,CACZF,KAAMN,CAAAP,MAAAa,KADM,CAAhB,CAbR,CAL2C,CAA/C,CA3EU,CAAb,CAAA,CAoGCvB,CApGD,CADmB,CAXvB;","sources":["current-date-indicator.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","H","addEvent","PlotLineOrBand","merge","defaultConfig","currentDateIndicator","color","width","label","format","formatter","rotation","style","fontSize","Axis","options","cdiOptions","value","Date","plotLines","push","text","dateFormat","attr"]}
@@ -0,0 +1,127 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
*
* (c) 2016-2019 Highsoft AS
*
* Author: Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*
* */
var addEvent = H.addEvent,
Axis = H.Axis,
PlotLineOrBand = H.PlotLineOrBand,
merge = H.merge;
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
*
* @type {boolean|*}
* @default true
* @extends xAxis.plotLines
* @excluding value
* @product gantt
* @apioption xAxis.currentDateIndicator
*/
currentDateIndicator: true,
color: '#ccd6eb',
width: 2,
label: {
format: '%a, %b %d %Y, %H:%M',
formatter: undefined,
rotation: 0,
style: {
fontSize: '10px'
}
}
};
addEvent(Axis, 'afterSetOptions', function () {
var options = this.options,
cdiOptions = options.currentDateIndicator;
if (cdiOptions) {
if (typeof cdiOptions === 'object') {
// Ignore formatter if custom format is defined
if (cdiOptions.label && cdiOptions.label.format) {
cdiOptions.label.formatter = undefined;
}
cdiOptions = merge(defaultConfig, cdiOptions);
} else {
cdiOptions = merge(defaultConfig);
}
cdiOptions.value = new Date();
if (!options.plotLines) {
options.plotLines = [];
}
options.plotLines.push(cdiOptions);
}
});
addEvent(PlotLineOrBand, 'render', function () {
var options = this.options,
format,
formatter;
if (options.currentDateIndicator && options.label) {
format = options.label.format;
formatter = options.label.formatter;
options.value = new Date();
if (typeof formatter === 'function') {
options.label.text = formatter(this);
} else {
options.label.text = H.dateFormat(format, new Date());
}
// If the label already exists, update its text
if (this.label) {
this.label.attr({
text: options.label.text
});
}
}
});
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,14 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Highcharts cylinder module
(c) 2010-2019 Kacper Madej
License: www.highcharts.com/license
*/
(function(g){"object"===typeof module&&module.exports?(g["default"]=g,module.exports=g):"function"===typeof define&&define.amd?define(function(){return g}):g("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(g){(function(e){var g=e.charts,k=e.color,q=e.deg2rad,r=e.perspective,t=e.seriesType,h=e.Renderer.prototype,u=h.cuboidPath;t("cylinder","column",{},{},{shapeType:"cylinder"});e=e.merge(h.elements3d.cuboid,{parts:["top","bottom","front","back"],pathType:"cylinder",fillSetter:function(a){this.singleSetterForParts("fill",
null,{front:a,back:a,top:k(a).brighten(.1).get(),bottom:k(a).brighten(-.1).get()});this.color=this.fill=a;return this}});h.elements3d.cylinder=e;h.cylinder=function(a){return this.element3d("cylinder",a)};h.cylinderPath=function(a){var b=g[this.chartIndex],c=u.call(this,a),d=!c.isTop,e=!c.isFront,f=this.getCylinderEnd(b,a);a=this.getCylinderEnd(b,a,!0);return{front:this.getCylinderFront(f,a),back:this.getCylinderBack(f,a),top:f,bottom:a,zIndexes:{top:d?3:0,bottom:d?0:3,front:e?2:1,back:e?1:2,group:c.zIndexes.group}}};
h.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};h.getCylinderBack=function(a,b){var c=["M"];b.simplified?(c=c.concat(a.slice(7,12)),c.push("L",a[1],a[2])):c=c.concat(a.slice(15));c.push("L");b.simplified?c=c.concat(b.slice(1,3)).concat(b.slice(9,12)).concat(b.slice(6,
9)):c.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]);c.push("Z");return c};h.getCylinderEnd=function(a,b,c){var d=Math.min(b.width,b.depth)/2,e=q*(a.options.chart.options3d.beta-90);c=b.y+(c?b.height:0);var f=.5519*d,g=b.width/2+b.x,h=b.depth/2+b.z,l=[{x:0,y:c,z:d},{x:f,y:c,z:d},{x:d,y:c,z:f},{x:d,y:c,z:0},{x:d,y:c,z:-f},{x:f,y:c,z:-d},{x:0,y:c,z:-d},{x:-f,y:c,z:-d},{x:-d,y:c,z:-f},{x:-d,y:c,z:0},{x:-d,y:c,z:f},{x:-f,y:c,z:d},{x:0,y:c,z:d}],k=Math.cos(e),
p=Math.sin(e),m,n;l.forEach(function(a,b){m=a.x;n=a.z;l[b].x=m*k-n*p+g;l[b].z=n*k+m*p+h});a=r(l,a,!0);2.5>Math.abs(a[3].y-a[9].y)?(a=this.toLinePath([a[0],a[3],a[6],a[9]],!0),a.simplified=!0):a=this.getCurvedPath(a);return a};h.getCurvedPath=function(a){var b=["M",a[0].x,a[0].y],c=a.length-2,d;for(d=1;d<c;d+=3)b.push("C",a[d].x,a[d].y,a[d+1].x,a[d+1].y,a[d+2].x,a[d+2].y);return b}})(g)});
//# sourceMappingURL=cylinder.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,413 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
* (c) 2010-2019 Kacper Madej
*
* License: www.highcharts.com/license
*/
var charts = H.charts,
color = H.color,
deg2rad = H.deg2rad,
perspective = H.perspective,
seriesType = H.seriesType,
// 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
* @optionparent plotOptions.cylinder
*/
{},
{}, /** @lends Highcharts.seriesTypes.cylinder#pointClass# */ {
shapeType: 'cylinder'
}
);
/**
* 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
* @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>|*>}
* @extends series.column.data
* @product highcharts highstock
* @apioption series.cylinder.data
*/
// cylinder extends cuboid
cylinderMethods = H.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 (bottomPath.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
var radius = Math.min(shapeArgs.width, shapeArgs.depth) / 2,
// Approximated longest diameter
angleOffset = deg2rad * (chart.options.chart.options3d.beta - 90),
// 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 = shapeArgs.depth / 2 + shapeArgs.z,
// points could be generated in a loop, but readability will plummet
points = [{ // M - starting point
x: 0,
y: y,
z: radius
}, { // C1 - control point 1
x: c,
y: y,
z: radius
}, { // C1 - control point 2
x: radius,
y: y,
z: c
}, { // C1 - end point
x: radius,
y: y,
z: 0
}, { // C2 - control point 1
x: radius,
y: y,
z: -c
}, { // C2 - control point 2
x: c,
y: y,
z: -radius
}, { // C2 - end point
x: 0,
y: y,
z: -radius
}, { // C3 - control point 1
x: -c,
y: y,
z: -radius
}, { // C3 - control point 2
x: -radius,
y: y,
z: -c
}, { // C3 - end point
x: -radius,
y: y,
z: 0
}, { // C4 - control point 1
x: -radius,
y: y,
z: c
}, { // C4 - control point 2
x: -c,
y: y,
z: radius
}, { // C4 - end point
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) {
// 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;
};
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,37 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Data module
(c) 2012-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(p){"object"===typeof module&&module.exports?(p["default"]=p,module.exports=p):"function"===typeof define&&define.amd?define(function(){return p}):p("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(p){(function(h){h.ajax=function(p){var q=h.merge(!0,{url:!1,type:"GET",dataType:"json",success:!1,error:!1,data:!1,headers:{}},p);p={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"};var n=new XMLHttpRequest;if(!q.url)return!1;n.open(q.type.toUpperCase(),
q.url,!0);n.setRequestHeader("Content-Type",p[q.dataType]||p.text);h.objectEach(q.headers,function(h,q){n.setRequestHeader(q,h)});n.onreadystatechange=function(){var h;if(4===n.readyState){if(200===n.status){h=n.responseText;if("json"===q.dataType)try{h=JSON.parse(h)}catch(C){q.error&&q.error(n,C);return}return q.success&&q.success(h)}q.error&&q.error(n,n.responseText)}};try{q.data=JSON.stringify(q.data)}catch(D){}n.send(q.data||!0)}})(p);(function(h){var p=h.addEvent,q=h.Chart,n=h.win.document,D=
h.objectEach,C=h.pick,E=h.isNumber,y=h.merge,F=h.splat,G=h.fireEvent,w,z=function(a,b,c){this.init(a,b,c)};h.extend(z.prototype,{init:function(a,b,c){var f=a.decimalPoint,e;b&&(this.chartOptions=b);c&&(this.chart=c);"."!==f&&","!==f&&(f=void 0);this.options=a;this.columns=a.columns||this.rowsToColumns(a.rows)||[];this.firstRowAsNames=C(a.firstRowAsNames,this.firstRowAsNames,!0);this.decimalRegex=f&&new RegExp("^(-?[0-9]+)"+f+"([0-9]+)$");this.rawColumns=[];this.columns.length&&(this.dataFound(),e=
!0);e||(e=this.fetchLiveData());e||(e=!!this.parseCSV().length);e||(e=!!this.parseTable().length);e||(e=this.parseGoogleSpreadsheet());!e&&a.afterComplete&&a.afterComplete()},getColumnDistribution:function(){var a=this.chartOptions,b=this.options,c=[],f=function(a){return(h.seriesTypes[a||"line"].prototype.pointArrayMap||[0]).length},e=a&&a.chart&&a.chart.type,d=[],k=[],t=0,b=b&&b.seriesMapping||a&&a.series&&a.series.map(function(){return{x:0}})||[],g;(a&&a.series||[]).forEach(function(a){d.push(f(a.type||
e))});b.forEach(function(a){c.push(a.x||0)});0===c.length&&c.push(0);b.forEach(function(b){var c=new w,A=d[t]||f(e),m=h.seriesTypes[((a&&a.series||[])[t]||{}).type||e||"line"].prototype.pointArrayMap||["y"];c.addColumnReader(b.x,"x");D(b,function(a,b){"x"!==b&&c.addColumnReader(a,b)});for(g=0;g<A;g++)c.hasReader(m[g])||c.addColumnReader(void 0,m[g]);k.push(c);t++});b=h.seriesTypes[e||"line"].prototype.pointArrayMap;void 0===b&&(b=["y"]);this.valueCount={global:f(e),xColumns:c,individual:d,seriesBuilders:k,
globalPointArrayMap:b}},dataFound:function(){this.options.switchRowsAndColumns&&(this.columns=this.rowsToColumns(this.columns));this.getColumnDistribution();this.parseTypes();!1!==this.parsed()&&this.complete()},parseCSV:function(a){function b(a,b,c,d){function e(b){l=a[b];r=a[b-1];A=a[b+1]}function f(a){v.length<u+1&&v.push([a]);v[u][v[u].length-1]!==a&&v[u].push(a)}function g(){h>B||B>q?(++B,m=""):(!isNaN(parseFloat(m))&&isFinite(m)?(m=parseFloat(m),f("number")):isNaN(Date.parse(m))?f("string"):
(m=m.replace(/\//g,"-"),f("date")),t.length<u+1&&t.push([]),c||(t[u][b]=m),m="",++u,++B)}var k=0,l="",r="",A="",m="",B=0,u=0;if(a.trim().length&&"#"!==a.trim()[0]){for(;k<a.length;k++){e(k);if("#"===l){g();return}if('"'===l)for(e(++k);k<a.length&&('"'!==l||'"'===r||'"'===A);){if('"'!==l||'"'===l&&'"'!==r)m+=l;e(++k)}else d&&d[l]?d[l](l,m)&&g():l===x?g():m+=l}g()}}function c(a){var b=0,c=0,f=!1;a.some(function(a,d){var e=!1,f,l,g="";if(13<d)return!0;for(var k=0;k<a.length;k++){d=a[k];f=a[k+1];l=a[k-
1];if("#"===d)break;if('"'===d)if(e){if('"'!==l&&'"'!==f){for(;" "===f&&k<a.length;)f=a[++k];"undefined"!==typeof u[f]&&u[f]++;e=!1}}else e=!0;else"undefined"!==typeof u[d]?(g=g.trim(),isNaN(Date.parse(g))?!isNaN(g)&&isFinite(g)||u[d]++:u[d]++,g=""):g+=d;","===d&&c++;"."===d&&b++}});f=u[";"]>u[","]?";":",";d.decimalPoint||(d.decimalPoint=b>c?".":",",e.decimalRegex=new RegExp("^(-?[0-9]+)"+d.decimalPoint+"([0-9]+)$"));return f}function f(a,b){var c,f,g=0,k=!1,m=[],t=[],l;if(!b||b>a.length)b=a.length;
for(;g<b;g++)if("undefined"!==typeof a[g]&&a[g]&&a[g].length)for(c=a[g].trim().replace(/\//g," ").replace(/\-/g," ").replace(/\./g," ").split(" "),f=["","",""],l=0;l<c.length;l++)l<f.length&&(c[l]=parseInt(c[l],10),c[l]&&(t[l]=!t[l]||t[l]<c[l]?c[l]:t[l],"undefined"!==typeof m[l]?m[l]!==c[l]&&(m[l]=!1):m[l]=c[l],31<c[l]?f[l]=100>c[l]?"YY":"YYYY":12<c[l]&&31>=c[l]?(f[l]="dd",k=!0):f[l].length||(f[l]="mm")));if(k){for(l=0;l<m.length;l++)!1!==m[l]?12<t[l]&&"YY"!==f[l]&&"YYYY"!==f[l]&&(f[l]="YY"):12<t[l]&&
"mm"===f[l]&&(f[l]="dd");3===f.length&&"dd"===f[1]&&"dd"===f[2]&&(f[2]="YY");a=f.join("/");return(d.dateFormats||e.dateFormats)[a]?a:(G("deduceDateFailed"),"YYYY/mm/dd")}return"YYYY/mm/dd"}var e=this,d=a||this.options,k=d.csv,t;a="undefined"!==typeof d.startRow&&d.startRow?d.startRow:0;var g=d.endRow||Number.MAX_VALUE,h="undefined"!==typeof d.startColumn&&d.startColumn?d.startColumn:0,q=d.endColumn||Number.MAX_VALUE,x,m=0,v=[],u={",":0,";":0,"\t":0};t=this.columns=[];k&&d.beforeParse&&(k=d.beforeParse.call(this,
k));if(k){k=k.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(d.lineDelimiter||"\n");if(!a||0>a)a=0;if(!g||g>=k.length)g=k.length-1;d.itemDelimiter?x=d.itemDelimiter:(x=null,x=c(k));for(var p=0,m=a;m<=g;m++)"#"===k[m][0]?p++:b(k[m],m-a-p);d.columnTypes&&0!==d.columnTypes.length||!v.length||!v[0].length||"date"!==v[0][1]||d.dateFormat||(d.dateFormat=f(t[0]));this.dataFound()}return t},parseTable:function(){var a=this.options,b=a.table,c=this.columns,f=a.startRow||0,e=a.endRow||Number.MAX_VALUE,d=a.startColumn||
0,k=a.endColumn||Number.MAX_VALUE;b&&("string"===typeof b&&(b=n.getElementById(b)),[].forEach.call(b.getElementsByTagName("tr"),function(a,b){b>=f&&b<=e&&[].forEach.call(a.children,function(a,e){("TD"===a.tagName||"TH"===a.tagName)&&e>=d&&e<=k&&(c[e-d]||(c[e-d]=[]),c[e-d][b-f]=a.innerHTML)})}),this.dataFound());return c},fetchLiveData:function(){function a(t){function g(g,k,x){function m(){e&&b.liveDataURL===g&&(b.liveDataTimeout=setTimeout(a,d))}if(!g||0!==g.indexOf("http"))return g&&c.error&&c.error("Invalid URL"),
!1;t&&(clearTimeout(b.liveDataTimeout),b.liveDataURL=g);h.ajax({url:g,dataType:x||"json",success:function(a){b&&b.series&&k(a);m()},error:function(a,b){3>++f&&m();return c.error&&c.error(b,a)}});return!0}g(k.csvURL,function(a){b.update({data:{csv:a}})},"text")||g(k.rowsURL,function(a){b.update({data:{rows:a}})})||g(k.columnsURL,function(a){b.update({data:{columns:a}})})}var b=this.chart,c=this.options,f=0,e=c.enablePolling,d=1E3*(c.dataRefreshRate||2),k=y(c);if(!c||!c.csvURL&&!c.rowsURL&&!c.columnsURL)return!1;
1E3>d&&(d=1E3);delete c.csvURL;delete c.rowsURL;delete c.columnsURL;a(!0);return c&&(c.csvURL||c.rowsURL||c.columnsURL)},parseGoogleSpreadsheet:function(){function a(b){var e=["https://spreadsheets.google.com/feeds/cells",f,d,"public/values?alt\x3djson"].join("/");h.ajax({url:e,dataType:"json",success:function(d){b(d);c.enablePolling&&setTimeout(function(){a(b)},c.dataRefreshRate)},error:function(a,b){return c.error&&c.error(b,a)}})}var b=this,c=this.options,f=c.googleSpreadsheetKey,e=this.chart,
d=c.googleSpreadsheetWorksheet||1,k=c.startRow||0,t=c.endRow||Number.MAX_VALUE,g=c.startColumn||0,q=c.endColumn||Number.MAX_VALUE,p=1E3*(c.dataRefreshRate||2);4E3>p&&(p=4E3);f&&(delete c.googleSpreadsheetKey,a(function(a){var c=[];a=a.feed.entry;var d,f=(a||[]).length,h=0,p,n,r;if(!a||0===a.length)return!1;for(r=0;r<f;r++)d=a[r],h=Math.max(h,d.gs$cell.col);for(r=0;r<h;r++)r>=g&&r<=q&&(c[r-g]=[]);for(r=0;r<f;r++)d=a[r],h=d.gs$cell.row-1,p=d.gs$cell.col-1,p>=g&&p<=q&&h>=k&&h<=t&&(n=d.gs$cell||d.content,
d=null,n.numericValue?d=0<=n.$t.indexOf("/")||0<=n.$t.indexOf("-")?n.$t:0<n.$t.indexOf("%")?100*parseFloat(n.numericValue):parseFloat(n.numericValue):n.$t&&n.$t.length&&(d=n.$t),c[p-g][h-k]=d);c.forEach(function(a){for(r=0;r<a.length;r++)void 0===a[r]&&(a[r]=null)});e&&e.series?e.update({data:{columns:c}}):(b.columns=c,b.dataFound())}));return!1},trim:function(a,b){"string"===typeof a&&(a=a.replace(/^\s+|\s+$/g,""),b&&/^[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,b=a.length;b--;)this.parseColumn(a[b],b)},parseColumn:function(a,b){var c=this.rawColumns,f=this.columns,e=a.length,d,k,h,g,p=this.firstRowAsNames,n=-1!==this.valueCount.xColumns.indexOf(b),q,m=[],v=this.chartOptions,u,w=(this.options.columnTypes||[])[b],v=n&&(v&&v.xAxis&&"category"===F(v.xAxis)[0].type||"string"===w);for(c[b]||(c[b]=[]);e--;)d=m[e]||a[e],h=this.trim(d),g=this.trim(d,!0),k=parseFloat(g),void 0===c[b][e]&&(c[b][e]=h),
v||0===e&&p?a[e]=""+h:+g===k?(a[e]=k,31536E6<k&&"float"!==w?a.isDatetime=!0:a.isNumeric=!0,void 0!==a[e+1]&&(u=k>a[e+1])):(h&&h.length&&(q=this.parseDate(d)),n&&E(q)&&"float"!==w?(m[e]=d,a[e]=q,a.isDatetime=!0,void 0!==a[e+1]&&(d=q>a[e+1],d!==u&&void 0!==u&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,e=a.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):a.unsorted=!0),u=d)):(a[e]=""===h?null:h,0!==e&&(a.isDatetime||a.isNumeric)&&(a.mixed=!0)));n&&a.mixed&&
(f[b]=c[b]);if(n&&u&&this.options.sort)for(b=0;b<f.length;b++)f[b].reverse(),p&&f[b].unshift(f[b].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 b=+a[3],b=b>(new Date).getFullYear()-2E3?b+1900:b+2E3;return Date.UTC(b,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 b=this.options.parseDate,c,f,e=this.options.dateFormat||this.dateFormat,d;if(b)c=b(a);else if("string"===typeof a){if(e)(b=
this.dateFormats[e])||(b=this.dateFormats["YYYY/mm/dd"]),(d=a.match(b.regex))&&(c=b.parser(d));else for(f in this.dateFormats)if(b=this.dateFormats[f],d=a.match(b.regex)){this.dateFormat=f;this.alternativeFormat=b.alternative;c=b.parser(d);break}d||(d=Date.parse(a),"object"===typeof d&&null!==d&&d.getTime?c=d.getTime()-6E4*d.getTimezoneOffset():E(d)&&(c=d-6E4*(new Date(d)).getTimezoneOffset()))}return c},rowsToColumns:function(a){var b,c,f,e,d;if(a)for(d=[],c=a.length,b=0;b<c;b++)for(e=a[b].length,
f=0;f<e;f++)d[f]||(d[f]=[]),d[f][b]=a[b][f];return d},parsed:function(){if(this.options.parsed)return this.options.parsed.call(this,this.columns)},getFreeIndexes:function(a,b){var c,f=[],e=[],d;for(c=0;c<a;c+=1)f.push(!0);for(a=0;a<b.length;a+=1)for(d=b[a].getReferencedColumnIndexes(),c=0;c<d.length;c+=1)f[d[c]]=!1;for(c=0;c<f.length;c+=1)f[c]&&e.push(c);return e},complete:function(){var a=this.columns,b,c=this.options,f,e,d,k,h=[],g;if(c.complete||c.afterComplete){if(this.firstRowAsNames)for(d=0;d<
a.length;d++)a[d].name=a[d].shift();f=[];e=this.getFreeIndexes(a.length,this.valueCount.seriesBuilders);for(d=0;d<this.valueCount.seriesBuilders.length;d++)g=this.valueCount.seriesBuilders[d],g.populateColumns(e)&&h.push(g);for(;0<e.length;){g=new w;g.addColumnReader(0,"x");d=e.indexOf(0);-1!==d&&e.splice(d,1);for(d=0;d<this.valueCount.global;d++)g.addColumnReader(void 0,this.valueCount.globalPointArrayMap[d]);g.populateColumns(e)&&h.push(g)}0<h.length&&0<h[0].readers.length&&(g=a[h[0].readers[0].columnIndex],
void 0!==g&&(g.isDatetime?b="datetime":g.isNumeric||(b="category")));if("category"===b)for(d=0;d<h.length;d++)for(g=h[d],e=0;e<g.readers.length;e++)"x"===g.readers[e].configName&&(g.readers[e].configName="name");for(d=0;d<h.length;d++){g=h[d];e=[];for(k=0;k<a[0].length;k++)e[k]=g.read(a,k);f[d]={data:e};g.name&&(f[d].name=g.name);"category"===b&&(f[d].turboThreshold=0)}a={series:f};b&&(a.xAxis={type:b},"category"===b&&(a.xAxis.uniqueNames=!1));c.complete&&c.complete(a);c.afterComplete&&c.afterComplete(a)}},
update:function(a,b){var c=this.chart;a&&(a.afterComplete=function(a){a.xAxis&&c.xAxis[0]&&a.xAxis.type===c.xAxis[0].options.type&&delete a.xAxis;c.update(a,b,!0)},y(!0,this.options,a),this.init(this.options))}});h.Data=z;h.data=function(a,b,c){return new z(a,b,c)};p(q,"init",function(a){var b=this,c=a.args[0],f=a.args[1];c&&c.data&&!b.hasDataDef&&(b.hasDataDef=!0,b.data=new z(h.extend(c.data,{afterComplete:function(a){var d,e;if(c.hasOwnProperty("series"))if("object"===typeof c.series)for(d=Math.max(c.series.length,
a&&a.series?a.series.length:0);d--;)e=c.series[d]||{},c.series[d]=y(e,a&&a.series?a.series[d]:{});else delete c.series;c=y(a,c);b.init(c,f)}}),c,b),a.preventDefault())});w=function(){this.readers=[];this.pointIsArray=!0};w.prototype.populateColumns=function(a){var b=!0;this.readers.forEach(function(b){void 0===b.columnIndex&&(b.columnIndex=a.shift())});this.readers.forEach(function(a){void 0===a.columnIndex&&(b=!1)});return b};w.prototype.read=function(a,b){var c=this.pointIsArray,f=c?[]:{},e;this.readers.forEach(function(d){var e=
a[d.columnIndex][b];c?f.push(e):0<d.configName.indexOf(".")?h.Point.prototype.setNestedProperty(f,e,d.configName):f[d.configName]=e});void 0===this.name&&2<=this.readers.length&&(e=this.getReferencedColumnIndexes(),2<=e.length&&(e.shift(),e.sort(function(a,b){return a-b}),this.name=a[e.shift()].name));return f};w.prototype.addColumnReader=function(a,b){this.readers.push({columnIndex:a,configName:b});"x"!==b&&"y"!==b&&void 0!==b&&(this.pointIsArray=!1)};w.prototype.getReferencedColumnIndexes=function(){var a,
b=[],c;for(a=0;a<this.readers.length;a+=1)c=this.readers[a],void 0!==c.columnIndex&&b.push(c.columnIndex);return b};w.prototype.hasReader=function(a){var b,c;for(b=0;b<this.readers.length;b+=1)if(c=this.readers[b],c.configName===a)return!0}})(p)});
//# sourceMappingURL=data.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Data grouping module
(c) 2010-2019 Torstein Hnsi
License: www.highcharts.com/license
*/
(function(e){"object"===typeof module&&module.exports?(e["default"]=e,module.exports=e):"function"===typeof define&&define.amd?define(function(){return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){return function(d){var e=d.addEvent,H=d.arrayMax,I=d.arrayMin,v=d.Axis,J=d.defaultPlotOptions,C=d.defined,K=d.extend,L=d.format,n=d.isNumber,D=d.merge,w=d.pick,M=d.Point,x=d.Series,N=d.Tooltip,h=d.approximations={sum:function(a){var c=a.length,b;if(!c&&a.hasNulls)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);n(a)&&c&&(a/=c);return a},averages:function(){var a=[];[].forEach.call(arguments,function(c){a.push(h.average(c))});return void 0===a[0]?void 0:a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?H(a):a.hasNulls?null:void 0},low:function(a){return a.length?I(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,k){a=h.open(a);
c=h.high(c);b=h.low(b);k=h.close(k);if(n(a)||n(c)||n(b)||n(k))return[a,c,b,k]},range:function(a,c){a=h.low(a);c=h.high(c);if(n(a)||n(c))return[a,c];if(null===a&&null===c)return null}},F=function(a,c,b,k){var f=this,d=f.data,r=f.options&&f.options.data,E=[],l=[],p=[],m=a.length,g,e,t=!!c,u=[],y=f.pointArrayMap,v=y&&y.length,z=["x"].concat(y||["y"]),A=0,w=0,x,q;k="function"===typeof k?k:h[k]?h[k]:h[f.getDGApproximation&&f.getDGApproximation()||"average"];v?y.forEach(function(){u.push([])}):u.push([]);
x=v||1;for(q=0;q<=m&&!(a[q]>=b[0]);q++);for(q;q<=m;q++){for(;void 0!==b[A+1]&&a[q]>=b[A+1]||q===m;){g=b[A];f.dataGroupInfo={start:f.cropStart+w,length:u[0].length};e=k.apply(f,u);f.pointClass&&!C(f.dataGroupInfo.options)&&(f.dataGroupInfo.options=D(f.pointClass.prototype.optionsToObject.call({series:f},f.options.data[f.cropStart+w])),z.forEach(function(a){delete f.dataGroupInfo.options[a]}));void 0!==e&&(E.push(g),l.push(e),p.push(f.dataGroupInfo));w=q;for(g=0;g<x;g++)u[g].length=0,u[g].hasNulls=
!1;A+=1;if(q===m)break}if(q===m)break;if(y){g=f.cropStart+q;e=d&&d[g]||f.pointClass.prototype.applyOptions.apply({series:f},[r[g]]);var B;for(g=0;g<v;g++)B=e[y[g]],n(B)?u[g].push(B):null===B&&(u[g].hasNulls=!0)}else g=t?c[q]:null,n(g)?u[0].push(g):null===g&&(u[0].hasNulls=!0)}return{groupedXData:E,groupedYData:l,groupMap:p}},O={approximations:h,groupData:F},t=x.prototype,P=t.processData,Q=t.generatePoints,z={groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L",
"-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},G={line:{},spline:{},area:{},areaspline:{},column:{groupPixelWidth:10},columnrange:{groupPixelWidth:10},candlestick:{groupPixelWidth:10},ohlc:{groupPixelWidth:5}},
R=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]];t.getDGApproximation=function(){return d.seriesTypes.arearange&&this instanceof d.seriesTypes.arearange?"range":d.seriesTypes.ohlc&&this instanceof d.seriesTypes.ohlc?"ohlc":d.seriesTypes.column&&this instanceof d.seriesTypes.column?"sum":"average"};t.groupData=F;t.processData=function(){var a=
this.chart,c=this.options.dataGrouping,b=!1!==this.allowDG&&c&&w(c.enabled,a.options.isStock),k=this.visible||!a.options.chart.ignoreHiddenSeries,f,d=this.currentDataGrouping,r,e=!1;this.forceCrop=b;this.groupPixelWidth=null;this.hasProcessed=!0;b&&!this.requireSorting&&(this.requireSorting=e=!0);b=!1===P.apply(this,arguments)||!b;e&&(this.requireSorting=!1);if(!b){this.destroyGroupedData();var l,b=c.groupAll?this.xData:this.processedXData,p=c.groupAll?this.yData:this.processedYData,m=a.plotSizeX,
a=this.xAxis,g=a.options.ordinal,h=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(h){this.isDirty=f=!0;this.points=null;e=a.getExtremes();r=e.min;var e=e.max,g=g&&a.getGroupIntervalFactor(r,e,this)||1,h=h*(e-r)/m*g,m=a.getTimeTicks(a.normalizeTimeTickInterval(h,c.units||R),Math.min(r,b[0]),Math.max(e,b[b.length-1]),a.options.startOfWeek,b,this.closestPointRange),p=t.groupData.apply(this,[b,p,m,c.approximation]),b=p.groupedXData,g=p.groupedYData,n=0;if(c.smoothed&&b.length){l=
b.length-1;for(b[l]=Math.min(b[l],e);l--&&0<l;)b[l]+=h/2;b[0]=Math.max(b[0],r)}for(l=1;l<m.length;l++)m.info.segmentStarts&&-1!==m.info.segmentStarts.indexOf(l)||(n=Math.max(m[l]-m[l-1],n));r=m.info;r.gapSize=n;this.closestPointRange=m.info.totalRange;this.groupMap=p.groupMap;if(C(b[0])&&b[0]<a.dataMin&&k){if(!C(a.options.min)&&a.min<=a.dataMin||a.min===a.dataMin)a.min=b[0];a.dataMin=b[0]}c.groupAll&&(c=this.cropData(b,g,a.min,a.max,1),b=c.xData,g=c.yData);this.processedXData=b;this.processedYData=
g}else this.groupMap=null;this.hasGroupedData=f;this.currentDataGrouping=r;this.preventGraphAnimation=(d&&d.totalRange)!==(r&&r.totalRange)}};t.destroyGroupedData=function(){var a=this.groupedData;(a||[]).forEach(function(c,b){c&&(a[b]=c.destroy?c.destroy():null)});this.groupedData=null};t.generatePoints=function(){Q.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};e(M,"update",function(){if(this.dataGroup)return d.error(24,!1,this.series.chart),!1});e(N,
"headerFormatter",function(a){var c=this.chart.time,b=a.labelConfig,k=b.series,f=k.tooltipOptions,e=k.options.dataGrouping,d=f.xDateFormat,h,l=k.xAxis,p,m=f[(a.isFooter?"footer":"header")+"Format"];l&&"datetime"===l.options.type&&e&&n(b.key)&&(p=k.currentDataGrouping,e=e.dateTimeLabelFormats||z.dateTimeLabelFormats,p?(f=e[p.unitName],1===p.count?d=f[0]:(d=f[1],h=f[2])):!d&&e&&(d=this.getXDateFormat(b,f,l)),d=c.dateFormat(d,b.key),h&&(d+=c.dateFormat(h,b.key+p.totalRange-1)),k.chart.styledMode&&(m=
this.styledModeFormat(m)),a.text=L(m,{point:K(b.point,{key:d}),series:k},c),a.preventDefault())});e(x,"destroy",t.destroyGroupedData);e(x,"afterSetOptions",function(a){a=a.options;var c=this.type,b=this.chart.options.plotOptions,d=J[c].dataGrouping,f=this.useCommonDataGrouping&&z;if(G[c]||f)d||(d=D(z,G[c])),a.dataGrouping=D(f,d,b.series&&b.series.dataGrouping,b[c].dataGrouping,this.userOptions.dataGrouping)});e(v,"afterSetScale",function(){this.series.forEach(function(a){a.hasProcessed=!1})});v.prototype.getGroupPixelWidth=
function(){var a=this.series,c=a.length,b,d=0,f=!1,e;for(b=c;b--;)(e=a[b].options.dataGrouping)&&(d=Math.max(d,w(e.groupPixelWidth,z.groupPixelWidth)));for(b=c;b--;)(e=a[b].options.dataGrouping)&&a[b].hasProcessed&&(c=(a[b].processedXData||a[b].data).length,a[b].groupPixelWidth||c>this.chart.plotSizeX/d||c&&e.forced)&&(f=!0);return f?d:0};v.prototype.setDataGrouping=function(a,c){var b;c=w(c,!0);a||(a={forced:!1,units:null});if(this instanceof v)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()};return d.dataGrouping=O}(e)});
//# sourceMappingURL=datagrouping.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,28 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
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(function(){return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){a.errorMessages={10:{title:"Can't plot zero or subzero values on a logarithmic axis",text:"\x3ch1\x3eCan't plot zero or subzero values on a logarithmic axis\x3c/h1\x3e\x3cp\x3eThis error occurs in the following situations: \x3c/p\x3e\x3cul\x3e\x3cli\x3eIf a zero or subzero data value is added to a logarithmic axis\x3c/li\x3e\x3cli\x3eIf the minimum of a logarithimic axis is set to 0 or less\x3c/li\x3e\x3cli\x3eIf the threshold is set to 0 or less\x3c/li\x3e\x3c/ul\x3e\x3cp\x3eNote: As of Highcharts 5.0.8 it's possible to bypass this error message by setting \x3ccode\x3eAxis.prototype.allowNegativeLog\x3c/code\x3e to true, and add custom conversion functions. \x3ca href\x3d\"https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/yaxis/type-log-negative/\"\x3eView live demo\x3c/a\x3e.\x3c/p\x3e",
enduser:'\x3ch1\x3eCan\'t plot zero or subzero values on a logarithmic axis\x3c/h1\x3e\x3cp\x3eThis error occurs in the following situations:\x3c/p\x3e\x3cp\x3e* If a zero or subzero data value is added to a logarithmic axis\x3c/p\x3e\x3cp\x3e* If the minimum of a logarithimic axis is set to 0 or less\x3c/p\x3e\x3cp\x3e* If the threshold is set to 0 or less\x3c/p\x3e\x3cp\x3eAs of Highcharts 5.0.8 it\'s possible to bypass this error message by setting \x3ccode\x3eAxis.prototype.allowNegativeLog\x3c/code\x3e to \x3ccode\x3etrue\x3c/code\x3e and add custom conversion functions. \x3ca href\x3d"http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/samples/highcharts/yaxis/type-log-negative/"\x3e"\x3eView Live Demo\x3c/a\x3e.\x3c/p\x3e'},
11:{title:"Can't link axes of different type",text:"\x3ch1\x3eCan't link axes of different type\x3c/h1\x3e\x3cp\x3eThis error occurs when using the \x3ccode\x3elinkedTo\x3c/code\x3e 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.\x3c/p\x3e"},12:{title:"Highcharts expects point configuration to be numbers or arrays in turbo mode",text:'\x3ch1\x3eHighcharts expects point configuration to be numbers or arrays in turbo mode\x3c/h1\x3e\x3cp\x3eThis error occurs if the series.data option contains object configurations and the number of points exceeds the turboThreshold. It can be fixed by either setting \x3ccode\x3eturboThreshold\x3c/code\x3e to a higher value, or changing the point configurations to numbers or arrays.\x3c/p\x3e\x3cp\x3eSee \x3ca href\x3d"https://api.highcharts.com/highcharts#plotOptions.series.turboThreshold"\x3eplotOptions.series.turboThreshold\x3c/a\x3e\x3c/p\x3e'},
13:{title:"Rendering div not found",text:'\x3ch1\x3eRendering div not found\x3c/h1\x3e\x3cp\x3eThis error occurs if the \x3ca href\x3d"https://api.highcharts.com/highcharts#chart.renderTo"\x3echart.renderTo\x3c/a\x3e option is misconfigured so that Highcharts is unable to find the HTML element to render the chart in.\x3c/p\x3e\x3cp\x3eIf using a DOM ID when creating the chart, make sure a node with the same ID exists somewhere in the DOM.\x3c/p\x3e'},14:{title:"String value sent to series.data, expected Number",
text:"\x3ch1\x3eString value sent to series.data, expected Number\x3c/h1\x3e\x3cp\x3eThis happens if using a string as a data point, for example in a setup like this: \x3c/p\x3e\x3cpre\x3eseries: [{\n data: [\x26quot;3\x26quot;, \x26quot;5\x26quot;, \x26quot;1\x26quot;, \x26quot;6\x26quot;]\n}]\x3c/pre\x3e\x3cp\x3eHighcharts expects numerical data values.\x3c/p\x3e\x3cp\x3eThe most common reason for this error this is that data is parsed from CSV or\x3c/p\x3e\x3cp\x3efrom a XML source, and the implementer forgot to run \x3ccode\x3eparseFloat\x3c/code\x3e\x3c/p\x3e\x3cp\x3eon the parsed value.\x3c/p\x3e\x3cp\x3eNote: For performance reasons internal type casting is not performed, and only the first value is checked (since 2.3).\x3c/p\x3e"},
15:{title:"Highcharts expects data to be sorted",text:"\x3ch1\x3eHighcharts expects data to be sorted\x3c/h1\x3e\x3cp\x3eThis happens when creating a line series or a stock chart where the data is not sorted in ascending X order.\x3c/p\x3e\x3cp\x3eFor performance reasons, Highcharts does not sort the data, instead it requires that the implementer pre-sorts the data.\x3c/p\x3e"},16:{title:"Highcharts already defined in the page",text:"\x3ch1\x3eHighcharts already defined in the page\x3c/h1\x3e\x3cp\x3eThis error happens if the \x3ccode\x3eHighcharts\x3c/code\x3e namespace already exists when loading\x3c/p\x3e\x3cp\x3eHighcharts or Highstock.\x3c/p\x3e\x3cp\x3eThis is caused by including Highcharts or Highstock more than once.\x3c/p\x3e\x3cp\x3eKeep in mind that the \x3ccode\x3eHighcharts.Chart\x3c/code\x3e constructor and all features of Highcharts are included in Highstock, so if using the \x3ccode\x3eChart\x3c/code\x3e and \x3ccode\x3eStockChart\x3c/code\x3e constructors in combination, only the \x3ccode\x3ehighstock.js\x3c/code\x3e file is required.\x3c/p\x3e"},
17:{title:"The requested series type does not exist",text:"\x3ch1\x3eThe requested series type does not exist\x3c/h1\x3e\x3cp\x3eThis error happens when setting \x3ccode\x3echart.type\x3c/code\x3e or \x3ccode\x3eseries.type\x3c/code\x3e to a series type that isn't defined in Highcharts. A typical reason may be that the\x3c/p\x3e\x3cp\x3emodule or extension where the series type is defined isn't included.\x3c/p\x3e\x3cp\x3eFor example in order to create an \x3ccode\x3earearange\x3c/code\x3e series, the \x3ccode\x3ehighcharts-more.js\x3c/code\x3e file must be loaded.\x3c/p\x3e"},
18:{title:"The requested axis does not exist",text:"\x3ch1\x3eThe requested axis does not exist\x3c/h1\x3e\x3cp\x3eThis error happens when setting a series' \x3ccode\x3exAxis\x3c/code\x3e or \x3ccode\x3eyAxis\x3c/code\x3e property to point to an axis that does not exist.\x3c/p\x3e"},19:{title:"Too many ticks",text:"\x3ch1\x3eToo many ticks\x3c/h1\x3e\x3cp\x3eThis error happens when applying too many ticks to an axis, specifically when adding more ticks than the axis pixel length.\x3c/p\x3e\x3cp\x3eWith default value this won't happen, but there are edge cases, for example when setting axis categories and \x3ccode\x3exAxis.labels.step\x3c/code\x3e in combination with a long data range, when the axis is instructed to create a great number of ticks.\x3c/p\x3e"},
20:{title:"Can't add object point configuration to a long data series",text:"\x3ch1\x3eCan't add object point configuration to a long data series\x3c/h1\x3e\x3cp\x3eIn 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' \x3ca href\x3d\"https://api.highcharts.com/highstock#plotOptions.series.turboThreshold\"\x3eturboThreshold\x3c/a\x3e. Instead of the object syntax, use the Array syntax.\x3c/p\x3e"},
21:{title:"Can't find Proj4js library",text:'\x3ch1\x3eCan\'t find Proj4js library\x3c/h1\x3e\x3cp\x3eUsing latitude/longitude functionality in Highmaps requires the \x3ca href\x3d"http://proj4js.org"\x3eProj4js\x3c/a\x3e library to be loaded.\x3c/p\x3e'},22:{title:"Map does not support latitude/longitude",text:'\x3ch1\x3eMap does not support latitude/longitude\x3c/h1\x3e\x3cp\x3eThe loaded map does not support latitude/longitude functionality. This is only supported with maps from the \x3ca href\x3d"https://code.highcharts.com/mapdata"\x3eofficial Highmaps map collection\x3c/a\x3e from version 1.1.0 onwards. If you are using a custom map, consider using the \x3ca href\x3d"https://proj4js.org"\x3eProj4js\x3c/a\x3e library to convert between projections.\x3c/p\x3e'},
23:{title:"Unsupported color format used for color interpolation",text:"\x3ch1\x3eUnsupported color format used for color interpolation\x3c/h1\x3e\x3cp\x3eHighcharts supports three color formats primarily: hex (`#FFFFFF`), rgb (\x3ccode\x3ergba(255,255,255)\x3c/code\x3e) and rgba (\x3ccode\x3ergba(255,255,255,1)\x3c/code\x3e). If any other format, like 3-digit colors (`#FFF`), named colors (\x3ccode\x3ewhite\x3c/code\x3e) or gradient structures are used in for example a heatmap, Highcharts will fail to interpolate and will\x3c/p\x3e\x3cp\x3einstead use the end-color with no interpolation applied.\x3c/p\x3e\x3cp\x3eWe've chosen to preserve this limitation in order to keep the weight of the implementation at a minimum.\x3c/p\x3e"},
24:{title:"Cannot run Point.update on a grouped point",text:"\x3ch1\x3eCannot run Point.update on a grouped point\x3c/h1\x3e\x3cp\x3eRunning \x3ccode\x3ePoint.update\x3c/code\x3e in Highstock when a point is grouped by data grouping is not supported.\x3c/p\x3e\x3cp\x3eThis is not supported because when data grouping is enabled, there won't be any\x3c/p\x3e\x3cp\x3ereferences to the raw points, which is required by the \x3ccode\x3ePoint.update\x3c/code\x3e function.\x3c/p\x3e"},25:{title:"Can't find Moment.js library",
text:'\x3ch1\x3eCan\'t find Moment.js library\x3c/h1\x3e\x3cp\x3eUsing the global.timezone option requires the \x3ca href\x3d"https://momentjs.com/"\x3eMoment.js\x3c/a\x3e library to be loaded.\x3c/p\x3e'},26:{title:"WebGL not supported, and no fallback module included",text:"\x3ch1\x3eWebGL not supported, and no fallback module included\x3c/h1\x3e\x3cp\x3eThis happens when the browser doesn't support WebGL,\x3cb\x3eand\x3c/b\x3e the canvas fallback module (\x3ccode\x3eboost-canvas.js\x3c/code\x3e) hasn't been included OR if the fallback module was included\x3cb\x3eafter\x3c/b\x3e the boost module.\x3c/p\x3e\x3cp\x3eIf a fallback is required, make sure to include \x3ccode\x3eboost-canvas.js\x3c/code\x3e, and that it's included before \x3ccode\x3eboost.js\x3c/code\x3e.\x3c/p\x3e\x3cp\x3ePlease note that the fallback module is not intended as a fully-featured one. Rather, it's a minimal implementation of the WebGL counterpart.\x3c/p\x3e"},
27:{title:"This browser does not support SVG",text:"\x3ch1\x3eThis browser does not support SVG\x3c/h1\x3e\x3cp\x3eThis happens in old IE when the \x3ccode\x3eoldie.js\x3c/code\x3e module isn't loaded.\x3c/p\x3e\x3cp\x3eIf compatibility with IE versions 6, 7 and 8 is required, add the module after\x3c/p\x3e\x3cp\x3eloading \x3ccode\x3ehighcharts.js\x3c/code\x3e. 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: \x3c/p\x3e\x3cpre\x3e\x26lt;!--[if lt IE 9]\x26gt;\n \x26lt;script src\x3d'https://code.highcharts.com/modules/oldie.js'\x26gt;\x26lt;/script\x26gt;\n\x26lt;![endif]--\x26gt;\x3c/pre\x3e"},
28:{title:"Fallback to export server disabled",text:'\x3ch1\x3eFallback to export server disabled\x3c/h1\x3e\x3cp\x3eThis happens when the offline export module encounters a chart that it can\'t\x3c/p\x3e\x3cp\x3eexport successfully, and the fallback to the online export server is disabled. The offline exporting module will fail for certain browsers, and certain\x3c/p\x3e\x3cp\x3efeatures (e.g. \x3ca href\x3d"https://api.highcharts.com/highcharts/exporting.allowHTML"\x3eexporting.allowHTML\x3c/a\x3e ), depending on the type of image exporting to. For a compatibility overview, see \x3ca href\x3d"https://www.highcharts.com/docs/export-module/client-side-export"\x3eClient Side Export\x3c/a\x3e.\x3c/p\x3e\x3cp\x3eFor 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 \x3ca href\x3d"https://api.highcharts.com/highcharts/exporting.error"\x3eexporting.error\x3c/a\x3e callback when disabling the fallback, so that details can be provided to the end-user if offline export isn\'t working for them.\x3c/p\x3e'},
29:{title:"Browser does not support WebAudio",text:"\x3ch1\x3eBrowser does not support WebAudio\x3c/h1\x3e\x3cp\x3eThis 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.\x3c/p\x3e"},30:{title:"Invalid instrument",text:"\x3ch1\x3eInvalid instrument\x3c/h1\x3e\x3cp\x3eThis 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.\x3c/p\x3e"},
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".split(" ")}};(function(a){var f=a.addEvent,h=a.isNumber,
k=a.setOptions,g=a.each;k({chart:{displayErrors:!0}});f(a.Chart,"displayError",function(d){var b=d.code,c=this.options.chart;d=this.renderer;var e;this.errorElements&&g(this.errorElements,function(a){a&&a.destroy()});c&&c.displayErrors&&(this.errorElements=[],b=h(b)?"Highcharts error #"+b+": "+a.errorMessages[b].title+a.errorMessages[b].text:b,c=this.chartWidth,e=this.chartHeight,this.errorElements[0]=d.rect(2,2,c-4,e-4).attr({"stroke-width":4,stroke:"#ff0000",zIndex:3}).add(),this.errorElements[1]=
d.label(b,0,0,"rect",null,null,!0).css({color:"#ffffff",width:c-16,padding:0}).attr({fill:"#ff0000",width:c,padding:8,zIndex:10}).add(),this.errorElements[1].attr({y:e-this.errorElements[1].getBBox().height}))});f(a.Chart,"beforeRedraw",function(){var a=this.errorElements;a&&a.length&&g(a,function(a){a.destroy()});this.errorElements=null})})(a)});
//# sourceMappingURL=debugger.js.map
@@ -0,0 +1 @@
{"version":3,"file":"debugger.js.map","lineCount":27,"mappings":"A;;;;;;;;AASC,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,QAAS,EAAG,CACf,MAAOH,EADQ,CAAnB,CADG,CAKHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CATY,CAAnB,CAAA,CAWC,QAAS,CAACD,CAAD,CAAa,CAiIlBA,CAlHEE,cAAA,CAAkB,CACd,GAAM,CACF,MAAS,yDADP,CAEF,KAAQ,0uBAFN;AAGF,QAAW,0uBAHT,CADQ;AAMd,GAAM,CACF,MAAS,mCADP,CAEF,KAAQ,6UAFN,CANQ,CAUd,GAAM,CACF,MAAS,8EADP,CAEF,KAAQ,0iBAFN,CAVQ;AAcd,GAAM,CACF,MAAS,yBADP,CAEF,KAAQ,4ZAFN,CAdQ,CAkBd,GAAM,CACF,MAAS,mDADP;AAEF,KAAQ,yuBAFN,CAlBQ;AAsBd,GAAM,CACF,MAAS,sCADP,CAEF,KAAQ,qUAFN,CAtBQ,CA0Bd,GAAM,CACF,MAAS,wCADP,CAEF,KAAQ,ioBAFN,CA1BQ;AA8Bd,GAAM,CACF,MAAS,0CADP,CAEF,KAAQ,4gBAFN,CA9BQ;AAkCd,GAAM,CACF,MAAS,mCADP,CAEF,KAAQ,uOAFN,CAlCQ,CAsCd,GAAM,CACF,MAAS,gBADP,CAEF,KAAQ,mcAFN,CAtCQ;AA0Cd,GAAM,CACF,MAAS,4DADP,CAEF,KAAQ,2aAFN,CA1CQ;AA8Cd,GAAM,CACF,MAAS,4BADP,CAEF,KAAQ,kNAFN,CA9CQ,CAkDd,GAAM,CACF,MAAS,yCADP,CAEF,KAAQ,6cAFN,CAlDQ;AAsDd,GAAM,CACF,MAAS,uDADP,CAEF,KAAQ,0pBAFN,CAtDQ;AA0Dd,GAAM,CACF,MAAS,4CADP,CAEF,KAAQ,oaAFN,CA1DQ,CA8Dd,GAAM,CACF,MAAS,8BADP;AAEF,KAAQ,uMAFN,CA9DQ,CAkEd,GAAM,CACF,MAAS,sDADP,CAEF,KAAQ,iqBAFN,CAlEQ;AAsEd,GAAM,CACF,MAAS,mCADP,CAEF,KAAQ,+nBAFN,CAtEQ;AA0Ed,GAAM,CACF,MAAS,oCADP,CAEF,KAAQ,yjCAFN,CA1EQ;AA8Ed,GAAM,CACF,MAAS,mCADP,CAEF,KAAQ,iUAFN,CA9EQ,CAkFd,GAAM,CACF,MAAS,oBADP,CAEF,KAAQ,uNAFN,CAlFQ;AAsFd,KAAQ,CACJ,MAAS,0bAAA,MAAA,CAAA,GAAA,CADL,CAtFM,CAmHrB,UAAS,CAACC,CAAD,CAAI,CAAA,IAWNC,EAAWD,CAAAC,SAXL,CAYNC,EAAWF,CAAAE,SAZL;AAaNC,EAAaH,CAAAG,WAbP,CAcNC,EAAOJ,CAAAI,KAEXD,EAAA,CAAW,CAIPE,MAAO,CAYHC,cAAe,CAAA,CAZZ,CAJA,CAAX,CAoBAL,EAAA,CAASD,CAAAO,MAAT,CAAkB,cAAlB,CAAkC,QAAS,CAACC,CAAD,CAAI,CAAA,IAEvCC,EAAOD,CAAAC,KAFgC,CAIvCC,EAHQL,IAGEK,QAAAL,MACVM,EAAAA,CAJQN,IAIGM,SAJf,KAMIC,CANQP,KAQRQ,cAAJ,EACIT,CAAA,CATQC,IASHQ,cAAL,CAA0B,QAAS,CAACC,CAAD,CAAK,CAChCA,CAAJ,EACIA,CAAAC,QAAA,EAFgC,CAAxC,CAOAL,EAAJ,EAAeA,CAAAJ,cAAf,GAhBYD,IAiBRQ,cAsCA,CAtCsB,EAsCtB,CArCAG,CAqCA,CArCMd,CAAA,CAASO,CAAT,CAAA,CAAiB,oBAAjB,CAAwCA,CAAxC,CAA+C,IAA/C,CACFT,CAAAD,cAAA,CAAgBU,CAAhB,CAAAQ,MADE,CAC4BjB,CAAAD,cAAA,CAAgBU,CAAhB,CAAAS,KAD5B,CACyDT,CAoC/D,CAnCAU,CAmCA,CAvDQd,IAoBKc,WAmCb,CAlCAP,CAkCA,CAvDQP,IAqBMO,YAkCd,CAvDQP,IAwBRQ,cAAA,CAAoB,CAApB,CA+BA,CA/ByBF,CAAAS,KAAA,CACrB,CADqB,CAErB,CAFqB,CAGrBD,CAHqB,CAGR,CAHQ,CAIrBP,CAJqB,CAIP,CAJO,CAAAS,KAAA,CAKlB,CACH,eAAgB,CADb,CAEHC,OAAQ,SAFL,CAGHC,OAAQ,CAHL,CALkB,CAAAC,IAAA,EA+BzB,CAvDQnB,IAoCRQ,cAAA,CAAoB,CAApB,CAmBA;AAnByBF,CAAAc,MAAA,CACrBT,CADqB,CAErB,CAFqB,CAGrB,CAHqB,CAIrB,MAJqB,CAKrB,IALqB,CAMrB,IANqB,CAOrB,CAAA,CAPqB,CAAAU,IAAA,CAQnB,CACFC,MAAO,SADL,CAEFC,MAAOT,CAAPS,CAAoB,EAFlB,CAGFC,QAAS,CAHP,CARmB,CAAAR,KAAA,CAYjB,CACJS,KAAM,SADF,CAEJF,MAAOT,CAFH,CAGJU,QAAS,CAHL,CAIJN,OAAQ,EAJJ,CAZiB,CAAAC,IAAA,EAmBzB,CAvDQnB,IAuDRQ,cAAA,CAAoB,CAApB,CAAAQ,KAAA,CAA4B,CACxBU,EAAGnB,CAAHmB,CAAiB,IAAAlB,cAAA,CAAmB,CAAnB,CAAAmB,QAAA,EAAAC,OADO,CAA5B,CAvCJ,CAjB2C,CAA/C,CA8DAhC,EAAA,CAASD,CAAAO,MAAT,CAAkB,cAAlB,CAAkC,QAAS,EAAG,CAC1C,IAAIM,EAAgB,IAAAA,cAEhBA,EAAJ,EAAqBA,CAAAqB,OAArB,EACI9B,CAAA,CAAKS,CAAL,CAAoB,QAAS,CAACC,CAAD,CAAK,CAC9BA,CAAAC,QAAA,EAD8B,CAAlC,CAIJ,KAAAF,cAAA,CAAqB,IARqB,CAA9C,CAlGU,CAAb,CAAA,CA6GChB,CA7GD,CAlImB,CAXvB;","sources":["debugger.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","errorMessages","H","addEvent","isNumber","setOptions","each","chart","displayErrors","Chart","e","code","options","renderer","chartHeight","errorElements","el","destroy","msg","title","text","chartWidth","rect","attr","stroke","zIndex","add","label","css","color","width","padding","fill","y","getBBox","height","length"]}
@@ -0,0 +1,267 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(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>.</p>",
"enduser": "<h1>Can't plot zero or subzero values on a logarithmic axis</h1><p>This error occurs in the following situations:</p><p>* If a zero or subzero data value is added to a logarithmic axis</p><p>* If the minimum of a logarithimic axis is set to 0 or less</p><p>* If the threshold is set to 0 or less</p><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>.</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 series.data 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>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</p><p>from a XML source, and the implementer forgot to run <code>parseFloat</code></p><p>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</p><p>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</p><p>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 (`#FFFFFF`), rgb (<code>rgba(255,255,255)</code>) and rgba (<code>rgba(255,255,255,1)</code>). If any other format, like 3-digit colors (`#FFF`), named colors (<code>white</code>) or gradient structures are used in for example a heatmap, Highcharts will fail to interpolate and will</p><p>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</p><p>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</p><p>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</p><p>export successfully, and the fallback to the online export server is disabled. The offline exporting module will fail for certain browsers, and certain</p><p>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>"
},
"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"
]
}
};
}(Highcharts));
(function (H) {
/* *
*
* (c) 2010-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*
* */
var addEvent = H.addEvent,
isNumber = H.isNumber,
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.
*
* Requires `debugger.js` module.
*
* @sample highcharts/chart/display-errors/
* Show errors on chart
*
* @since 7.0.0
*/
displayErrors: true
}
});
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) {
chart.errorElements = [];
msg = isNumber(code) ? 'Highcharts error #' + code + ': ' +
H.errorMessages[code].title + H.errorMessages[code].text : code;
chartWidth = chart.chartWidth;
chartHeight = chart.chartHeight;
// 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',
null,
null,
true
).css({
color: '#ffffff',
width: chartWidth - 16,
padding: 0
}).attr({
fill: '#ff0000',
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;
});
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,15 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Dependency wheel module
(c) 2010-2018 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(function(){return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){(function(c){c.NodesMixin={createNode:function(l){function h(a,b){return c.find(a,function(a){return a.id===b})}var a=h(this.nodes,l),b=this.pointClass,m;a||(m=this.options.nodes&&h(this.options.nodes,l),a=(new b).init(this,c.extend({className:"highcharts-node",isNode:!0,id:l,y:1},
m)),a.linksTo=[],a.linksFrom=[],a.formatPrefix="node",a.name=a.name||a.options.id,a.getSum=function(){var b=0,g=0;a.linksTo.forEach(function(a){b+=a.weight});a.linksFrom.forEach(function(a){g+=a.weight});return Math.max(b,g)},a.offset=function(b,g){for(var d=0,f=0;f<a[g].length;f++){if(a[g][f]===b)return d;d+=a[g][f].weight}},a.hasShape=function(){var b=0;a.linksTo.forEach(function(a){a.outgoing&&b++});return!a.linksTo.length||b!==a.linksTo.length},this.nodes.push(a));return a}}})(c);(function(c){var l=
c.seriesType,h=c.seriesTypes.sankey.prototype;l("dependencywheel","sankey",{center:[],curveFactor:.6,startAngle:0},{orderNodes:!1,getCenter:c.seriesTypes.pie.prototype.getCenter,createNodeColumns:function(){var a=[this.createNodeColumn()];this.nodes.forEach(function(b){b.column=0;a[0].push(b)});return a},getNodePadding:function(){return this.options.nodePadding/Math.PI},createNode:function(a){var b=h.createNode.call(this,a);b.index=this.nodes.length-1;b.getSum=function(){return b.linksFrom.concat(b.linksTo).reduce(function(a,
b){return a+b.weight},0)};b.offset=function(a){function c(a){return a.fromNode===b?a.toNode:a.fromNode}var g=0,d,f=b.linksFrom.concat(b.linksTo),q;f.sort(function(a,b){return c(a).index-c(b).index});for(d=0;d<f.length;d++)if(c(f[d]).index>b.index){f=f.slice(0,d).reverse().concat(f.slice(d).reverse());q=!0;break}q||f.reverse();for(d=0;d<f.length;d++){if(f[d]===a)return g;g+=f[d].weight}};return b},translate:function(){var a=this.options,b=2*Math.PI/(this.chart.plotHeight+this.getNodePadding()),m=this.getCenter(),
l=(a.startAngle-90)*c.deg2rad;h.translate.call(this);this.nodeColumns[0].forEach(function(c){var d=c.shapeArgs,f=m[0],g=m[1],h=m[2]/2,k=h-a.nodeWidth,n=l+b*d.y,d=l+b*(d.y+d.height);c.shapeType="arc";c.shapeArgs={x:f,y:g,r:h,innerR:k,start:n,end:d};c.dlBox={x:f+Math.cos((n+d)/2)*(h+k)/2,y:g+Math.sin((n+d)/2)*(h+k)/2,width:1,height:1};c.linksFrom.forEach(function(c){var d,e=c.linkBase.map(function(e,h){e*=b;var m=Math.cos(l+e)*(k+1),n=Math.sin(l+e)*(k+1),p=a.curveFactor;d=Math.abs(c.linkBase[3-h]*b-
e);d>Math.PI&&(d=2*Math.PI-d);d*=k;d<k&&(p*=d/k);return{x:f+m,y:g+n,cpX:f+(1-p)*m,cpY:g+(1-p)*n}});c.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]}})})}})})(c)});
//# sourceMappingURL=dependency-wheel.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,301 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
H.NodesMixin = {
// Create a single node that holds information on incoming and outgoing
// links.
createNode: function (id) {
function findById(nodes, id) {
return H.find(nodes, function (node) {
return node.id === id;
});
}
var node = findById(this.nodes, id),
PointClass = this.pointClass,
options;
if (!node) {
options = this.options.nodes && findById(this.options.nodes, id);
node = (new PointClass()).init(
this,
H.extend({
className: 'highcharts-node',
isNode: true,
id: id,
y: 1 // Pass isNull test
}, options)
);
node.linksTo = [];
node.linksFrom = [];
node.formatPrefix = 'node';
node.name = node.name || node.options.id; // for use in formats
// Return the largest sum of either the incoming or outgoing links.
node.getSum = function () {
var sumTo = 0,
sumFrom = 0;
node.linksTo.forEach(function (link) {
sumTo += link.weight;
});
node.linksFrom.forEach(function (link) {
sumFrom += link.weight;
});
return Math.max(sumTo, sumFrom);
};
// Get the offset in weight values of a point/link.
node.offset = function (point, coll) {
var offset = 0;
for (var i = 0; i < node[coll].length; i++) {
if (node[coll][i] === point) {
return offset;
}
offset += node[coll][i].weight;
}
};
// Return true if the node has a shape, otherwise all links are
// outgoing.
node.hasShape = function () {
var outgoing = 0;
node.linksTo.forEach(function (link) {
if (link.outgoing) {
outgoing++;
}
});
return !node.linksTo.length || outgoing !== node.linksTo.length;
};
this.nodes.push(node);
}
return node;
}
};
}(Highcharts));
(function (H) {
/* *
* Experimental dependency wheel module
*
* (c) 2018 Torstein Honsi
*
* License: www.highcharts.com/license
*/
var unsupportedSeriesType = H.seriesType;
var base = H.seriesTypes.sankey.prototype;
unsupportedSeriesType('dependencywheel', 'sankey', {
center: [],
curveFactor: 0.6,
startAngle: 0
}, {
orderNodes: false,
getCenter: H.seriesTypes.pie.prototype.getCenter,
// Dependency wheel has only one column, it runs along the perimeter
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
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
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.
node.offset = function (point) {
var offset = 0,
i,
links = node.linksFrom.concat(node.linksTo),
sliced;
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;
},
// @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) {
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);
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) {
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, // long arc
1, // clockwise
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
]
};
});
});
}
});
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,18 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Drag-panes module
(c) 2010-2019 Highsoft AS
Author: Kacper Madej
License: www.highcharts.com/license
*/
(function(e){"object"===typeof module&&module.exports?(e["default"]=e,module.exports=e):"function"===typeof define&&define.amd?define(function(){return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){(function(b){var e=b.hasTouch,x=b.merge,u=b.wrap,y=b.isNumber,g=b.addEvent,v=b.relativeLength,z=b.objectEach,m=b.Axis,w=b.Pointer;x(!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,c){this.axis=a;this.options=a.options.resize;this.render();c||this.addMouseEvents()},render:function(){var a=this.axis,c=a.chart,d=this.options,b=d.x,e=d.y,k=Math.min(Math.max(a.top+a.height+e,c.plotTop),c.plotTop+c.plotHeight),l={};c.styledMode||(l={cursor:d.cursor,stroke:d.lineColor,"stroke-width":d.lineWidth,dashstyle:d.lineDashStyle});this.lastPos=k-e;this.controlLine||
(this.controlLine=c.renderer.path().addClass("highcharts-axis-resizer"));this.controlLine.add(a.axisGroup);d=c.styledMode?this.controlLine.strokeWidth():d.lineWidth;l.d=c.renderer.crispLine(["M",a.left+b,k,"L",a.left+a.width+b,k],d);this.controlLine.attr(l)},addMouseEvents:function(){var a=this,c=a.controlLine.element,d=a.axis.chart.container,b=[],t,k,l;a.mouseMoveHandler=t=function(c){a.onMouseMove(c)};a.mouseUpHandler=k=function(c){a.onMouseUp(c)};a.mouseDownHandler=l=function(c){a.onMouseDown(c)};
b.push(g(d,"mousemove",t),g(d.ownerDocument,"mouseup",k),g(c,"mousedown",l));e&&b.push(g(d,"touchmove",t),g(d.ownerDocument,"touchend",k),g(c,"touchstart",l));a.eventsToUnbind=b},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(){this.axis.chart.pointer.reset(!1,0);this.grabbed=this.axis.chart.activeResizer=!0},updateAxes:function(a){var c=this,d=c.axis.chart,b=c.options.controlledAxis,e=0===b.next.length?[d.yAxis.indexOf(c.axis)+1]:b.next,b=[c.axis].concat(b.prev),k=[],l=!1,g=d.plotTop,n=d.plotHeight,m=g+n,q;a=Math.max(Math.min(a,m),g);q=a-c.lastPos;1>q*q||([b,e].forEach(function(b,e){b.forEach(function(b,h){var f=(b=y(b)?d.yAxis[b]:e||h?d.get(b):b)&&b.options,p,r;f&&"navigator-y-axis"!==f.id&&
(h=b.top,r=Math.round(v(f.minLength,n)),p=Math.round(v(f.maxLength,n)),e?(q=a-c.lastPos,f=Math.round(Math.min(Math.max(b.len-q,r),p)),h=b.top+q,h+f>m&&(p=m-f-h,a+=p,h+=p),h<g&&(h=g,h+f>m&&(f=n)),f===r&&(l=!0),k.push({axis:b,options:{top:100*(h-g)/n+"%",height:100*f/n+"%"}})):(f=Math.round(Math.min(Math.max(a-h,r),p)),f===p&&(l=!0),a=h+f,k.push({axis:b,options:{height:100*f/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,d){a[d]=null})}};m.prototype.keepProps.push("resizer");g(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)))});g(m,"destroy",function(a){!a.keepEvents&&this.resizer&&this.resizer.destroy()});u(w.prototype,"runPointActions",function(a){this.chart.activeResizer||a.apply(this,Array.prototype.slice.call(arguments,
1))});u(w.prototype,"drag",function(a){this.chart.activeResizer||a.apply(this,Array.prototype.slice.call(arguments,1))})})(e)});
//# sourceMappingURL=drag-panes.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,649 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
* Plugin for resizing axes / panes in a chart.
*
* (c) 2010-2017 Highsoft AS
* Author: Kacper Madej
*
* License: www.highcharts.com/license
*/
var hasTouch = H.hasTouch,
merge = H.merge,
wrap = H.wrap,
isNumber = H.isNumber,
addEvent = H.addEvent,
relativeLength = H.relativeLength,
objectEach = H.objectEach,
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.
*
* This feature requires the `drag-panes.js` module.
*
* @type {Number|String}
* @product highstock
* @sample {highstock} stock/yaxis/resize-min-max-length
* minLength and maxLength
* @apioption yAxis.minLength
*/
minLength: '10%',
/**
* Maximal size of a resizable axis. Could be set as a percent
* of plot area or pixel size.
*
* This feature requires the `drag-panes.js` module.
*
* @type {String|Number}
* @product highstock
* @sample {highstock} stock/yaxis/resize-min-max-length
* minLength and maxLength
* @apioption yAxis.maxLength
*/
maxLength: '100%',
/**
* Options for axis resizing. This feature requires the
* [drag-panes.js](http://code.highcharts.com/stock/modules/drag-panes.js)
* module. It adds a thick line between panes which the user can drag
* in order to resize the panes.
*
* @product highstock
* @sample {highstock} stock/demo/candlestick-and-volume
* Axis resizing enabled
* @optionparent yAxis.resize
*/
resize: {
/**
* Contains two arrays of axes that are controlled by control line
* of the axis.
*
* This feature requires the `drag-panes.js` module.
*/
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.
*
* This feature requires the `drag-panes.js` module.
*
* @type {Array<String|Number>}
* @default []
* @sample {highstock} stock/yaxis/multiple-resizers
* Three panes with resizers
* @sample {highstock} stock/yaxis/resize-multiple-axes
* One resizer controlling multiple axes
*/
next: [],
/**
* Array of axes that should move with the current axis
* while resizing.
*
* This feature requires the `drag-panes.js` module.
*
* @type {Array<String|Number>}
* @sample {highstock} stock/yaxis/multiple-resizers
* Three panes with resizers
* @sample {highstock} stock/yaxis/resize-multiple-axes
* One resizer controlling multiple axes
*/
prev: []
},
/**
* Enable or disable resize by drag for the axis.
*
* This feature requires the `drag-panes.js` module.
*
* @sample {highstock} stock/demo/candlestick-and-volume
* Enabled resizer
*/
enabled: false,
/**
* Cursor style for the control line.
*
* In styled mode use class `highcharts-axis-resizer` instead.
*
* This feature requires the `drag-panes.js` module.
*/
cursor: 'ns-resize',
/**
* Color of the control line.
*
* In styled mode use class `highcharts-axis-resizer` instead.
*
* This feature requires the `drag-panes.js` module.
*
* @type {Color}
* @sample {highstock} stock/yaxis/styled-resizer Styled resizer
*/
lineColor: '#cccccc',
/**
* Dash style of the control line.
*
* In styled mode use class `highcharts-axis-resizer` instead.
*
* This feature requires the `drag-panes.js` module.
*
* @sample {highstock} stock/yaxis/styled-resizer Styled resizer
* @see For supported options check
* [dashStyle](#plotOptions.series.dashStyle)
*/
lineDashStyle: 'Solid',
/**
* Width of the control line.
*
* In styled mode use class `highcharts-axis-resizer` instead.
*
* This feature requires the `drag-panes.js` module.
*
* @sample {highstock} stock/yaxis/styled-resizer Styled resizer
*/
lineWidth: 4,
/**
* Horizontal offset of the control line.
*
* This feature requires the `drag-panes.js` module.
*
* @sample {highstock} stock/yaxis/styled-resizer Styled resizer
*/
x: 0,
/**
* Vertical offset of the control line.
*
* This feature requires the `drag-panes.js` module.
*
* @sample {highstock} stock/yaxis/styled-resizer Styled resizer
*/
y: 0
}
};
merge(true, Axis.prototype.defaultYAxisOptions, resizerOptions);
/**
* The AxisResizer class.
*
* @private
* @class
* @name Highcharts.AxisResizer
*
* @param {Highcharts.Axis} axis
* Main axis for the AxisResizer.
*/
H.AxisResizer = function (axis) {
this.init(axis);
};
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 = Math.min(
Math.max(
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 {global.PointerEvent} 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 {global.PointerEvent} 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 () {
// 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),
axesConfigs = [], // prev and next configs
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(Math.min(Math.max(val, min), max));
};
// Normalize chartY to plot area limits
chartY = Math.max(Math.min(chartY, plotBottom), plotTop);
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');
// 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));
}
});
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,40 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
(c) 2009-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(m){"object"===typeof module&&module.exports?(m["default"]=m,module.exports=m):"function"===typeof define&&define.amd?define(function(){return m}):m("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(m){(function(h){function m(a){return{left:"right",right:"left",top:"bottom",bottom:"top"}[a]}function L(a){var b=["draggableX","draggableY"],c;n(a.dragDropProps,function(a){a.optionName&&b.push(a.optionName)});for(c=b.length;c--;)if(a.options.dragDrop[b[c]])return!0}function M(a){var b=
a.series?a.series.length:0;if(a.hasCartesianSeries&&!a.polar)for(;b--;)if(a.series[b].options.dragDrop&&L(a.series[b]))return!0}function N(a){var b=a.series,c=b.options.dragDrop||{};a=a.options&&a.options.dragDrop;var e,f;n(b.dragDropProps,function(a){"x"===a.axis&&a.move?e=!0:"y"===a.axis&&a.move&&(f=!0)});return(c.draggableX&&e||c.draggableY&&f)&&!(a&&!1===a.draggableX&&!1===a.draggableY)&&b.yAxis&&b.xAxis}function t(a,b){return void 0===a.chartX||void 0===a.chartY?b.pointer.normalize(a):a}function w(a,
b,c,e){var f=b.map(function(b){return p(a,b,c,e)});return function(){f.forEach(function(a){a()})}}function O(a,b,c){var e=b.dragDropData.origin;b=e.chartX;var e=e.chartY,f=a.chartX;a=a.chartY;return Math.sqrt((f-b)*(f-b)+(a-e)*(a-e))>c}function P(a,b,c){var e={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(a){var b={};n(a.series.dragDropProps,function(c,e){b[e]=a[e]});b.point=a;e.points[a.id]=b});
return e}function Q(a){var b=a.series,c=b.options.dragDrop.groupBy;return a.options[c]?b.points.filter(function(b){return b.options[c]===a.options[c]}):[a]}function D(a,b){var c=Q(b),e=b.series,f=e.chart,l;u(e.options.dragDrop&&e.options.dragDrop.liveRedraw,!0)||(f.dragGuideBox=l=e.getGuideBox(c),f.setGuideBoxState("default",e.options.dragDrop.guideBox).add(e.group));f.dragDropData={origin:P(a,c,l),point:b,groupedPoints:c,isDragging:!0}}function R(a,b){var c=a.point,e=q(c.series.options.dragDrop,
c.options.dragDrop),f={},l=a.updateProp,C={};n(c.series.dragDropProps,function(a,b){if(!l||l===b&&a.resize&&(!a.optionName||!1!==e[a.optionName]))if(l||a.move&&("x"===a.axis&&e.draggableX||"y"===a.axis&&e.draggableY))f[b]=a});(l?[c]:a.groupedPoints).forEach(function(c){C[c.id]={point:c,newValues:c.getDropValues(a.origin,b,f)}});return C}function E(a,b){var c=a.dragDropData.newPoints;b=!1===b?!1:q({duration:400},a.options.animation);a.isDragDropAnimating=!0;n(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)a.hasOwnProperty(c)&&b++;return b}function H(a){for(var b in a)if(a.hasOwnProperty(b))return a[b]}function S(a,b){if(!b.zoomOrPanKeyPressed(a)){var c=
b.dragDropData,e,f;f=0;c&&c.isDragging&&(e=c.point,f=e.series.options.dragDrop,a.preventDefault(),c.draggedPastSensitivity||(c.draggedPastSensitivity=O(a,b,u(e.options.dragDrop&&e.options.dragDrop.dragSensitivity,f&&f.dragSensitivity,2))),c.draggedPastSensitivity&&(c.newPoints=R(c,a),b=c.newPoints,f=G(b),b=1===f?H(b):null,e.firePointEvent("drag",{origin:c.origin,newPoints:c.newPoints,newPoint:b&&b.newValues,newPointId:b&&b.point.id,numNewPoints:f,chartX:a.chartX,chartY:a.chartY},function(){var b=
e.series,c=b.chart,f=c.dragDropData,d=q(b.options.dragDrop,e.options.dragDrop),g=d.draggableX,k=d.draggableY,b=f.origin,h=a.chartX-b.chartX,x=a.chartY-b.chartY,r=h,f=f.updateProp;c.inverted&&(h=-x,x=-r);if(u(d.liveRedraw,!0))E(c,!1),e.showDragHandles();else if(f){var g=h,c=x,r=e.series,k=r.chart,f=k.dragDropData,n,p,d=r.dragDropProps[f.updateProp];p=f.newPoints[e.id].newValues;n="function"===typeof d.resizeSide?d.resizeSide(p,e):d.resizeSide;d.beforeResize&&d.beforeResize(k.dragGuideBox,p,e);var k=
k.dragGuideBox,r="x"===d.axis&&r.xAxis.reversed||"y"===d.axis&&r.yAxis.reversed?m(n):n,g="x"===d.axis?g-(f.origin.prevdX||0):0,c="y"===d.axis?c-(f.origin.prevdY||0):0,v;switch(r){case "left":v={x:k.attr("x")+g,width:Math.max(1,k.attr("width")-g)};break;case "right":v={width:Math.max(1,k.attr("width")+g)};break;case "top":v={y:k.attr("y")+c,height:Math.max(1,k.attr("height")-c)};break;case "bottom":v={height:Math.max(1,k.attr("height")+c)}}k.attr(v)}else c.dragGuideBox.translate(g?h:0,k?x:0);b.prevdX=
h;b.prevdY=x})))}}function A(a,b){var c=b.dragDropData;if(c&&c.isDragging&&c.draggedPastSensitivity){var e=c.point,f=c.newPoints,l=G(f),d=1===l?H(f):null;b.dragHandles&&b.hideDragHandles();a.preventDefault();b.cancelClick=!0;e.firePointEvent("drop",{origin:c.origin,chartX:a.chartX,chartY:a.chartY,newPoints:f,numNewPoints:l,newPoint:d&&d.newValues,newPointId:d&&d.point.id},function(){E(b)})}delete b.dragDropData;b.dragGuideBox&&(b.dragGuideBox.destroy(),delete b.dragGuideBox)}function T(a){var b=a.container,
c=h.doc;M(a)&&(w(b,["mousedown","touchstart"],function(b){b=t(b,a);var c=a.hoverPoint,e=h.merge(c.series.options.dragDrop,c.options.dragDrop),d=e.draggableX||!1,e=e.draggableY||!1;a.cancelClick=!1;!d&&!e||a.zoomOrPanKeyPressed(b)||(a.dragDropData&&a.dragDropData.isDragging?A(b,a):c&&N(c)&&(a.mouseIsDown=!1,D(b,c),c.firePointEvent("dragStart",b)))}),w(b,["mousemove","touchmove"],function(b){S(t(b,a),a)}),p(b,"mouseleave",function(b){A(t(b,a),a)}),a.unbindDragDropMouseUp=w(c,["mouseup","touchend"],
function(b){A(t(b,a),a)}),a.hasAddedDragDropEvents=!0,p(a,"destroy",function(){a.unbindDragDropMouseUp&&a.unbindDragDropMouseUp()}))}var p=h.addEvent,n=h.objectEach,u=h.pick,q=h.merge,d=h.seriesTypes,I=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]},z=d.line.prototype.dragDropProps={x:{axis:"x",move:!0},y:{axis:"y",move:!0}};d.flags&&(d.flags.prototype.dragDropProps=z);var g=d.column.prototype.dragDropProps=
{x:{axis:"x",move:!0},y:{axis:"y",move:!1,resize:!0,beforeResize:function(a,b,c){var e=c.series.translatedThreshold,f=a.attr("y");b.y>=c.series.options.threshold?(b=a.attr("height"),a.attr({height:Math.max(0,Math.round(b+(e?e-(f+b):0)))})):a.attr({y:Math.round(f+(e?e-f:0))})},resizeSide:function(a,b){var c=b.series.chart.dragHandles;a=a.y>=(b.series.options.threshold||0)?"top":"bottom";b=m(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]}}};d.bullet&&(d.bullet.prototype.dragDropProps={x:g.x,y:g.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:g.y.handleFormatter}});
d.columnrange&&(d.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:g.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:g.y.handleFormatter,
propValidate:function(a,b){return a>=b.low}}});d.boxplot&&(d.boxplot.prototype.dragDropProps={x:g.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.lowPlot}},handleFormatter:g.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:g.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:g.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:g.y.handleFormatter,propValidate:function(a,
b){return a>=b.q3}}});d.ohlc&&(d.ohlc.prototype.dragDropProps={x:g.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(a){return{x:a.shapeArgs.x,y:a.plotLow}},handleFormatter:g.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:g.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:g.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:g.y.handleFormatter,propValidate:function(a,b){return a<=b.high&&a>=b.low}}});if(d.arearange){var z=d.columnrange.prototype.dragDropProps,J=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]};d.arearange.prototype.dragDropProps={x:z.x,low:{optionName:"draggableLow",axis:"y",move:!0,resize:!0,resizeSide:"bottom",handlePositioner:function(a){return(a=a.lowerGraphic&&a.lowerGraphic.getBBox())?{x:a.x+a.width/2,y:a.y+a.height/
2}:{x:-999,y:-999}},handleFormatter:J,propValidate:z.low.propValidate},high:{optionName:"draggableHigh",axis:"y",move:!0,resize:!0,resizeSide:"top",handlePositioner:function(a){return(a=a.upperGraphic&&a.upperGraphic.getBBox())?{x:a.x+a.width/2,y:a.y+a.height/2}:{x:-999,y:-999}},handleFormatter:J,propValidate:z.high.propValidate}}}d.waterfall&&(d.waterfall.prototype.dragDropProps={x:g.x,y:q(g.y,{handleFormatter:function(a){return a.isSum||a.isIntermediateSum?null:g.y.handleFormatter(a)}})});if(d.xrange)var K=
function(a,b){var c=a.series,e=c.xAxis,f=c.yAxis,c=c.chart.inverted;b=e.toPixels(a[b],!0);var d=f.toPixels(a.y,!0);c?(b=e.len-b,d=f.len-d-a.shapeArgs.height/2):d-=a.shapeArgs.height/2;return{x:Math.round(b),y:Math.round(d)}},B=d.xrange.prototype.dragDropProps={y:{axis:"y",move:!0},x:{optionName:"draggableX1",axis:"x",move:!0,resize:!0,resizeSide:"left",handlePositioner:function(a){return K(a,"x")},handleFormatter:I,propValidate:function(a,b){return a<=b.x2}},x2:{optionName:"draggableX2",axis:"x",
move:!0,resize:!0,resizeSide:"right",handlePositioner:function(a){return K(a,"x2")},handleFormatter:I,propValidate:function(a,b){return a>=b.x}}};d.gantt&&(d.gantt.prototype.dragDropProps={y:B.y,start:q(B.x,{optionName:"draggableStart",validateIndividualDrag:function(a){return!a.milestone}}),end:q(B.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){d[a]&&
(d[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};h.Chart.prototype.setGuideBoxState=function(a,b){var c=this.dragGuideBox;b=q(U,b);a=q(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"})};
h.Point.prototype.getDropValues=function(a,b,c){var e=this,f=e.series,d=q(f.options.dragDrop,e.options.dragDrop),g=f.yAxis,y=f.xAxis,h=b.chartX-a.chartX;b=b.chartY-a.chartY;var p=u(a.x,e.x),k=u(a.y,e.y),m=y.toValue(y.toPixels(p,!0)+(y.horiz?h:b),!0)-p,x=g.toValue(g.toPixels(k,!0)+(g.horiz?h:b),!0)-k,r={},t,w=a.points[e.id],v;for(v in c)if(c.hasOwnProperty(v)){if(void 0!==t){t=!1;break}t=!0}n(c,function(a,b){var c=w[b],l;l=c+("x"===a.axis?m:x);var g=a.axis.toUpperCase(),h=f[g.toLowerCase()+"Axis"].categories?
1:0,h=u(d["dragPrecision"+g],h),y=u(d["dragMin"+g],-Infinity),g=u(d["dragMax"+g],Infinity);h&&(l=Math.round(l/h)*h);l=Math.max(y,Math.min(g,l));t&&a.propValidate&&!a.propValidate(l,e)||void 0===c||(r[b]=l)});return r};h.Series.prototype.getGuideBox=function(a){var b=this.chart,c=Infinity,e=-Infinity,f=Infinity,d=-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),e=Math.max(a.x+a.width,e),f=Math.min(a.y,f),d=Math.max(a.y+
a.height,d))});return g?b.renderer.rect(c,f,e-c,d-f):b.renderer.g()};h.Point.prototype.showDragHandles=function(){var a=this,b=a.series,c=b.chart,e=c.renderer,f=q(b.options.dragDrop,a.options.dragDrop);n(b.dragDropProps,function(d,g){var h=q(V,d.handleOptions,f.dragHandle),l={className:h.className,"stroke-width":h.lineWidth,fill:h.color,stroke:h.lineColor},m=h.pathFormatter||d.handleFormatter,k=d.handlePositioner,n;n=d.validateIndividualDrag?d.validateIndividualDrag(a):!0;d.resize&&n&&d.resizeSide&&
m&&(f["draggable"+d.axis.toUpperCase()]||f[d.optionName])&&!1!==f[d.optionName]&&(c.dragHandles||(c.dragHandles={group:e.g("drag-drop-handles").add(b.markerGroup||b.group)}),c.dragHandles.point=a.id,k=k(a),l.d=n=m(a),m="function"===typeof d.resizeSide?d.resizeSide(a.options,a):d.resizeSide,!n||0>k.x||0>k.y||(l.cursor=h.cursor||"x"===d.axis!==!!c.inverted?"ew-resize":"ns-resize",(d=c.dragHandles[m])||(d=c.dragHandles[m]=e.path().add(c.dragHandles.group)),d.translate(k.x,k.y).attr(l),w(d.element,["touchstart",
"mousedown"],function(b){b=t(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())}),p(c.dragHandles.group.element,"mouseover",function(){c.dragDropData=c.dragDropData||{};c.dragDropData.isHoveringHandle=a.id}),w(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)})))})};h.Chart.prototype.hideDragHandles=function(){this.dragHandles&&(n(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)};p(h.Point,"mouseOver",function(){var a=this;setTimeout(function(){var b=a.series,c=b&&b.chart,d=c&&c.dragDropData;!c||d&&d.isDragging&&d.draggedPastSensitivity||c.isDragDropAnimating||!b.options.dragDrop||c.options&&c.options.chart&&
c.options.chart.options3d||(c.dragHandles&&c.hideDragHandles(),a.showDragHandles())},12)});p(h.Point,"mouseOut",function(){var a=this;setTimeout(function(){a.series&&F(a)},10)});p(h.Point,"remove",function(){var a=this.series.chart,b=a.dragHandles;b&&b.point===this.id&&a.hideDragHandles()});h.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]};p(h.Chart,"render",function(){this.hasAddedDragDropEvents||
T(this)})})(m)});
//# sourceMappingURL=draggable-points.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,29 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Highcharts Drilldown module
Author: Torstein Honsi
License: www.highcharts.com/license
*/
(function(l){"object"===typeof module&&module.exports?(l["default"]=l,module.exports=l):"function"===typeof define&&define.amd?define(function(){return l}):l("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(l){(function(e){var l=e.animObject,w=e.noop,x=e.color,y=e.defaultOptions,r=e.extend,D=e.format,z=e.objectEach,t=e.pick,n=e.Chart,p=e.seriesTypes,A=p.pie,p=p.column,B=e.Tick,u=e.fireEvent,C=1;r(y.lang,{drillUpText:"\u25c1 Back to {series.name}"});y.drilldown={activeAxisLabelStyle:{cursor:"pointer",
color:"#003399",fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",color:"#003399",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}}};e.SVGRenderer.prototype.Element.prototype.fadeIn=function(a){this.attr({opacity:.1,visibility:"inherit"}).animate({opacity:t(this.newOpacity,1)},a||{duration:250})};n.prototype.addSeriesAsDrilldown=function(a,b){this.addSingleSeriesAsDrilldown(a,b);this.applyDrilldown()};
n.prototype.addSingleSeriesAsDrilldown=function(a,b){var c=a.series,d=c.xAxis,f=c.yAxis,h,g=[],m=[],k,q,l;l=this.styledMode?{colorIndex:t(a.colorIndex,c.colorIndex)}:{color:a.color||c.color};this.drilldownLevels||(this.drilldownLevels=[]);k=c.options._levelNumber||0;(q=this.drilldownLevels[this.drilldownLevels.length-1])&&q.levelNumber!==k&&(q=void 0);b=r(r({_ddSeriesId:C++},l),b);h=c.points.indexOf(a);c.chart.series.forEach(function(a){a.xAxis!==d||a.isDrilling||(a.options._ddSeriesId=a.options._ddSeriesId||
C++,a.options._colorIndex=a.userOptions._colorIndex,a.options._levelNumber=a.options._levelNumber||k,q?(g=q.levelSeries,m=q.levelSeriesOptions):(g.push(a),m.push(a.options)))});a=r({levelNumber:k,seriesOptions:c.options,levelSeriesOptions:m,levelSeries:g,shapeArgs:a.shapeArgs,bBox:a.graphic?a.graphic.getBBox():{},color:a.isNull?(new e.Color(x)).setOpacity(0).get():x,lowerSeriesOptions:b,pointOptions:c.options.data[h],pointIndex:h,oldExtremes:{xMin:d&&d.userMin,xMax:d&&d.userMax,yMin:f&&f.userMin,
yMax:f&&f.userMax},resetZoomButton:this.resetZoomButton},l);this.drilldownLevels.push(a);d&&d.names&&(d.names.length=0);b=a.lowerSeries=this.addSeries(b,!1);b.options._levelNumber=k+1;d&&(d.oldPos=d.pos,d.userMin=d.userMax=null,f.userMin=f.userMax=null);c.type===b.type&&(b.animate=b.animateDrilldown||w,b.options.animation=!0)};n.prototype.applyDrilldown=function(){var a=this.drilldownLevels,b;a&&0<a.length&&(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()};n.prototype.getDrilldownBackText=function(){var a=this.drilldownLevels;if(a&&0<a.length)return a=a[a.length-1],a.series=a.seriesOptions,D(this.options.lang.drillUpText,a)};n.prototype.showDrillUpButton=function(){var a=this,b=this.getDrilldownBackText(),c=a.options.drilldown.drillUpButton,d,f;this.drillUpButton?this.drillUpButton.attr({text:b}).align():
(f=(d=c.theme)&&d.states,this.drillUpButton=this.renderer.button(b,null,null,function(){a.drillUp()},d,f&&f.hover,f&&f.select).addClass("highcharts-drillup-button").attr({align:c.position.align,zIndex:7}).add().align(c.position,!1,c.relativeTo||"plotBox"))};n.prototype.drillUp=function(){if(this.drilldownLevels&&0!==this.drilldownLevels.length){for(var a=this,b=a.drilldownLevels,c=b[b.length-1].levelNumber,d=b.length,f=a.series,h,g,e,k,q=function(b){var c;f.forEach(function(a){a.options._ddSeriesId===
b._ddSeriesId&&(c=a)});c=c||a.addSeries(b,!1);c.type===e.type&&c.animateDrillupTo&&(c.animate=c.animateDrillupTo);b===g.seriesOptions&&(k=c)};d--;)if(g=b[d],g.levelNumber===c){b.pop();e=g.lowerSeries;if(!e.chart)for(h=f.length;h--;)if(f[h].options.id===g.lowerSeriesOptions.id&&f[h].options._levelNumber===c+1){e=f[h];break}e.xData=[];g.levelSeriesOptions.forEach(q);u(a,"drillup",{seriesOptions:g.seriesOptions});k.type===e.type&&(k.drilldownLevel=g,k.options.animation=a.options.drilldown.animation,
e.animateDrillupFrom&&e.chart&&e.animateDrillupFrom(g));k.options._levelNumber=c;e.remove(!1);k.xAxis&&(h=g.oldExtremes,k.xAxis.setExtremes(h.xMin,h.xMax,!1),k.yAxis.setExtremes(h.yMin,h.yMax,!1));g.resetZoomButton&&(a.resetZoomButton=g.resetZoomButton,a.resetZoomButton.show())}u(a,"drillupall");this.redraw();0===this.drilldownLevels.length?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align();this.ddDupes.length=[]}};n.prototype.callbacks.push(function(){var a=
this;a.drilldown={update:function(b,c){e.merge(!0,a.options.drilldown,b);t(c,!0)&&a.redraw()}}});e.addEvent(n,"beforeShowResetZoom",function(){if(this.drillUpButton)return!1});e.addEvent(n,"render",function(){(this.xAxis||[]).forEach(function(a){a.ddPoints={};a.series.forEach(function(b){var c,d=b.xData||[],f=b.points,h;for(c=0;c<d.length;c++)h=b.options.data[c],"number"!==typeof h&&(h=b.pointClass.prototype.optionsToObject.call({series:b},h),h.drilldown&&(a.ddPoints[d[c]]||(a.ddPoints[d[c]]=[]),
a.ddPoints[d[c]].push(f?f[c]:!0)))});z(a.ticks,B.prototype.drillable)})});p.prototype.animateDrillupTo=function(a){if(!a){var b=this,c=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()))});e.syncTimeout(function(){b.points&&b.points.forEach(function(a,b){b=b===(c&&c.pointIndex)?"show":"fadeIn";var d="show"===b?!0:void 0,f=a.dataLabel;if(a.graphic)a.graphic[b](d);
f&&!f.hidden&&(f.fadeIn(),a.connector&&a.connector.fadeIn())})},Math.max(this.chart.options.drilldown.animation.duration-50,0));this.animate=w}};p.prototype.animateDrilldown=function(a){var b=this,c=this.chart,d=c.drilldownLevels,f,e=l(c.options.drilldown.animation),g=this.xAxis,m=c.styledMode;a||(d.forEach(function(a){b.options._ddSeriesId===a.lowerSeriesOptions._ddSeriesId&&(f=a.shapeArgs,m||(f.fill=a.color))}),f.x+=t(g.oldPos,g.pos)-g.pos,this.points.forEach(function(a){var c=a.shapeArgs;m||(c.fill=
a.color);a.graphic&&a.graphic.attr(f).animate(r(a.shapeArgs,{fill:a.color||b.color}),e);a.dataLabel&&a.dataLabel.fadeIn(e)}),this.animate=null)};p.prototype.animateDrillupFrom=function(a){var b=l(this.chart.options.drilldown.animation),c=this.group,d=c!==this.chart.columnGroup,f=this;f.trackerGroups.forEach(function(a){if(f[a])f[a].on("mouseover")});d&&delete this.group;this.points.forEach(function(h){var g=h.graphic,m=a.shapeArgs,k=function(){g.destroy();c&&d&&(c=c.destroy())};g&&(delete h.graphic,
f.chart.styledMode||(m.fill=a.color),b.duration?g.animate(m,e.merge(b,{complete:k})):(g.attr(m),k()))})};A&&r(A.prototype,{animateDrillupTo:p.prototype.animateDrillupTo,animateDrillupFrom:p.prototype.animateDrillupFrom,animateDrilldown:function(a){var b=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],c=this.chart.options.drilldown.animation,d=b.shapeArgs,f=d.start,h=(d.end-f)/this.points.length,g=this.chart.styledMode;a||(this.points.forEach(function(a,k){var m=a.shapeArgs;g||(d.fill=
b.color,m.fill=a.color);if(a.graphic)a.graphic.attr(e.merge(d,{start:f+k*h,end:f+(k+1)*h}))[c?"animate":"attr"](m,c)}),this.animate=null)}});e.Point.prototype.doDrilldown=function(a,b,c){var d=this.series.chart,f=d.options.drilldown,e=(f.series||[]).length,g;d.ddDupes||(d.ddDupes=[]);for(;e--&&!g;)f.series[e].id===this.drilldown&&-1===d.ddDupes.indexOf(this.drilldown)&&(g=f.series[e],d.ddDupes.push(this.drilldown));u(d,"drilldown",{point:this,seriesOptions:g,category:b,originalEvent:c,points:void 0!==
b&&this.series.xAxis.getDDPoints(b).slice(0)},function(b){var c=b.point.series&&b.point.series.chart,d=b.seriesOptions;c&&d&&(a?c.addSingleSeriesAsDrilldown(b.point,d):c.addSeriesAsDrilldown(b.point,d))})};e.Axis.prototype.drilldownCategory=function(a,b){z(this.getDDPoints(a),function(c){c&&c.series&&c.series.visible&&c.doDrilldown&&c.doDrilldown(!0,a,b)});this.chart.applyDrilldown()};e.Axis.prototype.getDDPoints=function(a){return this.ddPoints&&this.ddPoints[a]};B.prototype.drillable=function(){var a=
this.pos,b=this.label,c=this.axis,d="xAxis"===c.coll&&c.getDDPoints,f=d&&c.getDDPoints(a),h=c.chart.styledMode;d&&(b&&f&&f.length?(b.drillable=!0,b.basicStyles||h||(b.basicStyles=e.merge(b.styles)),b.addClass("highcharts-drilldown-axis-label").on("click",function(b){c.drilldownCategory(a,b)}),h||b.css(c.chart.options.drilldown.activeAxisLabelStyle)):b&&b.drillable&&(h||(b.styles={},b.css(b.basicStyles)),b.on("click",null),b.removeClass("highcharts-drilldown-axis-label")))};e.addEvent(e.Point,"afterInit",
function(){var a=this,b=a.series;a.drilldown&&e.addEvent(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});e.addEvent(e.Series,"afterDrawDataLabels",function(){var a=this.chart.options.drilldown.activeDataLabelStyle,b=this.chart.renderer,c=this.chart.styledMode;this.points.forEach(function(d){var f=d.options.dataLabels,e=t(d.dlOptions,f&&f.style,{});d.drilldown&&d.dataLabel&&("contrast"!==
a.color||c||(e.color=b.getContrast(d.color||this.color)),f&&f.color&&(e.color=f.color),d.dataLabel.addClass("highcharts-drilldown-data-label"),c||d.dataLabel.css(a).css(e))},this)});var v=function(a,b,c,d){a[c?"addClass":"removeClass"]("highcharts-drilldown-point");d||a.css({cursor:b})};e.addEvent(e.Series,"afterDrawTracker",function(){var a=this.chart.styledMode;this.points.forEach(function(b){b.drilldown&&b.graphic&&v(b.graphic,"pointer",!0,a)})});e.addEvent(e.Point,"afterSetState",function(){var a=
this.series.chart.styledMode;this.drilldown&&this.series.halo&&"hover"===this.state?v(this.series.halo,"pointer",!0,a):this.series.halo&&v(this.series.halo,"auto",!1,a)})})(l)});
//# sourceMappingURL=drilldown.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,27 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Exporting module
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(h){"object"===typeof module&&module.exports?(h["default"]=h,module.exports=h):"function"===typeof define&&define.amd?define(function(){return h}):h("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(h){(function(a){a.ajax=function(k){var b=a.merge(!0,{url:!1,type:"GET",dataType:"json",success:!1,error:!1,data:!1,headers:{}},k);k={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"};var f=new XMLHttpRequest;if(!b.url)return!1;f.open(b.type.toUpperCase(),
b.url,!0);f.setRequestHeader("Content-Type",k[b.dataType]||k.text);a.objectEach(b.headers,function(a,k){f.setRequestHeader(k,a)});f.onreadystatechange=function(){var a;if(4===f.readyState){if(200===f.status){a=f.responseText;if("json"===b.dataType)try{a=JSON.parse(a)}catch(n){b.error&&b.error(f,n);return}return b.success&&b.success(a)}b.error&&b.error(f,f.responseText)}};try{b.data=JSON.stringify(b.data)}catch(C){}f.send(b.data||!0)}})(h);(function(a){var k=a.win,b=k.navigator,f=k.document,h=k.URL||
k.webkitURL||k,n=/Edge\/\d+/.test(b.userAgent);a.dataURLtoBlob=function(a){if((a=a.match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3<a.length&&k.atob&&k.ArrayBuffer&&k.Uint8Array&&k.Blob&&h.createObjectURL){for(var f=k.atob(a[3]),b=new k.ArrayBuffer(f.length),b=new k.Uint8Array(b),l=0;l<b.length;++l)b[l]=f.charCodeAt(l);a=new k.Blob([b],{type:a[1]});return h.createObjectURL(a)}};a.downloadURL=function(c,h){var d=f.createElement("a"),l;if("string"===typeof c||c instanceof String||!b.msSaveOrOpenBlob){if(n||
2E6<c.length)if(c=a.dataURLtoBlob(c),!c)throw Error("Failed to convert to blob");if(void 0!==d.download)d.href=c,d.download=h,f.body.appendChild(d),d.click(),f.body.removeChild(d);else try{if(l=k.open(c,"chart"),void 0===l||null===l)throw Error("Failed to open window");}catch(y){k.location.href=c}}else b.msSaveOrOpenBlob(c,h)}})(h);(function(a){function k(a,b){if(h.Blob&&h.navigator.msSaveOrOpenBlob)return new h.Blob(["\ufeff"+a],{type:b})}var b=a.defined,f=a.pick,h=a.win,n=h.document,c=a.seriesTypes,
z=a.downloadURL;a.setOptions({exporting:{csv:{columnHeaderFormatter:null,dateFormat:"%Y-%m-%d %H:%M:%S",decimalPoint:null,itemDelimiter:null,lineDelimiter:"\n"},showTable:!1,useMultiLevelHeaders:!0,useRowspanHeaders:!0},lang:{downloadCSV:"Download CSV",downloadXLS:"Download XLS",openInCloud:"Open in Highcharts Cloud",viewData:"View data table"}});a.addEvent(a.Chart,"render",function(){this.options&&this.options.exporting&&this.options.exporting.showTable&&this.viewData()});a.Chart.prototype.setUpKeyToAxis=
function(){c.arearange&&(c.arearange.prototype.keyToAxis={low:"y",high:"y"});c.gantt&&(c.gantt.prototype.keyToAxis={start:"x",end:"x"})};a.Chart.prototype.getDataRows=function(l){var k=this.time,h=this.options.exporting&&this.options.exporting.csv||{},g,c=this.xAxis,q={},d=[],m,n=[],p=[],u,t,r,B=function(e,b,g){if(h.columnHeaderFormatter){var r=h.columnHeaderFormatter(e,b,g);if(!1!==r)return r}return e?e instanceof a.Axis?e.options.title&&e.options.title.text||(e.isDatetimeAxis?"DateTime":"Category"):
l?{columnTitle:1<g?b:e.name,topLevelColumnTitle:e.name}:e.name+(1<g?" ("+b+")":""):"Category"},w=[];t=0;this.setUpKeyToAxis();this.series.forEach(function(e){var b=e.options.keys||e.pointArrayMap||["y"],g=b.length,r=!e.requireSorting&&{},v={},y={},m=c.indexOf(e.xAxis),A,d;b.forEach(function(a){var b=(e.keyToAxis&&e.keyToAxis[a]||a)+"Axis";v[a]=e[b]&&e[b].categories||[];y[a]=e[b]&&e[b].isDatetimeAxis});if(!1!==e.options.includeInCSVExport&&!e.options.isInternal&&!1!==e.visible){a.find(w,function(e){return e[0]===
m})||w.push([m,t]);for(d=0;d<g;)u=B(e,b[d],b.length),p.push(u.columnTitle||u),l&&n.push(u.topLevelColumnTitle||u),d++;A={chart:e.chart,autoIncrement:e.autoIncrement,options:e.options,pointArrayMap:e.pointArrayMap};e.options.data.forEach(function(a,l){var c,p;p={series:A};e.pointClass.prototype.applyOptions.apply(p,[a]);a=p.x;c=e.data[l]&&e.data[l].name;r&&(r[a]&&(a+="|"+l),r[a]=!0);d=0;e.xAxis&&"name"!==e.exportKey||(a=c);q[a]||(q[a]=[],q[a].xValues=[]);q[a].x=p.x;q[a].name=c;for(q[a].xValues[m]=
p.x;d<g;)l=b[d],c=p[l],q[a][t+d]=f(v[l][c],y[l]?k.dateFormat(h.dateFormat,c):null,c),d++});t+=d}});for(m in q)q.hasOwnProperty(m)&&d.push(q[m]);var v,x;m=l?[n,p]:[p];for(t=w.length;t--;)v=w[t][0],x=w[t][1],g=c[v],d.sort(function(a,b){return a.xValues[v]-b.xValues[v]}),r=B(g),m[0].splice(x,0,r),l&&m[1]&&m[1].splice(x,0,r),d.forEach(function(a){var e=a.name;g&&!b(e)&&(g.isDatetimeAxis?(a.x instanceof Date&&(a.x=a.x.getTime()),e=k.dateFormat(h.dateFormat,a.x)):e=g.categories?f(g.names[a.x],g.categories[a.x],
a.x):a.x);a.splice(x,0,e)});m=m.concat(d);a.fireEvent(this,"exportData",{dataRows:m});return m};a.Chart.prototype.getCSV=function(a){var b="",l=this.getDataRows(),g=this.options.exporting.csv,c=f(g.decimalPoint,","!==g.itemDelimiter&&a?(1.1).toLocaleString()[1]:"."),k=f(g.itemDelimiter,","===c?";":","),h=g.lineDelimiter;l.forEach(function(a,g){for(var f,d=a.length;d--;)f=a[d],"string"===typeof f&&(f='"'+f+'"'),"number"===typeof f&&"."!==c&&(f=f.toString().replace(".",c)),a[d]=f;b+=a.join(k);g<l.length-
1&&(b+=h)});return b};a.Chart.prototype.getTable=function(b){var c='\x3ctable id\x3d"highcharts-data-table-'+this.index+'"\x3e',l=this.options,g=b?(1.1).toLocaleString()[1]:".",k=f(l.exporting.useMultiLevelHeaders,!0);b=this.getDataRows(k);var d=0,h=k?b.shift():null,m=b.shift(),n=function(a,b,c,l){var d=f(l,"");b="text"+(b?" "+b:"");"number"===typeof d?(d=d.toString(),","===g&&(d=d.replace(".",g)),b="number"):l||(b="empty");return"\x3c"+a+(c?" "+c:"")+' class\x3d"'+b+'"\x3e'+d+"\x3c/"+a+"\x3e"};!1!==
l.exporting.tableCaption&&(c+='\x3ccaption class\x3d"highcharts-table-caption"\x3e'+f(l.exporting.tableCaption,l.title.text?l.title.text.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26#x27;").replace(/\//g,"\x26#x2F;"):"Chart")+"\x3c/caption\x3e");for(var p=0,u=b.length;p<u;++p)b[p].length>d&&(d=b[p].length);c+=function(a,b,c){var d="\x3cthead\x3e",g=0;c=c||b&&b.length;var f,e,h=0;if(e=k&&a&&b){a:if(e=a.length,b.length===e){for(;e--;)if(a[e]!==
b[e]){e=!1;break a}e=!0}else e=!1;e=!e}if(e){for(d+="\x3ctr\x3e";g<c;++g)e=a[g],f=a[g+1],e===f?++h:h?(d+=n("th","highcharts-table-topheading",'scope\x3d"col" colspan\x3d"'+(h+1)+'"',e),h=0):(e===b[g]?l.exporting.useRowspanHeaders?(f=2,delete b[g]):(f=1,b[g]=""):f=1,d+=n("th","highcharts-table-topheading",'scope\x3d"col"'+(1<f?' valign\x3d"top" rowspan\x3d"'+f+'"':""),e));d+="\x3c/tr\x3e"}if(b){d+="\x3ctr\x3e";g=0;for(c=b.length;g<c;++g)void 0!==b[g]&&(d+=n("th",null,'scope\x3d"col"',b[g]));d+="\x3c/tr\x3e"}return d+
"\x3c/thead\x3e"}(h,m,Math.max(d,m.length));c+="\x3ctbody\x3e";b.forEach(function(a){c+="\x3ctr\x3e";for(var b=0;b<d;b++)c+=n(b?"td":"th",null,b?"":'scope\x3d"row"',a[b]);c+="\x3c/tr\x3e"});c+="\x3c/tbody\x3e\x3c/table\x3e";b={html:c};a.fireEvent(this,"afterGetTable",b);return b.html};a.Chart.prototype.downloadCSV=function(){var a=this.getCSV(!0);z(k(a,"text/csv")||"data:text/csv,\ufeff"+encodeURIComponent(a),this.getFilename()+".csv")};a.Chart.prototype.downloadXLS=function(){var a='\x3chtml xmlns:o\x3d"urn:schemas-microsoft-com:office:office" xmlns:x\x3d"urn:schemas-microsoft-com:office:excel" xmlns\x3d"http://www.w3.org/TR/REC-html40"\x3e\x3chead\x3e\x3c!--[if gte mso 9]\x3e\x3cxml\x3e\x3cx:ExcelWorkbook\x3e\x3cx:ExcelWorksheets\x3e\x3cx:ExcelWorksheet\x3e\x3cx:Name\x3eArk1\x3c/x:Name\x3e\x3cx:WorksheetOptions\x3e\x3cx:DisplayGridlines/\x3e\x3c/x:WorksheetOptions\x3e\x3c/x:ExcelWorksheet\x3e\x3c/x:ExcelWorksheets\x3e\x3c/x:ExcelWorkbook\x3e\x3c/xml\x3e\x3c![endif]--\x3e\x3cstyle\x3etd{border:none;font-family: Calibri, sans-serif;} .number{mso-number-format:"0.00";} .text{ mso-number-format:"@";}\x3c/style\x3e\x3cmeta name\x3dProgId content\x3dExcel.Sheet\x3e\x3cmeta charset\x3dUTF-8\x3e\x3c/head\x3e\x3cbody\x3e'+
this.getTable(!0)+"\x3c/body\x3e\x3c/html\x3e";z(k(a,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+h.btoa(unescape(encodeURIComponent(a))),this.getFilename()+".xls")};a.Chart.prototype.viewData=function(){this.dataTableDiv||(this.dataTableDiv=n.createElement("div"),this.dataTableDiv.className="highcharts-data-table",this.renderTo.parentNode.insertBefore(this.dataTableDiv,this.renderTo.nextSibling));this.dataTableDiv.innerHTML=this.getTable()};a.Chart.prototype.openInCloud=function(){function b(c){Object.keys(c).forEach(function(d){"function"===
typeof c[d]&&delete c[d];a.isObject(c[d])&&b(c[d])})}var c,d;c=a.merge(this.userOptions);b(c);c={name:c.title&&c.title.text||"Chart title",options:c,settings:{constructor:"Chart",dataProvider:{csv:this.getCSV()}}};d=JSON.stringify(c);(function(){var a=n.createElement("form");n.body.appendChild(a);a.method="post";a.action="https://cloud-api.highcharts.com/openincloud";a.target="_blank";var b=n.createElement("input");b.type="hidden";b.name="chart";b.value=d;a.appendChild(b);a.submit();n.body.removeChild(a)})()};
var d=a.getOptions().exporting;d&&(a.extend(d.menuItemDefinitions,{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.viewData()}},openInCloud:{textKey:"openInCloud",onclick:function(){this.openInCloud()}}}),d.buttons.contextButton.menuItems.push("separator","downloadCSV","downloadXLS","viewData","openInCloud"));c.map&&(c.map.prototype.exportKey="name");
c.mapbubble&&(c.mapbubble.prototype.exportKey="name");c.treemap&&(c.treemap.prototype.exportKey="name")})(h)});
//# sourceMappingURL=export-data.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,35 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Exporting module
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(h){"object"===typeof module&&module.exports?(h["default"]=h,module.exports=h):"function"===typeof define&&define.amd?define(function(){return h}):h("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(h){var D=function(){return{initUpdate:function(f){f.navigation||(f.navigation={updates:[],update:function(f,p){this.updates.forEach(function(q){q.update.call(q.context,f,p)})}})},addUpdate:function(f,h){h.navigation||this.initUpdate(h);h.navigation.updates.push({update:f,context:h})}}}();
(function(f,h){var p=f.defaultOptions,q=f.doc,B=f.Chart,r=f.addEvent,D=f.removeEvent,E=f.fireEvent,w=f.createElement,F=f.discardElement,y=f.css,n=f.merge,u=f.pick,G=f.objectEach,z=f.extend,K=f.isTouchDevice,A=f.win,I=A.navigator.userAgent,H=f.SVGRenderer,J=f.Renderer.prototype.symbols,L=/Edge\/|Trident\/|MSIE /.test(I),M=/firefox/i.test(I);z(p.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",
contextButtonTitle:"Chart context menu"});p.navigation||(p.navigation={});n(!0,p.navigation,{buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}});n(!0,p.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",color:"#333333",background:"none",fontSize:K?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",
color:"#ffffff"},buttonOptions:{symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{padding:5}}});p.exporting={type:"image/png",url:"https://export.highcharts.com/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:"printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")}},menuItemDefinitions:{printChart:{textKey:"printChart",
onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}};f.post=function(b,a,d){var c=w("form",n({method:"post",action:b,enctype:"multipart/form-data"},
d),{display:"none"},q.body);G(a,function(a,b){w("input",{type:"hidden",name:b,value:a},null,c)});c.submit();F(c)};z(B.prototype,{sanitizeSVG:function(b,a){if(a&&a.exporting&&a.exporting.allowHTML){var d=b.match(/<\/svg>(.*?$)/);d&&d[1]&&(d='\x3cforeignObject x\x3d"0" y\x3d"0" width\x3d"'+a.chart.width+'" height\x3d"'+a.chart.height+'"\x3e\x3cbody xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e'+d[1]+"\x3c/body\x3e\x3c/foreignObject\x3e",b=b.replace("\x3c/svg\x3e",d+"\x3c/svg\x3e"))}b=b.replace(/zIndex="[^"]+"/g,
"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|&quot;)(\S+)("|&quot;)\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'\x3csvg xmlns:xlink\x3d"http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+\:)href=/g," xlink:href\x3d").replace(/\n/," ").replace(/<\/svg>.*?$/,"\x3c/svg\x3e").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1\x3d"rgb($2)" $1-opacity\x3d"$3"').replace(/&nbsp;/g,"\u00a0").replace(/&shy;/g,"\u00ad");
this.ieSanitizeSVG&&(b=this.ieSanitizeSVG(b));return b},getChartHTML:function(){this.styledMode&&this.inlineStyles();return this.container.innerHTML},getSVG:function(b){var a,d,c,v,m,k=n(this.options,b);d=w("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},q.body);c=this.renderTo.style.width;m=this.renderTo.style.height;c=k.exporting.sourceWidth||k.chart.width||/px$/.test(c)&&parseInt(c,10)||(k.isGantt?800:600);m=k.exporting.sourceHeight||k.chart.height||
/px$/.test(m)&&parseInt(m,10)||400;z(k.chart,{animation:!1,renderTo:d,forExport:!0,renderer:"SVGRenderer",width:c,height:m});k.exporting.enabled=!1;delete k.data;k.series=[];this.series.forEach(function(a){v=n(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});v.isInternal||k.series.push(v)});this.axes.forEach(function(a){a.userOptions.internalKey||(a.userOptions.internalKey=f.uniqueKey())});a=new f.Chart(k,this.callback);b&&["xAxis","yAxis","series"].forEach(function(c){var d=
{};b[c]&&(d[c]=b[c],a.update(d))});this.axes.forEach(function(b){var c=f.find(a.axes,function(a){return a.options.internalKey===b.userOptions.internalKey}),d=b.getExtremes(),e=d.userMin,d=d.userMax;c&&(void 0!==e&&e!==c.min||void 0!==d&&d!==c.max)&&c.setExtremes(e,d,!0,!1)});c=a.getChartHTML();E(this,"getSVG",{chartCopy:a});c=this.sanitizeSVG(c,k);k=null;a.destroy();F(d);return c},getSVGForExport:function(b,a){var d=this.options.exporting;return this.getSVG(n({chart:{borderRadius:0}},d.chartOptions,
a,{exporting:{sourceWidth:b&&b.sourceWidth||d.sourceWidth,sourceHeight:b&&b.sourceHeight||d.sourceHeight}}))},getFilename:function(){var b=this.userOptions.title&&this.userOptions.title.text,a=this.options.exporting.filename;if(a)return a;"string"===typeof b&&(a=b.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,""));if(!a||5>a.length)a="chart";return a},exportChart:function(b,a){a=
this.getSVGForExport(b,a);b=n(this.options.exporting,b);f.post(b.url,{filename:b.filename||this.getFilename(),type:b.type,width:b.width||0,scale:b.scale,svg:a},b.formAttributes)},print:function(){function b(b){(a.fixedDiv?[a.fixedDiv,a.scrollingContainer]:[a.container]).forEach(function(a){b.appendChild(a)})}var a=this,d=[],c=q.body,f=c.childNodes,m=a.options.exporting.printMaxWidth,k,e;if(!a.isPrinting){a.isPrinting=!0;a.pointer.reset(null,0);E(a,"beforePrint");if(e=m&&a.chartWidth>m)k=[a.options.chart.width,
void 0,!1],a.setSize(m,void 0,!1);f.forEach(function(a,b){1===a.nodeType&&(d[b]=a.style.display,a.style.display="none")});b(c);setTimeout(function(){A.focus();A.print();setTimeout(function(){b(a.renderTo);f.forEach(function(a,b){1===a.nodeType&&(a.style.display=d[b])});a.isPrinting=!1;e&&a.setSize.apply(a,k);E(a,"afterPrint")},1E3)},1)}},contextMenu:function(b,a,d,c,v,m,k){var e=this,x=e.options.navigation,l=e.chartWidth,t=e.chartHeight,h="cache-"+b,g=e[h],C=Math.max(v,m),n;g||(e.exportContextMenu=
e[h]=g=w("div",{className:b},{position:"absolute",zIndex:1E3,padding:C+"px",pointerEvents:"auto"},e.fixedDiv||e.container),n=w("div",{className:"highcharts-menu"},null,g),e.styledMode||y(n,z({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},x.menuStyle)),g.hideMenu=function(){y(g,{display:"none"});k&&k.setState(0);e.openMenu=!1;f.clearTimeout(g.hideTimer)},e.exportEvents.push(r(g,"mouseleave",function(){g.hideTimer=setTimeout(g.hideMenu,500)}),r(g,
"mouseenter",function(){f.clearTimeout(g.hideTimer)}),r(q,"mouseup",function(a){e.pointer.inClass(a.target,b)||g.hideMenu()}),r(g,"click",function(){e.openMenu&&g.hideMenu()})),a.forEach(function(a){"string"===typeof a&&(a=e.options.exporting.menuItemDefinitions[a]);if(f.isObject(a,!0)){var b;a.separator?b=w("hr",null,null,n):(b=w("div",{className:"highcharts-menu-item",onclick:function(b){b&&b.stopPropagation();g.hideMenu();a.onclick&&a.onclick.apply(e,arguments)},innerHTML:a.text||e.options.lang[a.textKey]},
null,n),e.styledMode||(b.onmouseover=function(){y(this,x.menuItemHoverStyle)},b.onmouseout=function(){y(this,x.menuItemStyle)},y(b,z({cursor:"pointer"},x.menuItemStyle))));e.exportDivElements.push(b)}}),e.exportDivElements.push(n,g),e.exportMenuWidth=g.offsetWidth,e.exportMenuHeight=g.offsetHeight);a={display:"block"};d+e.exportMenuWidth>l?a.right=l-d-v-C+"px":a.left=d-C+"px";c+m+e.exportMenuHeight>t&&"top"!==k.alignOptions.verticalAlign?a.bottom=t-c-C+"px":a.top=c+m-C+"px";y(g,a);e.openMenu=!0},
addButton:function(b){var a=this,d=a.renderer,c=n(a.options.navigation.buttonOptions,b),f=c.onclick,m=c.menuItems,k,e,h=c.symbolSize||12;a.btnCount||(a.btnCount=0);a.exportDivElements||(a.exportDivElements=[],a.exportSVGElements=[]);if(!1!==c.enabled){var l=c.theme,t=l.states,q=t&&t.hover,t=t&&t.select,g;a.styledMode||(l.fill=u(l.fill,"#ffffff"),l.stroke=u(l.stroke,"none"));delete l.states;f?g=function(b){b&&b.stopPropagation();f.call(a,b)}:m&&(g=function(b){b&&b.stopPropagation();a.contextMenu(e.menuClassName,
m,e.translateX,e.translateY,e.width,e.height,e);e.setState(2)});c.text&&c.symbol?l.paddingLeft=u(l.paddingLeft,25):c.text||z(l,{width:c.width,height:c.height,padding:0});a.styledMode||(l["stroke-linecap"]="round",l.fill=u(l.fill,"#ffffff"),l.stroke=u(l.stroke,"none"));e=d.button(c.text,0,0,g,l,q,t).addClass(b.className).attr({title:u(a.options.lang[c._titleKey||c.titleKey],"")});e.menuClassName=b.menuClassName||"highcharts-menu-"+a.btnCount++;c.symbol&&(k=d.symbol(c.symbol,c.symbolX-h/2,c.symbolY-
h/2,h,h,{width:h,height:h}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(e),a.styledMode||k.attr({stroke:c.symbolStroke,fill:c.symbolFill,"stroke-width":c.symbolStrokeWidth||1}));e.add(a.exportingGroup).align(z(c,{width:e.width,x:u(c.x,a.buttonOffset)}),!0,"spacingBox");a.buttonOffset+=(e.width+c.buttonSpacing)*("right"===c.align?-1:1);a.exportSVGElements.push(e,k)}},destroyExport:function(b){var a=b?b.target:this;b=a.exportSVGElements;var d=a.exportDivElements,c=a.exportEvents,h;b&&
(b.forEach(function(b,c){b&&(b.onclick=b.ontouchstart=null,h="cache-"+b.menuClassName,a[h]&&delete a[h],a.exportSVGElements[c]=b.destroy())}),b.length=0);a.exportingGroup&&(a.exportingGroup.destroy(),delete a.exportingGroup);d&&(d.forEach(function(b,c){f.clearTimeout(b.hideTimer);D(b,"mouseleave");a.exportDivElements[c]=b.onmouseout=b.onmouseover=b.ontouchstart=b.onclick=null;F(b)}),d.length=0);c&&(c.forEach(function(a){a()}),c.length=0)}});H.prototype.inlineToAttributes="fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");
H.prototype.inlineBlacklist=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/];H.prototype.unstyledElements=["clipPath","defs","desc"];B.prototype.inlineStyles=function(){function b(a){return a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()})}function a(d){function m(a,g){p=v=!1;if(h){for(r=h.length;r--&&!v;)v=h[r].test(g);p=!v}"transform"===g&&"none"===a&&(p=!0);for(r=f.length;r--&&!p;)p=f[r].test(g)||
"function"===typeof a;p||q[g]===a&&"svg"!==d.nodeName||e[d.nodeName][g]===a||(-1!==c.indexOf(g)?d.setAttribute(b(g),a):u+=b(g)+":"+a+";")}var g,q,u="",t,p,v,r;if(1===d.nodeType&&-1===k.indexOf(d.nodeName)){g=A.getComputedStyle(d,null);q="svg"===d.nodeName?{}:A.getComputedStyle(d.parentNode,null);e[d.nodeName]||(x=l.getElementsByTagName("svg")[0],t=l.createElementNS(d.namespaceURI,d.nodeName),x.appendChild(t),e[d.nodeName]=n(A.getComputedStyle(t,null)),"text"===d.nodeName&&delete e.text.fill,x.removeChild(t));
if(M||L)for(var w in g)m(g[w],w);else G(g,m);u&&(g=d.getAttribute("style"),d.setAttribute("style",(g?g+";":"")+u));"svg"===d.nodeName&&d.setAttribute("stroke-width","1px");"text"!==d.nodeName&&[].forEach.call(d.children||d.childNodes,a)}}var d=this.renderer,c=d.inlineToAttributes,f=d.inlineBlacklist,h=d.inlineWhitelist,k=d.unstyledElements,e={},x,l,d=q.createElement("iframe");y(d,{width:"1px",height:"1px",visibility:"hidden"});q.body.appendChild(d);l=d.contentWindow.document;l.open();l.write('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg"\x3e\x3c/svg\x3e');
l.close();a(this.container.querySelector("svg"));x.parentNode.removeChild(x)};J.menu=function(b,a,d,c){return["M",b,a+2.5,"L",b+d,a+2.5,"M",b,a+c/2+.5,"L",b+d,a+c/2+.5,"M",b,a+c-1.5,"L",b+d,a+c-1.5]};J.menuball=function(b,a,d,c){b=[];c=c/3-2;return b=b.concat(this.circle(d-c,a,c,c),this.circle(d-c,a+c+4,c,c),this.circle(d-c,a+2*(c+4),c,c))};B.prototype.renderExporting=function(){var b=this,a=b.options.exporting,d=a.buttons,c=b.isDirtyExporting||!b.exportSVGElements;b.buttonOffset=0;b.isDirtyExporting&&
b.destroyExport();c&&!1!==a.enabled&&(b.exportEvents=[],b.exportingGroup=b.exportingGroup||b.renderer.g("exporting-group").attr({zIndex:3}).add(),G(d,function(a){b.addButton(a)}),b.isDirtyExporting=!1);r(b,"destroy",b.destroyExport)};r(B,"init",function(){var b=this;b.exporting={update:function(a,d){b.isDirtyExporting=!0;n(!0,b.options.exporting,a);u(d,!0)&&b.redraw()}};h.addUpdate(function(a,d){b.isDirtyExporting=!0;n(!0,b.options.navigation,a);u(d,!0)&&b.redraw()},b)});B.prototype.callbacks.push(function(b){b.renderExporting();
r(b,"redraw",b.renderExporting)})})(h,D)});
//# sourceMappingURL=exporting.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,11 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Advanced Highstock tools
(c) 2010-2019 Highsoft AS
Author: Torstein Honsi
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define(function(){return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){(function(a){a.FullScreen=function(a){this.init(a.parentNode)};a.FullScreen.prototype={init:function(a){a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen?a.webkitRequestFullscreen():a.msRequestFullscreen&&a.msRequestFullscreen()}}})(a)});
//# sourceMappingURL=full-screen.js.map
@@ -0,0 +1 @@
{"version":3,"file":"full-screen.js.map","lineCount":10,"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,QAAS,EAAG,CACf,MAAOH,EADQ,CAAnB,CADG,CAKHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CATY,CAAnB,CAAA,CAWC,QAAS,CAACD,CAAD,CAAa,CACnB,SAAS,CAACE,CAAD,CAAI,CAUVA,CAAAC,WAAA,CAAeC,QAAS,CAACC,CAAD,CAAY,CAChC,IAAAC,KAAA,CAAUD,CAAAE,WAAV,CADgC,CAUpCL,EAAAC,WAAAK,UAAA,CAAyB,CAOrBF,KAAMA,QAAS,CAACD,CAAD,CAAY,CACnBA,CAAAI,kBAAJ,CACIJ,CAAAI,kBAAA,EADJ,CAEWJ,CAAAK,qBAAJ,CACHL,CAAAK,qBAAA,EADG,CAEIL,CAAAM,wBAAJ,CACHN,CAAAM,wBAAA,EADG,CAEIN,CAAAO,oBAFJ,EAGHP,CAAAO,oBAAA,EARmB,CAPN,CApBf,CAAb,CAAA,CAwCCZ,CAxCD,CADmB,CAXvB;","sources":["full-screen.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","H","FullScreen","H.FullScreen","container","init","parentNode","prototype","requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","msRequestFullscreen"]}
@@ -0,0 +1,68 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* Advanced Highstock tools
*
* (c) 2010-2019 Highsoft AS
* Author: Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/**
* (c) 2009-2019 Sebastian Bochann
*
* Full screen for Highcharts
*
* License: www.highcharts.com/license
*/
H.FullScreen = function (container) {
this.init(container.parentNode); // main div of the chart
};
/**
* The module allows user to enable full screen mode in StockTools.
* Based on default solutions in browsers.
*
*/
H.FullScreen.prototype = {
/**
* Init function
*
* @param {HTMLDOMElement} - chart div
*
*/
init: function (container) {
if (container.requestFullscreen) {
container.requestFullscreen();
} else if (container.mozRequestFullScreen) {
container.mozRequestFullScreen();
} else if (container.webkitRequestFullscreen) {
container.webkitRequestFullscreen();
} else if (container.msRequestFullscreen) {
container.msRequestFullscreen();
}
}
};
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,14 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Highcharts funnel module
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define(function(){return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){(function(a){var p=a.seriesType,D=a.seriesTypes,H=a.noop,E=a.pick;p("funnel","pie",{animation:!1,center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,size:!0,dataLabels:{connectorWidth:1},states:{select:{color:"#cccccc",borderColor:"#000000"}}},
{animate:H,translate:function(){var d=function(b,a){return/%$/.test(b)?a*parseInt(b,10)/100:parseInt(b,10)},a=0,f=this.chart,e=this.options,c=e.reversed,v=e.ignoreHiddenPoint,t=f.plotWidth,f=f.plotHeight,q=0,p=e.center,g=d(p[0],t),r=d(p[1],f),D=d(e.width,t),k,w,l=d(e.height,f),x=d(e.neckWidth,t),F=d(e.neckHeight,f),y=r-l/2+l-F,d=this.data,A,B,E="left"===e.dataLabels.position?1:0,C,m,G,u,h,z,n;this.getWidthAt=w=function(b){var a=r-l/2;return b>y||l===F?x:x+(D-x)*(1-(b-a)/(l-F))};this.getX=function(b,
a,d){return g+(a?-1:1)*(w(c?2*r-b:b)/2+d.labelDistance)};this.center=[g,r,l];this.centerX=g;d.forEach(function(b){v&&!1===b.visible||(a+=b.y)});d.forEach(function(b){n=null;B=a?b.y/a:0;m=r-l/2+q*l;h=m+B*l;k=w(m);C=g-k/2;G=C+k;k=w(h);u=g-k/2;z=u+k;m>y?(C=u=g-x/2,G=z=g+x/2):h>y&&(n=h,k=w(y),u=g-k/2,z=u+k,h=y);c&&(m=2*r-m,h=2*r-h,null!==n&&(n=2*r-n));A=["M",C,m,"L",G,m,z,h];null!==n&&A.push(z,n,u,n);A.push(u,h,"Z");b.shapeType="path";b.shapeArgs={d:A};b.percentage=100*B;b.plotX=g;b.plotY=(m+(n||h))/
2;b.tooltipPos=[g,b.plotY];b.slice=H;b.half=E;v&&!1===b.visible||(q+=B)})},sortByAngle:function(a){a.sort(function(a,d){return a.plotY-d.plotY})},drawDataLabels:function(){var a=this.data,p=this.options.dataLabels.distance,f,e,c,v=a.length,t,q;for(this.center[2]-=2*p;v--;)c=a[v],e=(f=c.half)?1:-1,q=c.plotY,c.labelDistance=E(c.options.dataLabels&&c.options.dataLabels.distance,p),this.maxLabelDistance=Math.max(c.labelDistance,this.maxLabelDistance||0),t=this.getX(q,f,c),c.labelPosition={natural:{x:0,
y:q},"final":{},alignment:f?"right":"left",connectorPosition:{breakAt:{x:t+(c.labelDistance-5)*e,y:q},touchingSliceAt:{x:t+c.labelDistance*e,y:q}}};D.pie.prototype.drawDataLabels.call(this)}});p("pyramid","funnel",{neckWidth:"0%",neckHeight:"0%",reversed:!0})})(a)});
//# sourceMappingURL=funnel.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,576 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* Highcharts funnel module
*
* (c) 2010-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (Highcharts) {
/* *
* Highcharts funnel module
*
* (c) 2010-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
/* eslint indent: 0 */
// create shortcuts
var seriesType = Highcharts.seriesType,
seriesTypes = Highcharts.seriesTypes,
noop = Highcharts.noop,
pick = Highcharts.pick;
/**
* @private
* @class
* @name Highcharts.seriesTypes.funnel
*
* @augments Highcharts.Series
*/
seriesType('funnel', 'pie',
/**
* Funnel charts are a type of chart often used to visualize stages in a sales
* project, where the top are the initial stages with the most clients.
* It requires that the modules/funnel.js file is loaded.
*
* @sample highcharts/demo/funnel/
* Funnel demo
*
* @extends plotOptions.pie
* @excluding size
* @product highcharts
* @optionparent plotOptions.funnel
*/
{
/**
* Initial animation is by default disabled for the funnel chart.
*/
animation: false,
/**
* The center of the series. By default, it is centered in the middle
* of the plot area, so it fills the plot area height.
*
* @type {Array<number|string>}
* @default ["50%", "50%"]
* @since 3.0
*/
center: ['50%', '50%'],
/**
* The width of the funnel compared to the width of the plot area,
* or the pixel width if it is a number.
*
* @type {number|string}
* @since 3.0
*/
width: '90%',
/**
* The width of the neck, the lower part of the funnel. A number defines
* pixel width, a percentage string defines a percentage of the plot
* area width.
*
* @sample {highcharts} highcharts/demo/funnel/
* Funnel demo
*
* @type {number|string}
* @since 3.0
*/
neckWidth: '30%',
/**
* The height of the funnel or pyramid. If it is a number it defines
* the pixel height, if it is a percentage string it is the percentage
* of the plot area height.
*
* @sample {highcharts} highcharts/demo/funnel/
* Funnel demo
*
* @type {number|string}
* @since 3.0
*/
height: '100%',
/**
* The height of the neck, the lower part of the funnel. A number defines
* pixel width, a percentage string defines a percentage of the plot
* area height.
*
* @type {number|string}
*/
neckHeight: '25%',
/**
* A reversed funnel has the widest area down. A reversed funnel with
* no neck width and neck height is a pyramid.
*
* @since 3.0.10
*/
reversed: false,
/** @ignore */
size: true, // to avoid adapting to data label size in Pie.drawDataLabels
dataLabels: {
connectorWidth: 1
},
/**
* Options for the series states.
*/
states: {
/**
* @excluding halo, marker, lineWidth, lineWidthPlus
* @apioption plotOptions.funnel.states.hover
*/
/**
* Options for a selected funnel item.
*
* @excluding halo, marker, lineWidth, lineWidthPlus
*/
select: {
/**
* A specific color for the selected point.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
*/
color: '#cccccc',
/**
* A specific border color for the selected point.
*
* @type {Highcharts.ColorString}
*/
borderColor: '#000000'
}
}
},
// Properties
{
animate: noop,
// Overrides the pie translate method
translate: function () {
var
// Get positions - either an integer or a percentage string
// must be given
getLength = function (length, relativeTo) {
return (/%$/).test(length) ?
relativeTo * parseInt(length, 10) / 100 :
parseInt(length, 10);
},
sum = 0,
series = this,
chart = series.chart,
options = series.options,
reversed = options.reversed,
ignoreHiddenPoint = options.ignoreHiddenPoint,
plotWidth = chart.plotWidth,
plotHeight = chart.plotHeight,
cumulative = 0, // start at top
center = options.center,
centerX = getLength(center[0], plotWidth),
centerY = getLength(center[1], plotHeight),
width = getLength(options.width, plotWidth),
tempWidth,
getWidthAt,
height = getLength(options.height, plotHeight),
neckWidth = getLength(options.neckWidth, plotWidth),
neckHeight = getLength(options.neckHeight, plotHeight),
neckY = (centerY - height / 2) + height - neckHeight,
data = series.data,
path,
fraction,
half = options.dataLabels.position === 'left' ? 1 : 0,
x1,
y1,
x2,
x3,
y3,
x4,
y5;
// Return the width at a specific y coordinate
series.getWidthAt = getWidthAt = function (y) {
var top = (centerY - height / 2);
return (y > neckY || height === neckHeight) ?
neckWidth :
neckWidth + (width - neckWidth) *
(1 - (y - top) / (height - neckHeight));
};
series.getX = function (y, half, point) {
return centerX + (half ? -1 : 1) *
((getWidthAt(reversed ? 2 * centerY - y : y) / 2) +
point.labelDistance);
};
// Expose
series.center = [centerX, centerY, height];
series.centerX = centerX;
/*
Individual point coordinate naming:
x1,y1 _________________ x2,y1
\ /
\ /
\ /
\ /
\ /
x3,y3 _________ x4,y3
Additional for the base of the neck:
| |
| |
| |
x3,y5 _________ x4,y5
*/
// get the total sum
data.forEach(function (point) {
if (!ignoreHiddenPoint || point.visible !== false) {
sum += point.y;
}
});
data.forEach(function (point) {
// set start and end positions
y5 = null;
fraction = sum ? point.y / sum : 0;
y1 = centerY - height / 2 + cumulative * height;
y3 = y1 + fraction * height;
tempWidth = getWidthAt(y1);
x1 = centerX - tempWidth / 2;
x2 = x1 + tempWidth;
tempWidth = getWidthAt(y3);
x3 = centerX - tempWidth / 2;
x4 = x3 + tempWidth;
// the entire point is within the neck
if (y1 > neckY) {
x1 = x3 = centerX - neckWidth / 2;
x2 = x4 = centerX + neckWidth / 2;
// the base of the neck
} else if (y3 > neckY) {
y5 = y3;
tempWidth = getWidthAt(neckY);
x3 = centerX - tempWidth / 2;
x4 = x3 + tempWidth;
y3 = neckY;
}
if (reversed) {
y1 = 2 * centerY - y1;
y3 = 2 * centerY - y3;
if (y5 !== null) {
y5 = 2 * centerY - y5;
}
}
// save the path
path = [
'M',
x1, y1,
'L',
x2, y1,
x4, y3
];
if (y5 !== null) {
path.push(x4, y5, x3, y5);
}
path.push(x3, y3, 'Z');
// prepare for using shared dr
point.shapeType = 'path';
point.shapeArgs = { d: path };
// for tooltips and data labels
point.percentage = fraction * 100;
point.plotX = centerX;
point.plotY = (y1 + (y5 || y3)) / 2;
// Placement of tooltips and data labels
point.tooltipPos = [
centerX,
point.plotY
];
// Slice is a noop on funnel points
point.slice = noop;
// Mimicking pie data label placement logic
point.half = half;
if (!ignoreHiddenPoint || point.visible !== false) {
cumulative += fraction;
}
});
},
// Funnel items don't have angles (#2289)
sortByAngle: function (points) {
points.sort(function (a, b) {
return a.plotY - b.plotY;
});
},
// Extend the pie data label method
drawDataLabels: function () {
var series = this,
data = series.data,
labelDistance = series.options.dataLabels.distance,
leftSide,
sign,
point,
i = data.length,
x,
y;
// In the original pie label anticollision logic, the slots are
// distributed from one labelDistance above to one labelDistance below
// the pie. In funnels we don't want this.
series.center[2] -= 2 * labelDistance;
// Set the label position array for each point.
while (i--) {
point = data[i];
leftSide = point.half;
sign = leftSide ? 1 : -1;
y = point.plotY;
point.labelDistance = pick(
point.options.dataLabels && point.options.dataLabels.distance,
labelDistance
);
series.maxLabelDistance = Math.max(
point.labelDistance,
series.maxLabelDistance || 0
);
x = series.getX(y, leftSide, point);
// set the anchor point for data labels
point.labelPosition = {
// initial position of the data label - it's utilized for
// finding the final position for the label
natural: {
x: 0,
y: y
},
'final': {
// used for generating connector path -
// initialized later in drawDataLabels function
// x: undefined,
// y: undefined
},
// left - funnel on the left side of the data label
// right - funnel on the right side of the data label
alignment: leftSide ? 'right' : 'left',
connectorPosition: {
breakAt: { // used in connectorShapes.fixedOffset
x: x + (point.labelDistance - 5) * sign,
y: y
},
touchingSliceAt: {
x: x + point.labelDistance * sign,
y: y
}
}
};
}
seriesTypes.pie.prototype.drawDataLabels.call(this);
}
});
/**
* A `funnel` series. If the [type](#series.funnel.type) option is
* not specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.funnel
* @excluding dataParser, dataURL, stack, xAxis, yAxis
* @product highcharts
* @apioption series.funnel
*/
/**
* An array of data points for the series. For the `funnel` series type,
* points can be given in the following ways:
*
* 1. An array of numerical values. In this case, the numerical values
* will be interpreted as `y` options. Example:
*
* ```js
* data: [0, 5, 3, 5]
* ```
*
* 2. An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of data
* points exceeds the series' [turboThreshold](#series.funnel.turboThreshold),
* this option is not available.
*
* ```js
* data: [{
* y: 3,
* name: "Point2",
* color: "#00FF00"
* }, {
* y: 1,
* name: "Point1",
* color: "#FF00FF"
* }]
* ```
*
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-arrays/
* Arrays of numeric x and y
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
* Arrays of datetime x and y
* @sample {highcharts} highcharts/series/data-array-of-name-value/
* Arrays of point.name and y
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
*
* @type {Array<number|*>}
* @extends series.pie.data
* @excluding sliced
* @product highcharts
* @apioption series.funnel.data
*/
/**
* Pyramid series type.
*
* @private
* @class
* @name Highcharts.seriesTypes.pyramid
*
* @augments Highcharts.Series
*/
seriesType('pyramid', 'funnel',
/**
* A pyramid series is a special type of funnel, without neck and reversed by
* default. Requires the funnel module.
*
* @sample highcharts/demo/pyramid/
* Pyramid chart
*
* @extends plotOptions.funnel
* @product highcharts
* @optionparent plotOptions.pyramid
*/
{
/**
* The pyramid neck width is zero by default, as opposed to the funnel,
* which shares the same layout logic.
*
* @since 3.0.10
*/
neckWidth: '0%',
/**
* The pyramid neck width is zero by default, as opposed to the funnel,
* which shares the same layout logic.
*
* @since 3.0.10
*/
neckHeight: '0%',
/**
* The pyramid is reversed by default, as opposed to the funnel, which
* shares the layout engine, and is not reversed.
*
* @since 3.0.10
*/
reversed: true
});
/**
* A `pyramid` series. If the [type](#series.pyramid.type) option is
* not specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.pyramid
* @excluding dataParser, dataURL, stack, xAxis, yAxis
* @product highcharts
* @apioption series.pyramid
*/
/**
* An array of data points for the series. For the `pyramid` series
* type, points can be given in the following ways:
*
* 1. An array of numerical values. In this case, the numerical values will be
* interpreted as `y` options. Example:
* ```js
* data: [0, 5, 3, 5]
* ```
*
* 2. An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of
* data points exceeds the series'
* [turboThreshold](#series.pyramid.turboThreshold), this option is not
* available.
* ```js
* data: [{
* y: 9,
* name: "Point2",
* color: "#00FF00"
* }, {
* y: 6,
* name: "Point1",
* color: "#FF00FF"
* }]
* ```
*
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
*
* @type {Array<number|*>}
* @extends series.pie.data
* @excluding sliced
* @product highcharts
* @apioption series.pyramid.data
*/
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,93 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Gantt series
(c) 2016-2019 Lars A. V. Cabrera
License: www.highcharts.com/license
*/
(function(B){"object"===typeof module&&module.exports?(B["default"]=B,module.exports=B):"function"===typeof define&&define.amd?define(function(){return B}):B("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(B){(function(b){var k=b.addEvent,u=b.PlotLineOrBand,t=b.merge,r={currentDateIndicator:!0,color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:void 0,rotation:0,style:{fontSize:"10px"}}};k(b.Axis,"afterSetOptions",function(){var b=this.options,q=b.currentDateIndicator;
q&&("object"===typeof q?(q.label&&q.label.format&&(q.label.formatter=void 0),q=t(r,q)):q=t(r),q.value=new Date,b.plotLines||(b.plotLines=[]),b.plotLines.push(q))});k(u,"render",function(){var n=this.options,q,p;n.currentDateIndicator&&n.label&&(q=n.label.format,p=n.label.formatter,n.value=new Date,n.label.text="function"===typeof p?p(this):b.dateFormat(q,new Date),this.label&&this.label.attr({text:n.label.text}))})})(B);(function(b){var k=b.addEvent,u=b.dateFormat,t=b.defined,r=b.isArray,n=b.isNumber,
q=function(a){return b.isObject(a,!0)},p=b.merge,m=b.pick,a=b.wrap,f=b.Axis,e=b.Tick,h={top:0,right:1,bottom:2,left:3,0:"top",1:"right",2:"bottom",3:"left"};f.prototype.isNavigatorAxis=function(){return/highcharts-navigator-[xy]axis/.test(this.options.className)};f.prototype.isOuterAxis=function(){var a=this,g=-1,c=!0;a.chart.axes.forEach(function(d,l){d.side!==a.side||d.isNavigatorAxis()||(d===a?g=l:0<=g&&l>g&&(c=!1))});return c};f.prototype.getMaxLabelDimensions=function(a,g){var c={width:0,height:0};
g.forEach(function(d){d=a[d];var g;q(d)&&(g=q(d.label)?d.label:{},d=g.getBBox?g.getBBox().height:0,g=n(g.textPxLength)?g.textPxLength:0,c.height=Math.max(d,c.height),c.width=Math.max(g,c.width))});return c};b.dateFormats={W:function(a){a=new Date(a);var g;a.setHours(0,0,0,0);a.setDate(a.getDate()-(a.getDay()||7));g=new Date(a.getFullYear(),0,1);return Math.ceil(((a-g)/864E5+1)/7)},E:function(a){return u("%a",a,!0).charAt(0)}};k(e,"afterGetLabelPosition",function(a){var g=this.label,c=this.axis,d=
c.reversed,l=c.chart,v=c.options,f=v&&q(v.grid)?v.grid:{},v=c.options.labels,b=v.align,e=h[c.side],x=a.tickmarkOffset,m=c.tickPositions,p=this.pos-x,m=n(m[a.index+1])?m[a.index+1]-x:c.max+x,C=c.tickSize("tick",!0),x=r(C)?C[0]:0,C=C&&C[1]/2,D;!0===f.enabled&&("top"===e?(f=c.top+c.offset,D=f-x):"bottom"===e?(D=l.chartHeight-c.bottom+c.offset,f=D+x):(f=c.top+c.len-c.translate(d?m:p),D=c.top+c.len-c.translate(d?p:m)),"right"===e?(e=l.chartWidth-c.right+c.offset,d=e+x):"left"===e?(d=c.left+c.offset,e=
d-x):(e=Math.round(c.left+c.translate(d?m:p))-C,d=Math.round(c.left+c.translate(d?p:m))-C),this.slotWidth=d-e,a.pos.x="left"===b?e:"right"===b?d:e+(d-e)/2,a.pos.y=D+(f-D)/2,l=l.renderer.fontMetrics(v.style.fontSize,g.element),g=g.getBBox().height,v.useHTML?a.pos.y+=l.b+-(g/2):(g=Math.round(g/l.h),a.pos.y+=(l.b-(l.h-l.f))/2+-((g-1)*l.h/2)),a.pos.x+=c.horiz&&v.x||0)});k(f,"afterTickSize",function(a){var g=this.maxLabelDimensions,c=this.options;!0===(c&&q(c.grid)?c.grid:{}).enabled&&(c=2*Math.abs(this.defaultLeftAxisOptions.labels.x),
g=c+(this.horiz?g.height:g.width),r(a.tickSize)?a.tickSize[0]=g:a.tickSize=[g])});k(f,"afterGetTitlePosition",function(a){var g=this.options;if(!0===(g&&q(g.grid)?g.grid:{}).enabled){var c=this.axisTitle,d=c&&c.getBBox().width,l=this.horiz,v=this.left,f=this.top,e=this.width,b=this.height,x=g.title,g=this.opposite,p=this.offset,n=this.tickSize()||[0],C=x.x||0,D=x.y||0,z=m(x.margin,l?5:10),c=this.chart.renderer.fontMetrics(x.style&&x.style.fontSize,c).f,n=(l?f+b:v)+n[0]/2*(g?-1:1)*(l?1:-1)+(this.side===
h.bottom?c:0);a.titlePosition.x=l?v-d/2-z+C:n+(g?e:0)+p+C;a.titlePosition.y=l?n-(g?b:0)+(g?c:-c)/2+p+D:f-z+D}});a(f.prototype,"unsquish",function(a){var g=this.options;return!0===(g&&q(g.grid)?g.grid:{}).enabled&&this.categories?this.tickInterval:a.apply(this,Array.prototype.slice.call(arguments,1))});k(f,"afterSetOptions",function(a){var g=this.options;a=a.userOptions;var c,d=g&&q(g.grid)?g.grid:{};!0===d.enabled&&(c=p(!0,{className:"highcharts-grid-axis "+(a.className||""),dateTimeLabelFormats:{hour:{list:["%H:%M",
"%H"]},day:{list:["%A, %e. %B","%a, %e. %b","%E"]},week:{list:["Week %W","W%W"]},month:{list:["%B","%b","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"13px"}},margin:0,title:{text:null,reserveSpace:!1,rotation:0},units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},a),"xAxis"===this.coll&&(t(a.linkedTo)&&!t(a.tickPixelInterval)&&(c.tickPixelInterval=350),t(a.tickPixelInterval)||!t(a.linkedTo)||
t(a.tickPositioner)||t(a.tickInterval)||(c.tickPositioner=function(d,g){var a=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(a){var l,f,v,e,h=c.units;for(e=0;e<h.length;e++)if(h[e][0]===a.unitName){l=e;break}if(h[l][1])return h[l+1]&&(v=h[l+1][0],f=(h[l+1][1]||[1])[0]),a=b.timeUnits[v],this.tickInterval=a*f,this.getTimeTicks({unitRange:a,count:f,unitName:v},d,g,this.options.startOfWeek)}})),p(!0,this.options,c),this.horiz&&(g.minPadding=m(a.minPadding,
0),g.maxPadding=m(a.maxPadding,0)),n(g.grid.borderWidth)&&(g.tickWidth=g.lineWidth=d.borderWidth))});k(f,"afterSetAxisTranslation",function(){var a=this.options,g=a&&q(a.grid)?a.grid:{},c=this.tickPositions&&this.tickPositions.info,d=this.userOptions.labels||{};this.horiz&&(!0===g.enabled&&this.series.forEach(function(c){c.options.pointRange=0}),c&&(!1===a.dateTimeLabelFormats[c.unitName].range||1<c.count)&&!t(d.align)&&(a.labels.align="left",t(d.x)||(a.labels.x=3)))});k(f,"trimTicks",function(){var a=
this.options,g=a&&q(a.grid)?a.grid:{},c=this.categories,d=this.tickPositions,l=d[0],f=d[d.length-1],e=this.linkedParent&&this.linkedParent.min||this.min,h=this.linkedParent&&this.linkedParent.max||this.max,b=this.tickInterval;!0!==g.enabled||c||!this.horiz&&!this.isLinked||((l>e||l<e&&l+b>e)&&!a.startOnTick&&(d[0]=e),(f<h||f>h&&f-b<h)&&!a.endOnTick&&(d[d.length-1]=h))});k(f,"afterRender",function(){var a=this.options,g=a&&q(a.grid)?a.grid:{},c,d,l,f,e,b,m=this.chart.renderer,A=this.horiz;if(!0===
g.enabled&&(g=2*Math.abs(this.defaultLeftAxisOptions.labels.x),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),g=this.maxLabelDimensions.width+g,c=a.lineWidth,this.rightWall&&this.rightWall.destroy(),d=this.axisGroup.getBBox(),this.isOuterAxis()&&this.axisLine&&(A&&(g=d.height-1),c))){d=this.getLinePath(c);e=d.indexOf("M")+1;b=d.indexOf("L")+1;l=d.indexOf("M")+2;f=d.indexOf("L")+2;if(this.side===h.top||this.side===h.left)g=-g;A?(d[l]+=g,d[f]+=g):(d[e]+=g,d[b]+=g);
this.axisLineExtra?this.axisLineExtra.animate({d:d}):this.axisLineExtra=m.path(d).attr({stroke:a.lineColor,"stroke-width":c,zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup);this.axisLine[this.showAxis?"show":"hide"](!0)}});k(f,"init",function(e){function g(){var d=c.options,a=25/11,g=c.chart.renderer.fontMetrics(d.labels.style.fontSize);d.labels||(d.labels={});d.labels.align=m(d.labels.align,"center");c.categories||(d.showLastLabel=!1);c.horiz&&(d.tickLength=l.cellHeight||g.h*a);c.labelRotation=
0;d.labels.rotation=0}var c=this,d=c.chart,l=(e=e.userOptions)&&q(e.grid)?e.grid:{},h,w,y;if(l.enabled)if(t(l.borderColor)&&(e.tickColor=e.lineColor=l.borderColor),r(l.columns)){w=0;for(y=l.columns.length;y--;)h=p(e,l.columns[y],{type:"category"}),delete h.grid.columns,h=new f(c.chart,h),h.isColumn=!0,h.columnIndex=w,a(h,"labelFormatter",function(c){var d=this.axis,a=d.tickPositions,g=this.value,l=g===a[0],a=g===a[a.length-1],e=b.find(d.series[0].options.data,function(c){return c[d.isXAxis?"x":"y"]===
g});this.isFirst=l;this.isLast=a;this.point=e;return c.call(this)}),w++;k(this,"afterInit",function(){b.erase(d.axes,this);b.erase(d[c.coll],this)})}else k(this,"afterInit",g)})})(B);(function(b){var k=b.Chart,u=b.pick;b.addEvent(b.Axis,"afterSetOptions",function(){this.horiz||!b.isNumber(this.options.staticScale)||this.chart.options.chart.height||(this.staticScale=this.options.staticScale)});k.prototype.adjustHeight=function(){"adjustHeight"!==this.redrawTrigger&&((this.axes||[]).forEach(function(k){var r=
k.chart,n=!!r.initiatedScale&&r.options.animation,q=k.options.staticScale,p;k.staticScale&&b.defined(k.min)&&(p=u(k.unitLength,k.max+k.tickInterval-k.min)*q,p=Math.max(p,q),q=p-r.plotHeight,1<=Math.abs(q)&&(r.plotHeight=p,r.redrawTrigger="adjustHeight",r.setSize(void 0,r.chartHeight+q,n)),k.series.forEach(function(b){(b=b.sharedClipKey&&r[b.sharedClipKey])&&b.attr({height:r.plotHeight})}))}),this.initiatedScale=!0);this.redrawTrigger=null};b.addEvent(k,"render",k.prototype.adjustHeight)})(B);var H=
function(b){var k=b.extend,u=b.isNumber,t=b.pick,r=function(b,p){var m=b.reduce(function(a,f){var e=t(f.parent,"");void 0===a[e]&&(a[e]=[]);a[e].push(f);return a},{});Object.keys(m).forEach(function(a,f){var e=m[a];""!==a&&-1===p.indexOf(a)&&(e.forEach(function(a){f[""].push(a)}),delete f[a])});return m},n=function(b,p,m,a,f,e){var h=0,x=0,g=e&&e.after,c=e&&e.before;p={data:a,depth:m-1,id:b,level:m,parent:p};var d,l;"function"===typeof c&&c(p,e);c=(f[b]||[]).map(function(c){var a=n(c.id,b,m+1,c,f,
e),g=c.start;c=!0===c.milestone?g:c.end;d=!u(d)||g<d?g:d;l=!u(l)||c>l?c:l;h=h+1+a.descendants;x=Math.max(a.height+1,x);return a});a&&(a.start=t(a.start,d),a.end=t(a.end,l));k(p,{children:c,descendants:h,height:x});"function"===typeof g&&g(p,e);return p};return{getListOfParents:r,getNode:n,getTree:function(b,p){var m=b.map(function(a){return a.id});b=r(b,m);return n("",null,1,null,b,p)}}}(B),I=function(b){var k=b.extend,u=b.isArray,t=b.isObject,r=b.isNumber,n=b.merge,q=b.pick;return{getColor:function(p,
m){var a=m.index,f=m.mapOptionsToLevel,e=m.parentColor,h=m.parentColorIndex,x=m.series,g=m.colors,c=m.siblings,d=x.points,l=x.chart.options.chart,v,w,y,k;if(p){d=d[p.i];p=f[p.level]||{};if(f=d&&p.colorByPoint)w=d.index%(g?g.length:l.colorCount),v=g&&g[w];if(!x.chart.styledMode){g=d&&d.options.color;l=p&&p.color;if(y=e)y=(y=p&&p.colorVariation)&&"brightness"===y.key?b.color(e).brighten(a/c*y.to).get():e;y=q(g,l,v,y,x.color)}k=q(d&&d.options.colorIndex,p&&p.colorIndex,w,h,m.colorIndex)}return{color:y,
colorIndex:k}},getLevelOptions:function(b){var m=null,a,f,e,h;if(t(b))for(m={},e=r(b.from)?b.from:1,h=b.levels,f={},a=t(b.defaults)?b.defaults:{},u(h)&&(f=h.reduce(function(b,g){var c,d;t(g)&&r(g.level)&&(d=n({},g),c="boolean"===typeof d.levelIsConstant?d.levelIsConstant:a.levelIsConstant,delete d.levelIsConstant,delete d.level,g=g.level+(c?0:e-1),t(b[g])?k(b[g],d):b[g]=d);return b},{})),h=r(b.to)?b.to:1,b=0;b<=h;b++)m[b]=n({},a,t(f[b])?f[b]:{});return m},setTreeValues:function m(a,b){var e=b.before,
f=b.idRoot,x=b.mapIdToNode[f],g=b.points[a.i],c=g&&g.options||{},d=0,l=[];k(a,{levelDynamic:a.level-(("boolean"===typeof b.levelIsConstant?b.levelIsConstant:1)?0:x.level),name:q(g&&g.name,""),visible:f===a.id||("boolean"===typeof b.visible?b.visible:!1)});"function"===typeof e&&(a=e(a,b));a.children.forEach(function(c,g){var e=k({},b);k(e,{index:g,siblings:a.children.length,visible:a.visible});c=m(c,e);l.push(c);c.visible&&(d+=c.val)});a.visible=0<d||a.visible;e=q(c.value,d);k(a,{children:l,childrenTotal:d,
isLeaf:a.visible&&!d,val:e});return a},updateRootId:function(b){var a;t(b)&&(a=t(b.options)?b.options:{},a=q(b.rootNode,a.rootId,""),t(b.userOptions)&&(b.userOptions.rootId=a),b.rootNode=a);return a}}}(B);(function(b){var k=b.addEvent,u=b.pick,t=b.extend,r=b.isArray,n=b.fireEvent,q=b.Axis,p=b.Series;t(q.prototype,{isInBreak:function(b,a){var f=b.repeat||Infinity,e=b.from,h=b.to-b.from;a=a>=e?(a-e)%f:f-(e-a)%f;return b.inclusive?a<=h:a<h&&0!==a},isInAnyBreak:function(b,a){var f=this.options.breaks,
e=f&&f.length,h,m,g;if(e){for(;e--;)this.isInBreak(f[e],b)&&(h=!0,m||(m=u(f[e].showPoints,!this.isXAxis)));g=h&&a?h&&!m:h}return g}});k(q,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});k(q,"afterSetTickPositions",function(){if(this.isBroken){var b=this.tickPositions,a=this.tickPositions.info,f=[],e;for(e=0;e<b.length;e++)this.isInAnyBreak(b[e])||f.push(b[e]);this.tickPositions=f;this.tickPositions.info=a}});k(q,"afterSetOptions",function(){this.isBroken&&
(this.options.ordinal=!1)});q.prototype.setBreaks=function(b,a){function f(a){var c=a,d,g;for(g=0;g<h.breakArray.length;g++)if(d=h.breakArray[g],d.to<=a)c-=d.len;else if(d.from>=a)break;else if(h.isInBreak(d,a)){c-=a-d.from;break}return c}function e(a){var c,d;for(d=0;d<h.breakArray.length&&!(c=h.breakArray[d],c.from>=a);d++)c.to<a?a+=c.len:h.isInBreak(c,a)&&(a+=c.len);return a}var h=this,m=r(b)&&!!b.length;h.isDirty=h.isBroken!==m;h.isBroken=m;h.options.breaks=h.userOptions.breaks=b;h.forceRedraw=
!0;m||h.val2lin!==f||(delete h.val2lin,delete h.lin2val);m&&(h.userOptions.ordinal=!1,h.val2lin=f,h.lin2val=e,h.setExtremes=function(a,c,d,b,e){if(this.isBroken){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(c);)c-=this.closestPointRange}q.prototype.setExtremes.call(this,a,c,d,b,e)},h.setAxisTranslation=function(a){q.prototype.setAxisTranslation.call(this,a);this.unitLength=null;if(this.isBroken){a=h.options.breaks;var c=[],d=[],g=0,b,e,f=h.userMin||h.min,m=h.userMax||
h.max,A=u(h.pointRangePadding,0),k,p;a.forEach(function(c){e=c.repeat||Infinity;h.isInBreak(c,f)&&(f+=c.to%e-f%e);h.isInBreak(c,m)&&(m-=m%e-c.from%e)});a.forEach(function(a){k=a.from;for(e=a.repeat||Infinity;k-e>f;)k-=e;for(;k<f;)k+=e;for(p=k;p<m;p+=e)c.push({value:p,move:"in"}),c.push({value:p+(a.to-a.from),move:"out",size:a.breakSize})});c.sort(function(c,a){return c.value===a.value?("in"===c.move?0:1)-("in"===a.move?0:1):c.value-a.value});b=0;k=f;c.forEach(function(c){b+="in"===c.move?1:-1;1===
b&&"in"===c.move&&(k=c.value);0===b&&(d.push({from:k,to:c.value,len:c.value-k-(c.size||0)}),g+=c.value-k-(c.size||0))});h.breakArray=d;h.unitLength=m-f-g+A;n(h,"afterBreaks");h.staticScale?h.transA=h.staticScale:h.unitLength&&(h.transA*=(m-h.min+A)/h.unitLength);A&&(h.minPixelPadding=h.transA*h.minPointOffset);h.min=f;h.max=m}});u(a,!0)&&this.chart.redraw()};k(p,"afterGeneratePoints",function(){var b=this.xAxis,a=this.yAxis,f=this.points,e,h=f.length,k=this.options.connectNulls,g;if(b&&a&&(b.options.breaks||
a.options.breaks))for(;h--;)e=f[h],g=null===e.y&&!1===k,g||!b.isInAnyBreak(e.x,!0)&&!a.isInAnyBreak(e.y,!0)||(f.splice(h,1),this.data[h]&&this.data[h].destroyElements())});k(p,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,u(this.pointArrayMap,["y"]))});b.Series.prototype.drawBreaks=function(b,a){var f=this,e=f.points,h,k,g,c;b&&a.forEach(function(a){h=b.breakArray||[];k=b.isXAxis?b.min:u(f.options.threshold,b.min);e.forEach(function(d){c=u(d["stack"+a.toUpperCase()],
d[a]);h.forEach(function(a){g=!1;if(k<a.from&&c>a.to||k>a.from&&c<a.from)g="pointBreak";else if(k<a.from&&c>a.from&&c<a.to||k>a.from&&c>a.to&&c<a.from)g="pointInBreak";g&&n(b,g,{point:d,brk:a})})})})};b.Series.prototype.gappedPath=function(){var k=this.currentDataGrouping,a=k&&k.gapSize,k=this.options.gapSize,f=this.points.slice(),e=f.length-1,h=this.yAxis;if(k&&0<e)for("value"!==this.options.gapUnit&&(k*=this.closestPointRange),a&&a>k&&(k=a);e--;)f[e+1].x-f[e].x>k&&(a=(f[e].x+f[e+1].x)/2,f.splice(e+
1,0,{isNull:!0,x:a}),this.options.stacking&&(a=h.stacks[this.stackKey][a]=new b.StackItem(h,h.options.stackLabels,!1,a,this.stack),a.total=0));return this.getGraphPath(f)}})(B);(function(b,k,u){var t=b.addEvent,r=function(a){return Array.prototype.slice.call(a,1)},n=b.defined,q=b.extend,p=b.find,m=b.fireEvent,a=u.getLevelOptions,f=b.merge,e=b.isNumber,h=function(a){return b.isObject(a,!0)},x=b.isString,g=b.pick,c=b.wrap;u=b.Axis;var d=b.Tick,l=function(a,d){var g,b;for(g in d)d.hasOwnProperty(g)&&
(b=d[g],c(a,g,b))},v=function(a,c){var d=a.collapseStart;a=a.collapseEnd;a>=c&&(d-=.5);return{from:d,to:a,showPoints:!1}},w=function(a){return Object.keys(a.mapOfPosToGridNode).reduce(function(c,d){d=+d;a.min<=d&&a.max>=d&&!a.isInAnyBreak(d)&&c.push(d);return c},[])},y=function(a,c){var d=a.options.breaks||[],g=v(c,a.max);return d.some(function(a){return a.from===g.from&&a.to===g.to})},E=function(a,c){var d=a.options.breaks||[];a=v(c,a.max);d.push(a);return d},A=function(a,c){var d=a.options.breaks||
[],g=v(c,a.max);return d.reduce(function(a,c){c.to===g.to&&c.from===g.from||a.push(c);return a},[])},G=function(a,c){var d=a.labelIcon,e=!d,f=c.renderer,l=c.xy,h=c.options,v=h.width,z=h.height,k=l.x-v/2-h.padding,l=l.y-z/2,w=c.collapsed?90:180,y=c.show&&b.isNumber(l);e&&(a.labelIcon=d=f.path(f.symbols[h.type](h.x,h.y,v,z)).addClass("highcharts-label-icon").add(c.group));y||d.attr({y:-9999});f.styledMode||d.attr({"stroke-width":1,fill:g(c.color,"#666666")}).css({cursor:"pointer",stroke:h.lineColor,
strokeWidth:h.lineWidth});d[e?"attr":"animate"]({translateX:k,translateY:l,rotation:w})},F=function(c){c.target.axes.filter(function(a){return"treegrid"===a.options.type}).forEach(function(c){var d=c.options&&c.options.labels,g;c.updateYNames();c.series.forEach(function(a){a.yData=a.options.data.map(function(a){return a.y})});c.mapOptionsToLevel=a({defaults:d,from:1,levels:d.levels,to:c.tree.height});g=b.addEvent(c,"foundExtremes",function(){c.collapsedNodes.forEach(function(a){a=E(c,a);c.setBreaks(a,
!1)});g()})})},C=function(a,c,d){var g=[],b=[],e={},l={},f=-1,v="boolean"===typeof c?c:!1;a=k.getTree(a,{after:function(a){a=l[a.pos];var c=0,d=0;a.children.forEach(function(a){d+=a.descendants+1;c=Math.max(a.height+1,c)});a.descendants=d;a.height=c;a.collapsed&&b.push(a)},before:function(a){var c=h(a.data)?a.data:{},d=x(c.name)?c.name:"",b=e[a.parent],b=h(b)?l[b.pos]:null,k=function(a){return a.name===d},w;v&&h(b)&&(w=p(b.children,k))?(k=w.pos,w.nodes.push(a)):k=f++;l[k]||(l[k]=w={depth:b?b.depth+
1:0,name:d,nodes:[a],children:[],pos:k},-1!==k&&g.push(d),h(b)&&b.children.push(w));x(a.id)&&(e[a.id]=a);!0===c.collapsed&&(w.collapsed=!0);a.pos=k}});l=function(a,c){var d=function(a,g,b){var e=g+(-1===g?0:c-1),l=(e-g)/2,f=g+l;a.nodes.forEach(function(a){var c=a.data;h(c)&&(c.y=g+c.seriesIndex,delete c.seriesIndex);a.pos=f});b[f]=a;a.pos=f;a.tickmarkOffset=l+.5;a.collapseStart=e+.5;a.children.forEach(function(a){d(a,e+1,b);e=a.collapseEnd-.5});a.collapseEnd=e+.5;return b};return d(a["-1"],-1,{})}(l,
d);return{categories:g,mapOfIdToNode:e,mapOfPosToGridNode:l,collapsedNodes:b,tree:a}};l(u.prototype,{init:function(a,c,d){var g="treegrid"===d.type;g&&(t(c,"beforeRender",F),t(c,"beforeRedraw",F),d=f({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-5,height:10,width:10,padding:5}},uniqueNames:!1},d,{reversed:!0,grid:{columns:void 0}}));a.apply(this,[c,d]);g&&(this.hasNames=!0,this.options.showLastLabel=!0)},getMaxLabelDimensions:function(a){var c=
this.options,d=c&&c.labels,c=d&&e(d.indentation)?c.labels.indentation:0,d=a.apply(this,r(arguments)),g;"treegrid"===this.options.type&&this.mapOfPosToGridNode&&(g=this.mapOfPosToGridNode[-1].height,d.width+=c*(g-1));return d},generateTick:function(a,c){var g=h(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},b=this.ticks,e=b[c],l,f;"treegrid"===this.options.type?(f=this.mapOfPosToGridNode[c],(g=g[f.depth])&&(l={labels:g}),e?(e.parameters.category=f.name,e.options=l,e.addLabel()):b[c]=new d(this,
c,null,void 0,{category:f.name,tickmarkOffset:f.tickmarkOffset,options:l})):a.apply(this,r(arguments))},setTickInterval:function(a){var c=this.options;"treegrid"===c.type?(this.min=g(this.userMin,c.min,this.dataMin),this.max=g(this.userMax,c.max,this.dataMax),m(this,"foundExtremes"),this.setAxisTranslation(!0),this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=this.mapOfPosToGridNode?w(this):[]):a.apply(this,r(arguments))}});l(d.prototype,{getLabelPosition:function(a,c,d,b,l,f,v,k,w){var y=
g(this.options&&this.options.labels,f);f=this.pos;var A=this.axis,J="treegrid"===A.options.type;a=a.apply(this,[c,d,b,l,y,v,k,w]);J&&(c=y&&h(y.symbol)?y.symbol:{},y=y&&e(y.indentation)?y.indentation:0,f=(f=(A=A.mapOfPosToGridNode)&&A[f])&&f.depth||1,a.x+=c.width+2*c.padding+(f-1)*y);return a},renderLabel:function(a){var c=this,d=c.pos,e=c.axis,f=c.label,l=e.mapOfPosToGridNode,v=e.options,k=g(c.options&&c.options.labels,v&&v.labels),w=k&&h(k.symbol)?k.symbol:{},A=(l=l&&l[d])&&l.depth,v="treegrid"===
v.type,p=!(!f||!f.element),m=-1<e.tickPositions.indexOf(d),d=e.chart.styledMode;v&&l&&p&&f.addClass("highcharts-treegrid-node-level-"+A);a.apply(c,r(arguments));v&&l&&p&&0<l.descendants&&(e=y(e,l),G(c,{color:!d&&f.styles.color,collapsed:e,group:f.parentGroup,options:w,renderer:f.renderer,show:m,xy:f.xy}),w="highcharts-treegrid-node-"+(e?"expanded":"collapsed"),f.addClass("highcharts-treegrid-node-"+(e?"collapsed":"expanded")).removeClass(w),d||f.css({cursor:"pointer"}),[f,c.labelIcon].forEach(function(a){a.attachedTreeGridEvents||
(b.addEvent(a.element,"mouseover",function(){var a=f;a.addClass("highcharts-treegrid-node-active");a.renderer.styledMode||a.css({textDecoration:"underline"})}),b.addEvent(a.element,"mouseout",function(){var a=f,c=k,c=n(c.style)?c.style:{};a.removeClass("highcharts-treegrid-node-active");a.renderer.styledMode||a.css({textDecoration:c.textDecoration})}),b.addEvent(a.element,"click",function(){c.toggleCollapse()}),a.attachedTreeGridEvents=!0)}))}});q(d.prototype,{collapse:function(a){var c=this.axis,
d=E(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(d,g(a,!0))},expand:function(a){var c=this.axis,d=A(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(d,g(a,!0))},toggleCollapse:function(a){var c=this.axis,d;d=c.mapOfPosToGridNode[this.pos];d=y(c,d)?A(c,d):E(c,d);c.setBreaks(d,g(a,!0))}});u.prototype.updateYNames=function(){var a=this.options,c=a.uniqueNames,d=!this.isXAxis,g=this.series,b=0;"treegrid"===a.type&&d&&(a=g.reduce(function(a,d){d.visible&&(d.options.data.forEach(function(c){h(c)&&(c.seriesIndex=
b,a.push(c))}),!0===c&&b++);return a},[]),a=C(a,c,!0===c?b:1),this.categories=a.categories,this.mapOfPosToGridNode=a.mapOfPosToGridNode,this.collapsedNodes=a.collapsedNodes,this.hasNames=!0,this.tree=a.tree)};u.prototype.utils={getNode:k.getNode}})(B,H,I);H=function(b){function k(a,b,e){e=e||0;var f=a.length-1;b-=1e-7;for(var k,g;e<=f;)if(k=f+e>>1,g=b-a[k].xMin,0<g)e=k+1;else if(0>g)f=k-1;else return k;return 0<e?e-1:0}function u(a,b){for(var e=k(a,b.x+1)+1;e--;){var f;if(f=a[e].xMax>=b.x)f=a[e],
f=b.x<=f.xMax&&b.x>=f.xMin&&b.y<=f.yMax&&b.y>=f.yMin;if(f)return e}return-1}function t(a){var b=[];if(a.length){b.push("M",a[0].start.x,a[0].start.y);for(var e=0;e<a.length;++e)b.push("L",a[e].end.x,a[e].end.y)}return b}function r(a,b){a.yMin=q(a.yMin,b.yMin);a.yMax=n(a.yMax,b.yMax);a.xMin=q(a.xMin,b.xMin);a.xMax=n(a.xMax,b.xMax)}var n=Math.min,q=Math.max,p=Math.abs,m=b.pick;return{straight:function(a,b){return{path:["M",a.x,a.y,"L",b.x,b.y],obstacles:[{start:a,end:b}]}},simpleConnect:b.extend(function(a,
b,e){function f(a,c,d,b,g){a={x:a.x,y:a.y};a[c]=d[b||c]+(g||0);return a}function k(a,c,d){var b=p(c[d]-a[d+"Min"])>p(c[d]-a[d+"Max"]);return f(c,d,a,d+(b?"Max":"Min"),b?1:-1)}var g=[],c,d=m(e.startDirectionX,p(b.x-a.x)>p(b.y-a.y))?"x":"y",l=e.chartObstacles,v=u(l,a);e=u(l,b);var w;-1<e?(c=l[e],e=k(c,b,d),c={start:e,end:b},w=e):w=b;-1<v&&(l=l[v],e=k(l,a,d),g.push({start:a,end:e}),e[d]>a[d]===e[d]>w[d]&&(d="y"===d?"x":"y",b=a[d]<b[d],g.push({start:e,end:f(e,d,l,d+(b?"Max":"Min"),b?1:-1)}),d="y"===d?
"x":"y"));a=g.length?g[g.length-1].end:a;e=f(a,d,w);g.push({start:a,end:e});d=f(e,"y"===d?"x":"y",w);g.push({start:e,end:d});g.push(c);return{path:t(g),obstacles:g}},{requiresObstacles:!0}),fastAvoid:b.extend(function(a,b,e){function f(a,c,d){var b,g,e,l,f,h=a.x<c.x?1:-1;a.x<c.x?(b=a,g=c):(b=c,g=a);a.y<c.y?(l=a,e=c):(l=c,e=a);for(f=0>h?n(k(z,g.x),z.length-1):0;z[f]&&(0<h&&z[f].xMin<=g.x||0>h&&z[f].xMax>=b.x);){if(z[f].xMin<=g.x&&z[f].xMax>=b.x&&z[f].yMin<=e.y&&z[f].yMax>=l.y)return d?{y:a.y,x:a.x<
c.x?z[f].xMin-1:z[f].xMax+1,obstacle:z[f]}:{x:a.x,y:a.y<c.y?z[f].yMin-1:z[f].yMax+1,obstacle:z[f]};f+=h}return c}function x(a,c,d,b,g){var e=g.soft,l=g.hard,h=b?"x":"y",k={x:c.x,y:c.y},v={x:c.x,y:c.y};g=a[h+"Max"]>=e[h+"Max"];var e=a[h+"Min"]<=e[h+"Min"],w=a[h+"Max"]>=l[h+"Max"],l=a[h+"Min"]<=l[h+"Min"],y=p(a[h+"Min"]-c[h]),A=p(a[h+"Max"]-c[h]);d=10>p(y-A)?c[h]<d[h]:A<y;v[h]=a[h+"Min"];k[h]=a[h+"Max"];a=f(c,v,b)[h]!==v[h];c=f(c,k,b)[h]!==k[h];d=a?c?d:!0:c?!1:d;d=e?g?d:!0:g?!1:d;return l?w?d:!0:w?
!1:d}function g(a,c,d){if(a.x===c.x&&a.y===c.y)return[];var b=d?"x":"y",l,h,k,v,w=e.obstacleOptions.margin;l={soft:{xMin:G,xMax:F,yMin:C,yMax:D},hard:e.hardBounds};h=u(z,a);-1<h?(h=z[h],l=x(h,a,c,d,l),r(h,e.hardBounds),v=d?{y:a.y,x:h[l?"xMax":"xMin"]+(l?1:-1)}:{x:a.x,y:h[l?"yMax":"yMin"]+(l?1:-1)},k=u(z,v),-1<k&&(k=z[k],r(k,e.hardBounds),v[b]=l?q(h[b+"Max"]-w+1,(k[b+"Min"]+h[b+"Max"])/2):n(h[b+"Min"]+w-1,(k[b+"Max"]+h[b+"Min"])/2),a.x===v.x&&a.y===v.y?(E&&(v[b]=l?q(h[b+"Max"],k[b+"Max"])+1:n(h[b+
"Min"],k[b+"Min"])-1),E=!E):E=!1),a=[{start:a,end:v}]):(b=f(a,{x:d?c.x:a.x,y:d?a.y:c.y},d),a=[{start:a,end:{x:b.x,y:b.y}}],b[d?"x":"y"]!==c[d?"x":"y"]&&(l=x(b.obstacle,b,c,!d,l),r(b.obstacle,e.hardBounds),l={x:d?b.x:b.obstacle[l?"xMax":"xMin"]+(l?1:-1),y:d?b.obstacle[l?"yMax":"yMin"]+(l?1:-1):b.y},d=!d,a=a.concat(g({x:b.x,y:b.y},l,d))));return a=a.concat(g(a[a.length-1].end,c,!d))}function c(a,c,d){var b=n(a.xMax-c.x,c.x-a.xMin)<n(a.yMax-c.y,c.y-a.yMin);d=x(a,c,d,b,{soft:e.hardBounds,hard:e.hardBounds});
return b?{y:c.y,x:a[d?"xMax":"xMin"]+(d?1:-1)}:{x:c.x,y:a[d?"yMax":"yMin"]+(d?1:-1)}}var d=m(e.startDirectionX,p(b.x-a.x)>p(b.y-a.y)),l=d?"x":"y",v,w,y=[],E=!1,A=e.obstacleMetrics,G=n(a.x,b.x)-A.maxWidth-10,F=q(a.x,b.x)+A.maxWidth+10,C=n(a.y,b.y)-A.maxHeight-10,D=q(a.y,b.y)+A.maxHeight+10,z=e.chartObstacles;v=k(z,G);A=k(z,F);z=z.slice(v,A+1);-1<(A=u(z,b))&&(w=c(z[A],b,a),y.push({end:b,start:w}),b=w);for(;-1<(A=u(z,b));)v=0>b[l]-a[l],w={x:b.x,y:b.y},w[l]=z[A][v?l+"Max":l+"Min"]+(v?1:-1),y.push({end:b,
start:w}),b=w;a=g(a,b,d);a=a.concat(y.reverse());return{path:t(a),obstacles:a}},{requiresObstacles:!0})}}(B);(function(b){b.SVGRenderer.prototype.symbols.arrow=function(b,u,t,r){return["M",b,u+r/2,"L",b+t,u,"L",b,u+r/2,"L",b+t,u+r]};b.SVGRenderer.prototype.symbols["arrow-half"]=function(k,u,t,r){return b.SVGRenderer.prototype.symbols.arrow(k,u,t/2,r)};b.SVGRenderer.prototype.symbols["triangle-left"]=function(b,u,t,r){return["M",b+t,u,"L",b,u+r/2,"L",b+t,u+r,"Z"]};b.SVGRenderer.prototype.symbols["arrow-filled"]=
b.SVGRenderer.prototype.symbols["triangle-left"];b.SVGRenderer.prototype.symbols["triangle-left-half"]=function(k,u,t,r){return b.SVGRenderer.prototype.symbols["triangle-left"](k,u,t/2,r)};b.SVGRenderer.prototype.symbols["arrow-filled-half"]=b.SVGRenderer.prototype.symbols["triangle-left-half"]})(B);(function(b,k){function u(a){var c=a.shapeArgs;return c?{xMin:c.x,xMax:c.x+c.width,yMin:c.y,yMax:c.y+c.height}:(c=a.graphic&&a.graphic.getBBox())?{xMin:a.plotX-c.width/2,xMax:a.plotX+c.width/2,yMin:a.plotY-
c.height/2,yMax:a.plotY+c.height/2}:null}function t(a){for(var c=a.length,b=0,e,f,k=[],p=function(a,c,d){d=h(d,10);var b=a.yMax+d>c.yMin-d&&a.yMin-d<c.yMax+d,e=a.xMax+d>c.xMin-d&&a.xMin-d<c.xMax+d,l=b?a.xMin>c.xMax?a.xMin-c.xMax:c.xMin-a.xMax:Infinity,f=e?a.yMin>c.yMax?a.yMin-c.yMax:c.yMin-a.yMax:Infinity;return e&&b?d?p(a,c,Math.floor(d/2)):Infinity:g(l,f)};b<c;++b)for(e=b+1;e<c;++e)f=p(a[b],a[e]),80>f&&k.push(f);k.push(80);return x(Math.floor(k.sort(function(a,c){return a-c})[Math.floor(k.length/
10)]/2-1),1)}function r(a,d,b){this.init(a,d,b)}function n(a){this.init(a)}function q(a){if(a.options.pathfinder||a.series.reduce(function(a,c){c.options&&e(!0,c.options.connectors=c.options.connectors||{},c.options.pathfinder);return a||c.options&&c.options.pathfinder},!1))e(!0,a.options.connectors=a.options.connectors||{},a.options.pathfinder),b.error('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')}var p=b.defined,m=b.deg2rad,a=b.extend,f=
b.addEvent,e=b.merge,h=b.pick,x=Math.max,g=Math.min;a(b.defaultOptions,{connectors:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});r.prototype={init:function(a,d,b){this.fromPoint=a;this.toPoint=d;this.options=b;this.chart=a.series.chart;this.pathfinder=this.chart.pathfinder},renderPath:function(a,d,b){var c=this.chart,g=c.styledMode,e=c.pathfinder,l=!c.options.chart.forExport&&
!1!==b,f=this.graphics&&this.graphics.path;e.group||(e.group=c.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(c.seriesGroup));e.group.translate(c.plotLeft,c.plotTop);f&&f.renderer||(f=c.renderer.path().add(e.group),g||f.attr({opacity:0}));f.attr(d);a={d:a};g||(a.opacity=1);f[l?"animate":"attr"](a,b);this.graphics=this.graphics||{};this.graphics.path=f},addMarker:function(a,d,b){var c=this.fromPoint.series.chart,g=c.pathfinder,c=c.renderer,e="start"===a?this.fromPoint:this.toPoint,
f=e.getPathfinderAnchorPoint(d),l,h;d.enabled&&(b="start"===a?{x:b[4],y:b[5]}:{x:b[b.length-5],y:b[b.length-4]},b=e.getRadiansToVector(b,f),f=e.getMarkerVector(b,d.radius,f),b=-b/m,d.width&&d.height?(l=d.width,h=d.height):l=h=2*d.radius,this.graphics=this.graphics||{},f={x:f.x-l/2,y:f.y-h/2,width:l,height:h,rotation:b,rotationOriginX:f.x,rotationOriginY:f.y},this.graphics[a]?this.graphics[a].animate(f):(this.graphics[a]=c.symbol(d.symbol).addClass("highcharts-point-connecting-path-"+a+"-marker").attr(f).add(g.group),
c.styledMode||this.graphics[a].attr({fill:d.color||this.fromPoint.color,stroke:d.lineColor,"stroke-width":d.lineWidth,opacity:0}).animate({opacity:1},e.series.options.animation)))},getPath:function(a){var c=this.pathfinder,g=this.chart,f=c.algorithms[a.type],h=c.chartObstacles;if("function"!==typeof f)b.error('"'+a.type+'" is not a Pathfinder algorithm.');else return f.requiresObstacles&&!h&&(h=c.chartObstacles=c.getChartObstacles(a),g.options.connectors.algorithmMargin=a.algorithmMargin,c.chartObstacleMetrics=
c.getObstacleMetrics(h)),f(this.fromPoint.getPathfinderAnchorPoint(a.startMarker),this.toPoint.getPathfinderAnchorPoint(a.endMarker),e({chartObstacles:h,lineObstacles:c.lineObstacles||[],obstacleMetrics:c.chartObstacleMetrics,hardBounds:{xMin:0,xMax:g.plotWidth,yMin:0,yMax:g.plotHeight},obstacleOptions:{margin:a.algorithmMargin},startDirectionX:c.getAlgorithmStartDirection(a.startMarker)},a))},render:function(){var a=this.fromPoint,b=a.series,f=b.chart,h=f.pathfinder,k=e(f.options.connectors,b.options.connectors,
a.options.connectors,this.options),m={};f.styledMode||(m.stroke=k.lineColor||a.color,m["stroke-width"]=k.lineWidth,k.dashStyle&&(m.dashstyle=k.dashStyle));m.class="highcharts-point-connecting-path highcharts-color-"+a.colorIndex;k=e(m,k);p(k.marker.radius)||(k.marker.radius=g(x(Math.ceil((k.algorithmMargin||8)/2)-1,1),5));a=this.getPath(k);f=a.path;a.obstacles&&(h.lineObstacles=h.lineObstacles||[],h.lineObstacles=h.lineObstacles.concat(a.obstacles));this.renderPath(f,m,b.options.animation);this.addMarker("start",
e(k.marker,k.startMarker),f);this.addMarker("end",e(k.marker,k.endMarker),f)},destroy:function(){this.graphics&&(b.objectEach(this.graphics,function(a){a.destroy()}),delete this.graphics)}};n.prototype={algorithms:k,init:function(a){this.chart=a;this.connections=[];f(a,"redraw",function(){this.pathfinder.update()})},update:function(a){var c=this.chart,g=this,e=g.connections;g.connections=[];c.series.forEach(function(a){a.visible&&a.points.forEach(function(a){var d,e=a.options&&a.options.connect&&
b.splat(a.options.connect);a.visible&&!1!==a.isInside&&e&&e.forEach(function(e){d=c.get("string"===typeof e?e:e.to);d instanceof b.Point&&d.series.visible&&d.visible&&!1!==d.isInside&&g.connections.push(new r(a,d,"string"===typeof e?{}:e))})})});for(var f=0,h,k,p=e.length,m=g.connections.length;f<p;++f){k=!1;for(h=0;h<m;++h)if(e[f].fromPoint===g.connections[h].fromPoint&&e[f].toPoint===g.connections[h].toPoint){g.connections[h].graphics=e[f].graphics;k=!0;break}k||e[f].destroy()}delete this.chartObstacles;
delete this.lineObstacles;g.renderConnections(a)},renderConnections:function(a){a?this.chart.series.forEach(function(a){var c=function(){var c=a.chart.pathfinder;(c&&c.connections||[]).forEach(function(c){c.fromPoint&&c.fromPoint.series===a&&c.render()});a.pathfinderRemoveRenderEvent&&(a.pathfinderRemoveRenderEvent(),delete a.pathfinderRemoveRenderEvent)};!1===a.options.animation?c():a.pathfinderRemoveRenderEvent=f(a,"afterAnimate",c)}):this.connections.forEach(function(a){a.render()})},getChartObstacles:function(a){for(var c=
[],b=this.chart.series,g=h(a.algorithmMargin,0),e,f=0,k=b.length;f<k;++f)if(b[f].visible)for(var m=0,n=b[f].points.length,q;m<n;++m)q=b[f].points[m],q.visible&&(q=u(q))&&c.push({xMin:q.xMin-g,xMax:q.xMax+g,yMin:q.yMin-g,yMax:q.yMax+g});c=c.sort(function(a,c){return a.xMin-c.xMin});p(a.algorithmMargin)||(e=a.algorithmMargin=t(c),c.forEach(function(a){a.xMin-=e;a.xMax+=e;a.yMin-=e;a.yMax+=e}));return c},getObstacleMetrics:function(a){for(var c=0,b=0,g,e,f=a.length;f--;)g=a[f].xMax-a[f].xMin,e=a[f].yMax-
a[f].yMin,c<g&&(c=g),b<e&&(b=e);return{maxHeight:b,maxWidth:c}},getAlgorithmStartDirection:function(a){var c="top"!==a.verticalAlign&&"bottom"!==a.verticalAlign;return"left"!==a.align&&"right"!==a.align?c?void 0:!1:c?!0:void 0}};b.Connection=r;b.Pathfinder=n;a(b.Point.prototype,{getPathfinderAnchorPoint:function(a){var c=u(this),b,g;switch(a.align){case "right":b="xMax";break;case "left":b="xMin"}switch(a.verticalAlign){case "top":g="yMin";break;case "bottom":g="yMax"}return{x:b?c[b]:(c.xMin+c.xMax)/
2,y:g?c[g]:(c.yMin+c.yMax)/2}},getRadiansToVector:function(a,b){p(b)||(b=u(this),b={x:(b.xMin+b.xMax)/2,y:(b.yMin+b.yMax)/2});return Math.atan2(b.y-a.y,a.x-b.x)},getMarkerVector:function(a,b,g){for(var c=2*Math.PI,d=u(this),e=d.xMax-d.xMin,f=d.yMax-d.yMin,h=Math.atan2(f,e),l=!1,e=e/2,k=f/2,m=d.xMin+e,d=d.yMin+k,p=m,n=d,q={},r=1,t=1;a<-Math.PI;)a+=c;for(;a>Math.PI;)a-=c;c=Math.tan(a);a>-h&&a<=h?(t=-1,l=!0):a>h&&a<=Math.PI-h?t=-1:a>Math.PI-h||a<=-(Math.PI-h)?(r=-1,l=!0):r=-1;l?(p+=r*e,n+=t*e*c):(p+=
f/(2*c)*r,n+=t*k);g.x!==m&&(p=g.x);g.y!==d&&(n=g.y);q.x=p+b*Math.cos(a);q.y=n-b*Math.sin(a);return q}});b.Chart.prototype.callbacks.push(function(a){!1!==a.options.connectors.enabled&&(q(a),this.pathfinder=new n(this),this.pathfinder.update(!0))})})(B,H);(function(b){var k=b.addEvent,u=b.defined,t=b.Color,r=b.seriesTypes.column,n=b.correctFloat,q=b.isNumber,p=b.isObject,m=b.merge,a=b.pick,f=b.seriesType,e=b.Axis,h=b.Point,x=b.Series;f("xrange","column",{colorByPoint:!0,dataLabels:{verticalAlign:"middle",
inside:!0,formatter:function(){var a=this.point.partialFill;p(a)&&(a=a.amount);u(a)||(a=0);return n(100*a)+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.x} - {point.x2}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.yCategory}\x3c/b\x3e\x3cbr/\x3e'},borderRadius:3,pointRange:0},{type:"xrange",parallelArrays:["x","x2","y"],requireSorting:!1,animate:b.seriesTypes.line.prototype.animate,
cropShoulder:1,getExtremesFromAll:!0,autoIncrement:b.noop,getColumnMetrics:function(){function a(){b.series.forEach(function(a){var c=a.xAxis;a.xAxis=a.yAxis;a.yAxis=c})}var c,b=this.chart;a();c=r.prototype.getColumnMetrics.call(this);a();return c},cropData:function(a,c,b,e){c=x.prototype.cropData.call(this,this.x2Data,c,b,e);c.xData=a.slice(c.start,c.end);return c},translatePoint:function(b){var c=this.xAxis,d=this.yAxis,g=this.columnMetrics,e=this.options,f=e.minPointLength||0,h=b.plotX,k=a(b.x2,
b.x+(b.len||0)),n=c.translate(k,0,0,0,1),k=Math.abs(n-h),r=this.chart.inverted,t=a(e.borderWidth,1)%2/2,x=g.offset,B=Math.round(g.width);f&&(f-=k,0>f&&(f=0),h-=f/2,n+=f/2);h=Math.max(h,-10);n=Math.min(Math.max(n,-10),c.len+10);u(b.options.pointWidth)&&(x-=(Math.ceil(b.options.pointWidth)-B)/2,B=Math.ceil(b.options.pointWidth));e.pointPlacement&&q(b.plotY)&&d.categories&&(b.plotY=d.translate(b.y,0,1,0,1,e.pointPlacement));b.shapeArgs={x:Math.floor(Math.min(h,n))+t,y:Math.floor(b.plotY+x)+t,width:Math.round(Math.abs(n-
h)),height:B,r:this.options.borderRadius};e=b.shapeArgs.x;f=e+b.shapeArgs.width;0>e||f>c.len?(e=Math.min(c.len,Math.max(0,e)),f=Math.max(0,Math.min(f,c.len)),n=f-e,b.dlBox=m(b.shapeArgs,{x:e,width:f-e,centerX:n?n/2:null})):b.dlBox=null;r?(b.tooltipPos[1]+=k/2*(c.reversed?1:-1),b.tooltipPos[0]+=g.width/2,b.tooltipPos[1]=Math.max(Math.min(b.tooltipPos[1],c.len-1),0),b.tooltipPos[0]=Math.max(Math.min(b.tooltipPos[0],d.len-1),0)):(b.tooltipPos[0]+=k/2*(c.reversed?-1:1),b.tooltipPos[1]-=g.width/2,b.tooltipPos[0]=
Math.max(Math.min(b.tooltipPos[0],c.len-1),0),b.tooltipPos[1]=Math.max(Math.min(b.tooltipPos[1],d.len-1),0));if(d=b.partialFill)p(d)&&(d=d.amount),q(d)||(d=0),c=b.shapeArgs,b.partShapeArgs={x:c.x,y:c.y,width:c.width,height:c.height,r:this.options.borderRadius},b.clipRectArgs={x:c.x,y:c.y,width:Math.max(Math.round(k*d+(b.plotX-h)),0),height:c.height}},translate:function(){r.prototype.translate.apply(this,arguments);this.points.forEach(function(a){this.translatePoint(a)},this)},drawPoint:function(a,
c){var b=this.options,e=this.chart.renderer,g=a.graphic,f=a.shapeType,h=a.shapeArgs,k=a.partShapeArgs,n=a.clipRectArgs,q=a.partialFill,r=a.selected&&"select",u=b.stacking&&!b.borderRadius;if(a.isNull)g&&(a.graphic=g.destroy());else{if(g)a.graphicOriginal[c](m(h));else a.graphic=g=e.g("point").addClass(a.getClassName()).add(a.group||this.group),a.graphicOriginal=e[f](h).addClass(a.getClassName()).addClass("highcharts-partfill-original").add(g);k&&(a.graphicOverlay?(a.graphicOverlay[c](m(k)),a.clipRect.animate(m(n))):
(a.clipRect=e.clipRect(n.x,n.y,n.width,n.height),a.graphicOverlay=e[f](k).addClass("highcharts-partfill-overlay").add(g).clip(a.clipRect)));this.chart.styledMode||(a.graphicOriginal.attr(this.pointAttribs(a,r)).shadow(b.shadow,null,u),k&&(p(q)||(q={}),p(b.partialFill)&&(q=m(q,b.partialFill)),c=q.fill||t(a.color||this.color).brighten(-.3).get(),a.graphicOverlay.attr(this.pointAttribs(a,r)).attr({fill:c}).shadow(b.shadow,null,u)))}},drawPoints:function(){var a=this,c=a.getAnimationVerb();a.points.forEach(function(b){a.drawPoint(b,
c)})},getAnimationVerb:function(){return this.chart.pointCount<(this.options.animationLimit||250)?"animate":"attr"}},{applyOptions:function(){var a,c=h.prototype.applyOptions.apply(this,arguments),b=c.series;if(b.options.colorByPoint&&!c.options.color){a=b.options.colors||b.chart.options.colors;var e=c.y%(a?a.length:b.chart.options.chart.colorCount);a=a&&a[e];b.chart.styledMode||(c.color=a);c.options.colorIndex||(c.colorIndex=e)}return c},init:function(){h.prototype.init.apply(this,arguments);this.y||
(this.y=0);return this},setState:function(){h.prototype.setState.apply(this,arguments);this.series.drawPoint(this,this.series.getAnimationVerb())},getLabelConfig:function(){var a=h.prototype.getLabelConfig.call(this),b=this.series.yAxis.categories;a.x2=this.x2;a.yCategory=this.yCategory=b&&b[this.y];return a},tooltipDateKeys:["x","x2"],isValid:function(){return"number"===typeof this.x&&"number"===typeof this.x2}});k(e,"afterGetSeriesExtremes",function(){var b=this.series,c,d;this.isXAxis&&(c=a(this.dataMax,
-Number.MAX_VALUE),b.forEach(function(a){a.x2Data&&a.x2Data.forEach(function(a){a>c&&(c=a,d=!0)})}),d&&(this.dataMax=c))})})(B);(function(b){var k=b.dateFormat,u=b.isObject,t=b.isNumber,r=b.merge,n=b.pick,q=b.seriesType,p=b.stop,m=b.seriesTypes.xrange;q("gantt","xrange",{grouping:!1,dataLabels:{enabled:!0,formatter:function(){var a=this.point.partialFill;u(a)&&(a=a.amount);if(t(a)&&0<a)return 100*a+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{series.name}\x3c/span\x3e\x3cbr/\x3e',
pointFormat:null,pointFormatter:function(){var a=this.series,f=a.chart.tooltip,e=a.xAxis,h=e.options.dateTimeLabelFormats,m=e.options.startOfWeek,g=a.tooltipOptions,c=g.xDateFormat,d=this.end?this.end-this.start:0,a=this.options.milestone,e="\x3cb\x3e"+(this.name||this.yCategory)+"\x3c/b\x3e";if(g.pointFormat)return this.tooltipFormatter(g.pointFormat);c||(c=b.splat(f.getDateFormat(d,this.start,m,h))[0]);f=k(c,this.start);h=k(c,this.end);e+="\x3cbr/\x3e";return a?e+("Date "+f+"\x3cbr/\x3e"):e+("Start: "+
f+"\x3cbr/\x3e")+("End: "+h+"\x3cbr/\x3e")}},connectors:{type:"simpleConnect",animation:{reversed:!0},startMarker:{enabled:!0,symbol:"arrow-filled",radius:4,fill:"#fa0",align:"left"},endMarker:{enabled:!1,align:"right"}}},{pointArrayMap:["start","end","y"],keyboardMoveVertical:!1,translatePoint:function(a){var b,e;m.prototype.translatePoint.call(this,a);a.options.milestone&&(b=a.shapeArgs,e=b.height,a.shapeArgs={x:b.x-e/2,y:b.y,width:e,height:e})},drawPoint:function(a,b){var e=this.options,f=this.chart.renderer,
k=a.shapeArgs,g=a.plotY,c=a.graphic,d=a.selected&&"select",l=e.stacking&&!e.borderRadius;a.options.milestone?t(g)&&null!==a.y?(k=f.symbols.diamond(k.x,k.y,k.width,k.height),c?(p(c),c[b]({d:k})):a.graphic=f.path(k).addClass(a.getClassName(),!0).add(a.group||this.group),this.chart.styledMode||a.graphic.attr(this.pointAttribs(a,d)).shadow(e.shadow,null,l)):c&&(a.graphic=c.destroy()):m.prototype.drawPoint.call(this,a,b)},setData:b.Series.prototype.setData,setGanttPointAliases:function(a){function b(b,
f){void 0!==f&&(a[b]=f)}b("x",n(a.start,a.x));b("x2",n(a.end,a.x2));b("partialFill",n(a.completed,a.partialFill));b("connect",n(a.dependency,a.connect))}},r(m.prototype.pointClass.prototype,{applyOptions:function(a,f){a=r(a);b.seriesTypes.gantt.prototype.setGanttPointAliases(a);return a=m.prototype.pointClass.prototype.applyOptions.call(this,a,f)}}))})(B);(function(b){var k=b.merge,u=b.splat,t=b.Chart;b.ganttChart=function(r,n,q){var p="string"===typeof r||r.nodeName,m=n.series,a=b.getOptions(),f,
e=n;n=arguments[p?1:0];b.isArray(n.xAxis)||(n.xAxis=[n.xAxis||{},{}]);n.xAxis=n.xAxis.map(function(b,e){1===e&&(f=0);return k(a.xAxis,{grid:{enabled:!0},opposite:!0,linkedTo:f},b,{type:"datetime"})});n.yAxis=u(n.yAxis||{}).map(function(b){return k(a.yAxis,{grid:{enabled:!0},staticScale:50,reversed:!0,type:b.categories?b.type:"treegrid"},b)});n.series=null;n=k(!0,{chart:{type:"gantt"},title:{text:null},legend:{enabled:!1}},n,{isGantt:!0});n.series=e.series=m;n.series.forEach(function(a){a.data.forEach(function(a){b.seriesTypes.gantt.prototype.setGanttPointAliases(a)})});
return p?new t(r,n,q):new t(n,n)}})(B)});
//# sourceMappingURL=gantt.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,23 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
GridAxis
(c) 2016-2019 Lars A. V. Cabrera
License: www.highcharts.com/license
*/
(function(n){"object"===typeof module&&module.exports?(n["default"]=n,module.exports=n):"function"===typeof define&&define.amd?define(function(){return n}):n("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(n){(function(g){var l=g.addEvent,n=g.dateFormat,t=g.defined,x=g.isArray,y=g.isNumber,r=function(a){return g.isObject(a,!0)},z=g.merge,v=g.pick,A=g.wrap,f=g.Axis,C=g.Tick,w={top:0,right:1,bottom:2,left:3,0:"top",1:"right",2:"bottom",3:"left"};f.prototype.isNavigatorAxis=function(){return/highcharts-navigator-[xy]axis/.test(this.options.className)};
f.prototype.isOuterAxis=function(){var a=this,b=-1,c=!0;a.chart.axes.forEach(function(d,e){d.side!==a.side||d.isNavigatorAxis()||(d===a?b=e:0<=b&&e>b&&(c=!1))});return c};f.prototype.getMaxLabelDimensions=function(a,b){var c={width:0,height:0};b.forEach(function(b){b=a[b];var d;r(b)&&(d=r(b.label)?b.label:{},b=d.getBBox?d.getBBox().height:0,d=y(d.textPxLength)?d.textPxLength:0,c.height=Math.max(b,c.height),c.width=Math.max(d,c.width))});return c};g.dateFormats={W:function(a){a=new Date(a);var b;a.setHours(0,
0,0,0);a.setDate(a.getDate()-(a.getDay()||7));b=new Date(a.getFullYear(),0,1);return Math.ceil(((a-b)/864E5+1)/7)},E:function(a){return n("%a",a,!0).charAt(0)}};l(C,"afterGetLabelPosition",function(a){var b=this.label,c=this.axis,d=c.reversed,e=c.chart,h=c.options,q=h&&r(h.grid)?h.grid:{},h=c.options.labels,B=h.align,k=w[c.side],m=a.tickmarkOffset,p=c.tickPositions,u=this.pos-m,p=y(p[a.index+1])?p[a.index+1]-m:c.max+m,g=c.tickSize("tick",!0),m=x(g)?g[0]:0,g=g&&g[1]/2,f;!0===q.enabled&&("top"===k?
(q=c.top+c.offset,f=q-m):"bottom"===k?(f=e.chartHeight-c.bottom+c.offset,q=f+m):(q=c.top+c.len-c.translate(d?p:u),f=c.top+c.len-c.translate(d?u:p)),"right"===k?(k=e.chartWidth-c.right+c.offset,d=k+m):"left"===k?(d=c.left+c.offset,k=d-m):(k=Math.round(c.left+c.translate(d?p:u))-g,d=Math.round(c.left+c.translate(d?u:p))-g),this.slotWidth=d-k,a.pos.x="left"===B?k:"right"===B?d:k+(d-k)/2,a.pos.y=f+(q-f)/2,e=e.renderer.fontMetrics(h.style.fontSize,b.element),b=b.getBBox().height,h.useHTML?a.pos.y+=e.b+
-(b/2):(b=Math.round(b/e.h),a.pos.y+=(e.b-(e.h-e.f))/2+-((b-1)*e.h/2)),a.pos.x+=c.horiz&&h.x||0)});l(f,"afterTickSize",function(a){var b=this.maxLabelDimensions,c=this.options;!0===(c&&r(c.grid)?c.grid:{}).enabled&&(c=2*Math.abs(this.defaultLeftAxisOptions.labels.x),b=c+(this.horiz?b.height:b.width),x(a.tickSize)?a.tickSize[0]=b:a.tickSize=[b])});l(f,"afterGetTitlePosition",function(a){var b=this.options;if(!0===(b&&r(b.grid)?b.grid:{}).enabled){var c=this.axisTitle,d=c&&c.getBBox().width,e=this.horiz,
h=this.left,q=this.top,g=this.width,k=this.height,m=b.title,b=this.opposite,p=this.offset,u=this.tickSize()||[0],f=m.x||0,l=m.y||0,n=v(m.margin,e?5:10),c=this.chart.renderer.fontMetrics(m.style&&m.style.fontSize,c).f,u=(e?q+k:h)+u[0]/2*(b?-1:1)*(e?1:-1)+(this.side===w.bottom?c:0);a.titlePosition.x=e?h-d/2-n+f:u+(b?g:0)+p+f;a.titlePosition.y=e?u-(b?k:0)+(b?c:-c)/2+p+l:q-n+l}});A(f.prototype,"unsquish",function(a){var b=this.options;return!0===(b&&r(b.grid)?b.grid:{}).enabled&&this.categories?this.tickInterval:
a.apply(this,Array.prototype.slice.call(arguments,1))});l(f,"afterSetOptions",function(a){var b=this.options;a=a.userOptions;var c,d=b&&r(b.grid)?b.grid:{};!0===d.enabled&&(c=z(!0,{className:"highcharts-grid-axis "+(a.className||""),dateTimeLabelFormats:{hour:{list:["%H:%M","%H"]},day:{list:["%A, %e. %B","%a, %e. %b","%E"]},week:{list:["Week %W","W%W"]},month:{list:["%B","%b","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"13px"}},margin:0,title:{text:null,reserveSpace:!1,rotation:0},
units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},a),"xAxis"===this.coll&&(t(a.linkedTo)&&!t(a.tickPixelInterval)&&(c.tickPixelInterval=350),t(a.tickPixelInterval)||!t(a.linkedTo)||t(a.tickPositioner)||t(a.tickInterval)||(c.tickPositioner=function(a,b){var d=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(d){var e,k,h,p,f=c.units;for(p=0;p<f.length;p++)if(f[p][0]===
d.unitName){e=p;break}if(f[e][1])return f[e+1]&&(h=f[e+1][0],k=(f[e+1][1]||[1])[0]),d=g.timeUnits[h],this.tickInterval=d*k,this.getTimeTicks({unitRange:d,count:k,unitName:h},a,b,this.options.startOfWeek)}})),z(!0,this.options,c),this.horiz&&(b.minPadding=v(a.minPadding,0),b.maxPadding=v(a.maxPadding,0)),y(b.grid.borderWidth)&&(b.tickWidth=b.lineWidth=d.borderWidth))});l(f,"afterSetAxisTranslation",function(){var a=this.options,b=a&&r(a.grid)?a.grid:{},c=this.tickPositions&&this.tickPositions.info,
d=this.userOptions.labels||{};this.horiz&&(!0===b.enabled&&this.series.forEach(function(a){a.options.pointRange=0}),c&&(!1===a.dateTimeLabelFormats[c.unitName].range||1<c.count)&&!t(d.align)&&(a.labels.align="left",t(d.x)||(a.labels.x=3)))});l(f,"trimTicks",function(){var a=this.options,b=a&&r(a.grid)?a.grid:{},c=this.categories,d=this.tickPositions,e=d[0],h=d[d.length-1],f=this.linkedParent&&this.linkedParent.min||this.min,g=this.linkedParent&&this.linkedParent.max||this.max,k=this.tickInterval;
!0!==b.enabled||c||!this.horiz&&!this.isLinked||((e>f||e<f&&e+k>f)&&!a.startOnTick&&(d[0]=f),(h<g||h>g&&h-k<g)&&!a.endOnTick&&(d[d.length-1]=g))});l(f,"afterRender",function(){var a=this.options,b=a&&r(a.grid)?a.grid:{},c,d,e,f,g,l,k=this.chart.renderer,m=this.horiz;if(!0===b.enabled&&(b=2*Math.abs(this.defaultLeftAxisOptions.labels.x),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),b=this.maxLabelDimensions.width+b,c=a.lineWidth,this.rightWall&&this.rightWall.destroy(),
d=this.axisGroup.getBBox(),this.isOuterAxis()&&this.axisLine&&(m&&(b=d.height-1),c))){d=this.getLinePath(c);g=d.indexOf("M")+1;l=d.indexOf("L")+1;e=d.indexOf("M")+2;f=d.indexOf("L")+2;if(this.side===w.top||this.side===w.left)b=-b;m?(d[e]+=b,d[f]+=b):(d[g]+=b,d[l]+=b);this.axisLineExtra?this.axisLineExtra.animate({d:d}):this.axisLineExtra=k.path(d).attr({stroke:a.lineColor,"stroke-width":c,zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup);this.axisLine[this.showAxis?"show":"hide"](!0)}});
l(f,"init",function(a){function b(){var a=c.options,b=25/11,d=c.chart.renderer.fontMetrics(a.labels.style.fontSize);a.labels||(a.labels={});a.labels.align=v(a.labels.align,"center");c.categories||(a.showLastLabel=!1);c.horiz&&(a.tickLength=e.cellHeight||d.h*b);c.labelRotation=0;a.labels.rotation=0}var c=this,d=c.chart,e=(a=a.userOptions)&&r(a.grid)?a.grid:{},h,q,n;if(e.enabled)if(t(e.borderColor)&&(a.tickColor=a.lineColor=e.borderColor),x(e.columns)){q=0;for(n=e.columns.length;n--;)h=z(a,e.columns[n],
{type:"category"}),delete h.grid.columns,h=new f(c.chart,h),h.isColumn=!0,h.columnIndex=q,A(h,"labelFormatter",function(a){var c=this.axis,b=c.tickPositions,d=this.value,e=d===b[0],b=d===b[b.length-1],f=g.find(c.series[0].options.data,function(a){return a[c.isXAxis?"x":"y"]===d});this.isFirst=e;this.isLast=b;this.point=f;return a.call(this)}),q++;l(this,"afterInit",function(){g.erase(d.axes,this);g.erase(d[c.coll],this)})}else l(this,"afterInit",b)})})(n)});
//# sourceMappingURL=grid-axis.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,988 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* GridAxis
*
* (c) 2016-2019 Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
* (c) 2016 Highsoft AS
* Authors: Lars A. V. Cabrera
*
* License: www.highcharts.com/license
*/
var addEvent = H.addEvent,
argsToArray = function (args) {
return Array.prototype.slice.call(args, 1);
},
dateFormat = H.dateFormat,
defined = H.defined,
isArray = H.isArray,
isNumber = H.isNumber,
isObject = function (x) {
// Always use strict mode
return H.isObject(x, true);
},
merge = H.merge,
pick = H.pick,
wrap = H.wrap,
Axis = H.Axis,
Tick = H.Tick;
/**
* Set grid options for the axis labels. Requires Highcharts Gantt.
*
* @since 6.2.0
* @product gantt
* @apioption xAxis.grid
*/
/**
* Enable grid on the axis labels. Defaults to true for Gantt charts.
*
* @type {boolean}
* @default true
* @since 6.2.0
* @product gantt
* @apioption xAxis.grid.enabled
*/
/**
* Set specific options for each column (or row for horizontal axes) in the
* grid. Each extra column/row is its own axis, and the axis options can be set
* here.
*
* @sample gantt/demo/left-axis-table
* Left axis as a table
*
* @type {Array<Highcharts.XAxisOptions>}
* @apioption xAxis.grid.columns
*/
/**
* Set border color for the label grid lines.
*
* @type {Highcharts.ColorString}
* @apioption xAxis.grid.borderColor
*/
/**
* Set border width of the label grid lines.
*
* @type {number}
* @default 1
* @apioption xAxis.grid.borderWidth
*/
/**
* Set cell height for grid axis labels. By default this is calculated from font
* size.
*
* @type {number}
* @apioption xAxis.grid.cellHeight
*/
// Enum for which side the axis is on.
// Maps to axis.side
var axisSide = {
top: 0,
right: 1,
bottom: 2,
left: 3,
0: 'top',
1: 'right',
2: 'bottom',
3: 'left'
};
/**
* Checks if an axis is a navigator axis.
*
* @private
* @function Highcharts.Axis#isNavigatorAxis
*
* @return {boolean}
* true if axis is found in axis.chart.navigator
*/
Axis.prototype.isNavigatorAxis = function () {
return /highcharts-navigator-[xy]axis/.test(this.options.className);
};
/**
* Checks if an axis is the outer axis in its dimension. Since
* axes are placed outwards in order, the axis with the highest
* index is the outermost axis.
*
* Example: If there are multiple x-axes at the top of the chart,
* this function returns true if the axis supplied is the last
* of the x-axes.
*
* @private
* @function Highcharts.Axis#isOuterAxis
*
* @return {boolean}
* true if the axis is the outermost axis in its dimension; false if not
*/
Axis.prototype.isOuterAxis = function () {
var axis = this,
chart = axis.chart,
thisIndex = -1,
isOuter = true;
chart.axes.forEach(function (otherAxis, index) {
if (otherAxis.side === axis.side && !otherAxis.isNavigatorAxis()) {
if (otherAxis === axis) {
// Get the index of the axis in question
thisIndex = index;
// Check thisIndex >= 0 in case thisIndex has
// not been found yet
} else if (thisIndex >= 0 && index > thisIndex) {
// There was an axis on the same side with a
// higher index.
isOuter = false;
}
}
});
// There were either no other axes on the same side,
// or the other axes were not farther from the chart
return isOuter;
};
/**
* Get the largest label width and height.
*
* @private
* @function Highcharts.Axis#getMaxLabelDimensions
*
* @param {Highcharts.Dictionary<Highcharts.Tick>} ticks
* All the ticks on one axis.
*
* @param {Array<number|string>} tickPositions
* All the tick positions on one axis.
*
* @return {object}
* object containing the properties height and width.
*/
Axis.prototype.getMaxLabelDimensions = function (ticks, tickPositions) {
var dimensions = {
width: 0,
height: 0
};
tickPositions.forEach(function (pos) {
var tick = ticks[pos],
tickHeight = 0,
tickWidth = 0,
label;
if (isObject(tick)) {
label = isObject(tick.label) ? tick.label : {};
// Find width and height of tick
tickHeight = label.getBBox ? label.getBBox().height : 0;
tickWidth = isNumber(label.textPxLength) ? label.textPxLength : 0;
// Update the result if width and/or height are larger
dimensions.height = Math.max(tickHeight, dimensions.height);
dimensions.width = Math.max(tickWidth, dimensions.width);
}
});
return dimensions;
};
// Add custom date formats
H.dateFormats = {
// Week number
W: function (timestamp) {
var d = new Date(timestamp),
yearStart,
weekNo;
d.setHours(0, 0, 0, 0);
d.setDate(d.getDate() - (d.getDay() || 7));
yearStart = new Date(d.getFullYear(), 0, 1);
weekNo = Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
return weekNo;
},
// First letter of the day of the week, e.g. 'M' for 'Monday'.
E: function (timestamp) {
return dateFormat('%a', timestamp, true).charAt(0);
}
};
addEvent(
Tick,
'afterGetLabelPosition',
/**
* Center tick labels in cells.
*
* @private
*/
function (e) {
var tick = this,
label = tick.label,
axis = tick.axis,
reversed = axis.reversed,
chart = axis.chart,
options = axis.options,
gridOptions = (
(options && isObject(options.grid)) ? options.grid : {}
),
labelOpts = axis.options.labels,
align = labelOpts.align,
// verticalAlign is currently not supported for axis.labels.
verticalAlign = 'middle', // labelOpts.verticalAlign,
side = axisSide[axis.side],
tickmarkOffset = e.tickmarkOffset,
tickPositions = axis.tickPositions,
tickPos = tick.pos - tickmarkOffset,
nextTickPos = (
isNumber(tickPositions[e.index + 1]) ?
tickPositions[e.index + 1] - tickmarkOffset :
axis.max + tickmarkOffset
),
tickSize = axis.tickSize('tick', true),
tickWidth = isArray(tickSize) ? tickSize[0] : 0,
crispCorr = tickSize && tickSize[1] / 2,
labelHeight,
lblMetrics,
lines,
bottom,
top,
left,
right;
// Only center tick labels in grid axes
if (gridOptions.enabled === true) {
// Calculate top and bottom positions of the cell.
if (side === 'top') {
bottom = axis.top + axis.offset;
top = bottom - tickWidth;
} else if (side === 'bottom') {
top = chart.chartHeight - axis.bottom + axis.offset;
bottom = top + tickWidth;
} else {
bottom = axis.top + axis.len - axis.translate(
reversed ? nextTickPos : tickPos
);
top = axis.top + axis.len - axis.translate(
reversed ? tickPos : nextTickPos
);
}
// Calculate left and right positions of the cell.
if (side === 'right') {
left = chart.chartWidth - axis.right + axis.offset;
right = left + tickWidth;
} else if (side === 'left') {
right = axis.left + axis.offset;
left = right - tickWidth;
} else {
left = Math.round(axis.left + axis.translate(
reversed ? nextTickPos : tickPos
)) - crispCorr;
right = Math.round(axis.left + axis.translate(
reversed ? tickPos : nextTickPos
)) - crispCorr;
}
tick.slotWidth = right - left;
// Calculate the positioning of the label based on alignment.
e.pos.x = (
align === 'left' ?
left :
align === 'right' ?
right :
left + ((right - left) / 2) // default to center
);
e.pos.y = (
verticalAlign === 'top' ?
top :
verticalAlign === 'bottom' ?
bottom :
top + ((bottom - top) / 2) // default to middle
);
lblMetrics = chart.renderer.fontMetrics(
labelOpts.style.fontSize,
label.element
);
labelHeight = label.getBBox().height;
// Adjustment to y position to align the label correctly.
// Would be better to have a setter or similar for this.
if (!labelOpts.useHTML) {
lines = Math.round(labelHeight / lblMetrics.h);
e.pos.y += (
// Center the label
// TODO: why does this actually center the label?
((lblMetrics.b - (lblMetrics.h - lblMetrics.f)) / 2) +
// Adjust for height of additional lines.
-(((lines - 1) * lblMetrics.h) / 2)
);
} else {
e.pos.y += (
// Readjust yCorr in htmlUpdateTransform
lblMetrics.b +
// Adjust for height of html label
-(labelHeight / 2)
);
}
e.pos.x += (axis.horiz && labelOpts.x || 0);
}
}
);
// Draw vertical axis ticks extra long to create cell floors and roofs.
// Overrides the tickLength for vertical axes.
addEvent(Axis, 'afterTickSize', function (e) {
var axis = this,
dimensions = axis.maxLabelDimensions,
options = axis.options,
gridOptions = (options && isObject(options.grid)) ? options.grid : {},
labelPadding,
distance;
if (gridOptions.enabled === true) {
labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
distance = labelPadding +
(axis.horiz ? dimensions.height : dimensions.width);
if (isArray(e.tickSize)) {
e.tickSize[0] = distance;
} else {
e.tickSize = [distance];
}
}
});
addEvent(Axis, 'afterGetTitlePosition', function (e) {
var axis = this,
options = axis.options,
gridOptions = (options && isObject(options.grid)) ? options.grid : {};
if (gridOptions.enabled === true) {
// compute anchor points for each of the title align options
var title = axis.axisTitle,
titleWidth = title && title.getBBox().width,
horiz = axis.horiz,
axisLeft = axis.left,
axisTop = axis.top,
axisWidth = axis.width,
axisHeight = axis.height,
axisTitleOptions = options.title,
opposite = axis.opposite,
offset = axis.offset,
tickSize = axis.tickSize() || [0],
xOption = axisTitleOptions.x || 0,
yOption = axisTitleOptions.y || 0,
titleMargin = pick(axisTitleOptions.margin, horiz ? 5 : 10),
titleFontSize = axis.chart.renderer.fontMetrics(
axisTitleOptions.style && axisTitleOptions.style.fontSize,
title
).f,
// TODO account for alignment
// the position in the perpendicular direction of the axis
offAxis = (horiz ? axisTop + axisHeight : axisLeft) +
(horiz ? 1 : -1) * // horizontal axis reverses the margin
(opposite ? -1 : 1) * // so does opposite axes
(tickSize[0] / 2) +
(axis.side === axisSide.bottom ? titleFontSize : 0);
e.titlePosition.x = horiz ?
axisLeft - titleWidth / 2 - titleMargin + xOption :
offAxis + (opposite ? axisWidth : 0) + offset + xOption;
e.titlePosition.y = horiz ?
(
offAxis -
(opposite ? axisHeight : 0) +
(opposite ? titleFontSize : -titleFontSize) / 2 +
offset +
yOption
) :
axisTop - titleMargin + yOption;
}
});
// Avoid altering tickInterval when reserving space.
wrap(Axis.prototype, 'unsquish', function (proceed) {
var axis = this,
options = axis.options,
gridOptions = (options && isObject(options.grid)) ? options.grid : {};
if (gridOptions.enabled === true && this.categories) {
return this.tickInterval;
}
return proceed.apply(this, argsToArray(arguments));
});
addEvent(
Axis,
'afterSetOptions',
/**
* Creates a left and right wall on horizontal axes:
*
* - Places leftmost tick at the start of the axis, to create a left wall
*
* - Ensures that the rightmost tick is at the end of the axis, to create a
* right wall.
*
* @private
* @function
*/
function (e) {
var options = this.options,
userOptions = e.userOptions,
gridAxisOptions,
gridOptions = (
(options && isObject(options.grid)) ? options.grid : {}
);
if (gridOptions.enabled === true) {
// Merge the user options into default grid axis options so that
// when a user option is set, it takes presedence.
gridAxisOptions = merge(true, {
className: (
'highcharts-grid-axis ' + (userOptions.className || '')
),
dateTimeLabelFormats: {
hour: {
list: ['%H:%M', '%H']
},
day: {
list: ['%A, %e. %B', '%a, %e. %b', '%E']
},
week: {
list: ['Week %W', 'W%W']
},
month: {
list: ['%B', '%b', '%o']
}
},
grid: {
borderWidth: 1
},
labels: {
padding: 2,
style: {
fontSize: '13px'
}
},
margin: 0,
title: {
text: null,
reserveSpace: false,
rotation: 0
},
// In a grid axis, only allow one unit of certain types, for
// example we shouln't have one grid cell spanning two days.
units: [[
'millisecond', // unit name
[1, 10, 100]
], [
'second',
[1, 10]
], [
'minute',
[1, 5, 15]
], [
'hour',
[1, 6]
], [
'day',
[1]
], [
'week',
[1]
], [
'month',
[1]
], [
'year',
null
]]
}, userOptions);
// X-axis specific options
if (this.coll === 'xAxis') {
// For linked axes, tickPixelInterval is used only if the
// tickPositioner below doesn't run or returns undefined (like
// multiple years)
if (
defined(userOptions.linkedTo) &&
!defined(userOptions.tickPixelInterval)
) {
gridAxisOptions.tickPixelInterval = 350;
}
// For the secondary grid axis, use the primary axis' tick
// intervals and return ticks one level higher.
if (
// Check for tick pixel interval in options
!defined(userOptions.tickPixelInterval) &&
// Only for linked axes
defined(userOptions.linkedTo) &&
!defined(userOptions.tickPositioner) &&
!defined(userOptions.tickInterval)
) {
gridAxisOptions.tickPositioner = function (min, max) {
var parentInfo = (
this.linkedParent &&
this.linkedParent.tickPositions &&
this.linkedParent.tickPositions.info
);
if (parentInfo) {
var unitIdx,
count,
unitName,
i,
units = gridAxisOptions.units,
unitRange;
for (i = 0; i < units.length; i++) {
if (units[i][0] === parentInfo.unitName) {
unitIdx = i;
break;
}
}
// Spanning multiple years, go default
if (!units[unitIdx][1]) {
return;
}
// Get the first allowed count on the next unit.
if (units[unitIdx + 1]) {
unitName = units[unitIdx + 1][0];
count = (units[unitIdx + 1][1] || [1])[0];
}
unitRange = H.timeUnits[unitName];
this.tickInterval = unitRange * count;
return this.getTimeTicks(
{
unitRange: unitRange,
count: count,
unitName: unitName
},
min,
max,
this.options.startOfWeek
);
}
};
}
}
// Now merge the combined options into the axis options
merge(true, this.options, gridAxisOptions);
if (this.horiz) {
/* _________________________
Make this: ___|_____|_____|_____|__|
^ ^
_________________________
Into this: |_____|_____|_____|_____|
^ ^ */
options.minPadding = pick(userOptions.minPadding, 0);
options.maxPadding = pick(userOptions.maxPadding, 0);
}
// If borderWidth is set, then use its value for tick and line
// width.
if (isNumber(options.grid.borderWidth)) {
options.tickWidth = options.lineWidth = gridOptions.borderWidth;
}
}
}
);
addEvent(
Axis,
'afterSetAxisTranslation',
function () {
var axis = this,
options = axis.options,
gridOptions = (
(options && isObject(options.grid)) ? options.grid : {}
),
tickInfo = this.tickPositions && this.tickPositions.info,
userLabels = this.userOptions.labels || {};
if (this.horiz) {
if (gridOptions.enabled === true) {
axis.series.forEach(function (series) {
series.options.pointRange = 0;
});
}
// Lower level time ticks, like hours or minutes, represent points
// in time and not ranges. These should be aligned left in the grid
// cell by default. The same applies to years of higher order.
if (
tickInfo &&
(
options.dateTimeLabelFormats[tickInfo.unitName]
.range === false ||
tickInfo.count > 1 // years
) &&
!defined(userLabels.align)
) {
options.labels.align = 'left';
if (!defined(userLabels.x)) {
options.labels.x = 3;
}
}
}
}
);
// @todo Does this function do what the drawing says? Seems to affect ticks and
// not the labels directly?
addEvent(
Axis,
'trimTicks',
/**
* Makes tick labels which are usually ignored in a linked axis displayed if
* they are within range of linkedParent.min.
* ```
* _____________________________
* | | | | |
* Make this: | | 2 | 3 | 4 |
* |___|_______|_______|_______|
* ^
* _____________________________
* | | | | |
* Into this: | 1 | 2 | 3 | 4 |
* |___|_______|_______|_______|
* ^
* ```
*
* @private
*/
function () {
var axis = this,
options = axis.options,
gridOptions = (
(options && isObject(options.grid)) ? options.grid : {}
),
categoryAxis = axis.categories,
tickPositions = axis.tickPositions,
firstPos = tickPositions[0],
lastPos = tickPositions[tickPositions.length - 1],
linkedMin = axis.linkedParent && axis.linkedParent.min,
linkedMax = axis.linkedParent && axis.linkedParent.max,
min = linkedMin || axis.min,
max = linkedMax || axis.max,
tickInterval = axis.tickInterval,
moreThanMin = firstPos > min,
lessThanMax = lastPos < max,
endMoreThanMin = firstPos < min && firstPos + tickInterval > min,
startLessThanMax = lastPos > max && lastPos - tickInterval < max;
if (
gridOptions.enabled === true &&
!categoryAxis &&
(axis.horiz || axis.isLinked)
) {
if ((moreThanMin || endMoreThanMin) && !options.startOnTick) {
tickPositions[0] = min;
}
if ((lessThanMax || startLessThanMax) && !options.endOnTick) {
tickPositions[tickPositions.length - 1] = max;
}
}
}
);
addEvent(
Axis,
'afterRender',
/**
* Draw an extra line on the far side of the outermost axis,
* creating floor/roof/wall of a grid. And some padding.
* ```
* Make this:
* (axis.min) __________________________ (axis.max)
* | | | | |
* Into this:
* (axis.min) __________________________ (axis.max)
* ___|____|____|____|____|__
* ```
*
* @private
* @function
*
* @param {Function} proceed
* the original function
*/
function () {
var axis = this,
options = axis.options,
gridOptions = ((
options && isObject(options.grid)) ? options.grid : {}
),
labelPadding,
distance,
lineWidth,
linePath,
yStartIndex,
yEndIndex,
xStartIndex,
xEndIndex,
renderer = axis.chart.renderer,
horiz = axis.horiz,
axisGroupBox;
if (gridOptions.enabled === true) {
// @todo acutual label padding (top, bottom, left, right)
// Label padding is needed to figure out where to draw the outer
// line.
labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
axis.maxLabelDimensions = axis.getMaxLabelDimensions(
axis.ticks,
axis.tickPositions
);
distance = axis.maxLabelDimensions.width + labelPadding;
lineWidth = options.lineWidth;
// Remove right wall before rendering if updating
if (axis.rightWall) {
axis.rightWall.destroy();
}
axisGroupBox = axis.axisGroup.getBBox();
/*
Draw an extra axis line on outer axes
>
Make this: |______|______|______|___
> _________________________
Into this: |______|______|______|__|
*/
if (axis.isOuterAxis() && axis.axisLine) {
if (horiz) {
// -1 to avoid adding distance each time the chart updates
distance = axisGroupBox.height - 1;
}
if (lineWidth) {
linePath = axis.getLinePath(lineWidth);
xStartIndex = linePath.indexOf('M') + 1;
xEndIndex = linePath.indexOf('L') + 1;
yStartIndex = linePath.indexOf('M') + 2;
yEndIndex = linePath.indexOf('L') + 2;
// Negate distance if top or left axis
if (axis.side === axisSide.top ||
axis.side === axisSide.left
) {
distance = -distance;
}
// If axis is horizontal, reposition line path vertically
if (horiz) {
linePath[yStartIndex] = (
linePath[yStartIndex] + distance
);
linePath[yEndIndex] = linePath[yEndIndex] + distance;
} else {
// If axis is vertical, reposition line path
// horizontally
linePath[xStartIndex] = (
linePath[xStartIndex] + distance
);
linePath[xEndIndex] = linePath[xEndIndex] + distance;
}
if (!axis.axisLineExtra) {
axis.axisLineExtra = renderer.path(linePath)
.attr({
stroke: options.lineColor,
'stroke-width': lineWidth,
zIndex: 7
})
.addClass('highcharts-axis-line')
.add(axis.axisGroup);
} else {
axis.axisLineExtra.animate({
d: linePath
});
}
// show or hide the line depending on options.showEmpty
axis.axisLine[axis.showAxis ? 'show' : 'hide'](true);
}
}
}
}
);
// Wraps axis init to draw cell walls on vertical axes.
addEvent(Axis, 'init', function (e) {
var axis = this,
chart = axis.chart,
userOptions = e.userOptions,
gridOptions = (
(userOptions && isObject(userOptions.grid)) ?
userOptions.grid :
{}
),
columnOptions,
column,
columnIndex,
i;
function applyGridOptions() {
var options = axis.options,
// TODO: Consider using cell margins defined in % of font size?
// 25 is optimal height for default fontSize (11px)
// 25 / 11 ≈ 2.28
fontSizeToCellHeightRatio = 25 / 11,
fontSize = options.labels.style.fontSize,
fontMetrics = axis.chart.renderer.fontMetrics(fontSize);
// Center-align by default
if (!options.labels) {
options.labels = {};
}
options.labels.align = pick(options.labels.align, 'center');
// @todo: Check against tickLabelPlacement between/on etc
/* Prevents adding the last tick label if the axis is not a category
axis.
Since numeric labels are normally placed at starts and ends of a
range of value, and this module makes the label point at the value,
an "extra" label would appear. */
if (!axis.categories) {
options.showLastLabel = false;
}
// Make tick marks taller, creating cell walls of a grid. Use cellHeight
// axis option if set
if (axis.horiz) {
options.tickLength = gridOptions.cellHeight ||
fontMetrics.h * fontSizeToCellHeightRatio;
}
// Prevents rotation of labels when squished, as rotating them would not
// help.
axis.labelRotation = 0;
options.labels.rotation = 0;
}
if (gridOptions.enabled) {
if (defined(gridOptions.borderColor)) {
userOptions.tickColor =
userOptions.lineColor = gridOptions.borderColor;
}
// Handle columns, each column is a grid axis
if (isArray(gridOptions.columns)) {
columnIndex = 0;
i = gridOptions.columns.length;
while (i--) {
columnOptions = merge(
userOptions,
gridOptions.columns[i],
{
// Force to behave like category axis
type: 'category'
}
);
delete columnOptions.grid.columns; // Prevent recursion
column = new Axis(axis.chart, columnOptions);
column.isColumn = true;
column.columnIndex = columnIndex;
wrap(column, 'labelFormatter', function (proceed) {
var axis = this.axis,
tickPos = axis.tickPositions,
value = this.value,
series = axis.series[0],
isFirst = value === tickPos[0],
isLast = value === tickPos[tickPos.length - 1],
point = H.find(series.options.data, function (p) {
return p[axis.isXAxis ? 'x' : 'y'] === value;
});
// Make additional properties available for the formatter
this.isFirst = isFirst;
this.isLast = isLast;
this.point = point;
// Call original labelFormatter
return proceed.call(this);
});
columnIndex++;
}
// This axis should not be shown, instead the column axes take over
addEvent(this, 'afterInit', function () {
H.erase(chart.axes, this);
H.erase(chart[axis.coll], this);
});
} else {
addEvent(this, 'afterInit', applyGridOptions);
}
}
});
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,28 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
(c) 2009-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(h){"object"===typeof module&&module.exports?(h["default"]=h,module.exports=h):"function"===typeof define&&define.amd?define(function(){return h}):h("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(h){(function(b){var h=b.addEvent,k=b.Axis,q=b.Chart,l=b.color,n,r=b.extend,p=b.isNumber,e=b.Legend,c=b.LegendSymbolMixin,v=b.noop,u=b.merge,t=b.pick;b.ColorAxis||(n=b.ColorAxis=function(){this.init.apply(this,arguments)},r(n.prototype,k.prototype),r(n.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(k.prototype.keepProps),init:function(a,d){var f="vertical"!==a.options.legend.layout,g;this.coll="colorAxis";g=u(this.defaultColorAxisOptions,
{side:f?2:1,reversed:!f},d,{opposite:!f,showEmpty:!1,title:null,visible:a.options.legend.enabled});k.prototype.init.call(this,a,g);d.dataClasses&&this.initDataClasses(d);this.initStops();this.horiz=f;this.zoomEnabled=!1;this.defaultLegendLength=200},initDataClasses:function(a){var d=this.chart,f,g=0,m=d.options.chart.colorCount,b=this.options,e=a.dataClasses.length;this.dataClasses=f=[];this.legendItems=[];a.dataClasses.forEach(function(a,c){a=u(a);f.push(a);if(d.styledMode||!a.color)"category"===
b.dataClassColor?(d.styledMode||(c=d.options.colors,m=c.length,a.color=c[g]),a.colorIndex=g,g++,g===m&&(g=0)):a.color=l(b.minColor).tweenTo(l(b.maxColor),2>e?.5:c/(e-1))})},setTickPositions:function(){if(!this.dataClasses)return k.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=l(a[1])})},setOptions:function(a){k.prototype.setOptions.call(this,a);this.options.crosshair=
this.options.marker},setAxisSize:function(){var a=this.legendSymbol,d=this.chart,f=d.options.legend||{},g,m;a?(this.left=f=a.attr("x"),this.top=g=a.attr("y"),this.width=m=a.attr("width"),this.height=a=a.attr("height"),this.right=d.chartWidth-f-m,this.bottom=d.chartHeight-g-a,this.len=this.horiz?m:a,this.pos=this.horiz?f:g):this.len=(this.horiz?f.symbolWidth:f.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,d){var f=this.stops,g,m,b=this.dataClasses,c,e;if(b)for(e=b.length;e--;){if(c=b[e],g=c.from,f=c.to,(void 0===g||a>=g)&&(void 0===f||a<=f)){m=c.color;d&&(d.dataClass=e,d.colorIndex=c.colorIndex);break}}else{a=this.normalizedValue(a);for(e=f.length;e--&&!(a>f[e][0]););g=f[e]||f[e+1];f=f[e+1]||g;a=1-(f[0]-a)/(f[0]-g[0]||1);m=g.color.tweenTo(f.color,a)}return m},getOffset:function(){var a=this.legendGroup,d=this.chart.axisOffset[this.side];a&&(this.axisParent=a,k.prototype.getOffset.call(this),
this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=d)},setLegendColor:function(){var a,d=this.reversed;a=d?1:0;d=d?0:1;a=this.horiz?[a,0,d,0]:[0,d,0,a];this.legendColor={linearGradient:{x1:a[0],y1:a[1],x2:a[2],y2:a[3]},stops:this.stops}},drawLegendSymbol:function(a,d){var f=a.padding,g=a.options,e=this.horiz,c=t(g.symbolWidth,e?this.defaultLegendLength:12),b=t(g.symbolHeight,e?12:this.defaultLegendLength),l=t(g.labelPadding,e?16:30),g=t(g.itemDistance,
10);this.setLegendColor();d.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,c,b).attr({zIndex:1}).add(d.legendGroup);this.legendItemWidth=c+f+(e?g:l);this.legendItemHeight=b+f+(e?l:0)},setState:function(a){this.series.forEach(function(d){d.setState(a)})},visible:!0,setVisible:v,getSeriesExtremes:function(){var a=this.series,d=a.length;this.dataMin=Infinity;for(this.dataMax=-Infinity;d--;)a[d].getExtremes(),void 0!==a[d].valueMin&&(this.dataMin=Math.min(this.dataMin,a[d].valueMin),this.dataMax=
Math.max(this.dataMax,a[d].valueMax))},drawCrosshair:function(a,d){var f=d&&d.plotX,e=d&&d.plotY,c,b=this.pos,l=this.len;d&&(c=this.toPixels(d[d.series.colorKey]),c<b?c=b-2:c>b+l&&(c=b+l+2),d.plotX=c,d.plotY=this.len-c,k.prototype.drawCrosshair.call(this,a,d),d.plotX=f,d.plotY=e,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,d,f,e,c){return p(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"]:k.prototype.getPlotLinePath.call(this,a,d,f,e)},update:function(a,d){var c=this.chart,e=c.legend;this.series.forEach(function(a){a.isDirtyData=!0});a.dataClasses&&e.allItems&&(e.allItems.forEach(function(a){a.isDataClass&&a.legendGroup&&a.legendGroup.destroy()}),c.isDirtyLegend=!0);c.options[this.coll]=u(this.userOptions,a);k.prototype.update.call(this,
a,d);this.legendItem&&(this.setLegendColor(),e.colorizeItem(this,!0))},remove:function(){this.legendItem&&this.chart.legend.destroyItem(this);k.prototype.remove.call(this)},getDataClassLegendSymbols:function(){var a=this,d=this.chart,e=this.legendItems,g=d.options.legend,l=g.valueDecimals,n=g.valueSuffix||"",h;e.length||this.dataClasses.forEach(function(f,g){var k=!0,m=f.from,p=f.to;h="";void 0===m?h="\x3c ":void 0===p&&(h="\x3e ");void 0!==m&&(h+=b.numberFormat(m,l)+n);void 0!==m&&void 0!==p&&(h+=
" - ");void 0!==p&&(h+=b.numberFormat(p,l)+n);e.push(r({chart:d,name:h,options:{},drawLegendSymbol:c.drawRectangle,visible:!0,setState:v,isDataClass:!0,setVisible:function(){k=this.visible=!k;a.series.forEach(function(a){a.points.forEach(function(a){a.dataClass===g&&a.setVisible(k)})});d.legend.colorizeItem(this,k)}},f))});return e},name:""}),["fill","stroke"].forEach(function(a){b.Fx.prototype[a+"Setter"]=function(){this.elem.attr(a,l(this.start).tweenTo(l(this.end),this.pos),null,!0)}}),h(q,"afterGetAxes",
function(){var a=this.options.colorAxis;this.colorAxis=[];a&&new n(this,a)}),h(e,"afterGetAllItems",function(a){var d=[],c=this.chart.colorAxis[0];c&&c.options&&c.options.showInLegend&&(c.options.dataClasses?d=c.getDataClassLegendSymbols():d.push(c),c.series.forEach(function(c){b.erase(a.allItems,c)}));for(c=d.length;c--;)a.allItems.unshift(d[c])}),h(e,"afterColorizeItem",function(a){a.visible&&a.item.legendColor&&a.item.legendSymbol.attr({fill:a.item.legendColor})}),h(e,"afterUpdate",function(a,
c,e){this.chart.colorAxis[0]&&this.chart.colorAxis[0].update({},e)}))})(h);(function(b){var h=b.defined,k=b.noop,q=b.seriesTypes;b.colorPointMixin={isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value},setVisible:function(b){var l=this,h=b?"show":"hide";l.visible=!!b;["graphic","dataLabel"].forEach(function(b){if(l[b])l[b][h]()})},setState:function(l){b.Point.prototype.setState.call(this,l);this.graphic&&this.graphic.attr({zIndex:"hover"===l?1:0})}};b.colorSeriesMixin=
{pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],optionalAxis:"colorAxis",trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:k,parallelArrays:["x","y","value"],colorKey:"value",pointAttribs:q.column.prototype.pointAttribs,translateColors:function(){var b=this,h=this.options.nullColor,k=this.colorAxis,p=this.colorKey;this.data.forEach(function(e){var c=e[p];if(c=e.options.color||(e.isNull?h:k&&void 0!==c?k.toColor(c,e):e.color||b.color))e.color=c})},colorAttribs:function(b){var l=
{};h(b.color)&&(l[this.colorProp||"fill"]=b.color);return l}}})(h);(function(b){var h=b.colorPointMixin,k=b.merge,q=b.noop,l=b.pick,n=b.Series,r=b.seriesType,p=b.seriesTypes;r("heatmap","scatter",{animation:!1,borderWidth:0,nullColor:"#f7f7f7",dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},marker:null,pointRange:null,tooltip:{pointFormat:"{point.x}, {point.y}: {point.value}\x3cbr/\x3e"},states:{hover:{halo:!1,brightness:.2}}},
k(b.colorSeriesMixin,{pointArrayMap:["y","value"],hasPointSpecificOptions:!0,getExtremesFromAll:!0,directTouch:!0,init:function(){var e;p.scatter.prototype.init.apply(this,arguments);e=this.options;e.pointRange=l(e.pointRange,e.colsize||1);this.yAxis.axisPointRange=e.rowsize||1},translate:function(){var e=this.options,c=this.xAxis,b=this.yAxis,h=e.pointPadding||0,k=function(a,c,b){return Math.min(Math.max(c,a),b)},a=this.pointPlacementToXValue();this.generatePoints();this.points.forEach(function(d){var f=
(e.colsize||1)/2,g=(e.rowsize||1)/2,m=k(Math.round(c.len-c.translate(d.x-f,0,1,0,1,-a)),-c.len,2*c.len),f=k(Math.round(c.len-c.translate(d.x+f,0,1,0,1,-a)),-c.len,2*c.len),p=k(Math.round(b.translate(d.y-g,0,1,0,1)),-b.len,2*b.len),g=k(Math.round(b.translate(d.y+g,0,1,0,1)),-b.len,2*b.len),n=l(d.pointPadding,h);d.plotX=d.clientX=(m+f)/2;d.plotY=(p+g)/2;d.shapeType="rect";d.shapeArgs={x:Math.min(m,f)+n,y:Math.min(p,g)+n,width:Math.abs(f-m)-2*n,height:Math.abs(g-p)-2*n}});this.translateColors()},drawPoints:function(){var b=
this.chart.styledMode?"css":"attr";p.column.prototype.drawPoints.call(this);this.points.forEach(function(c){c.graphic[b](this.colorAttribs(c))},this)},getValidPoints:function(b,c){return n.prototype.getValidPoints.call(this,b,c,!0)},animate:q,getBox:q,drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,alignDataLabel:p.column.prototype.alignDataLabel,getExtremes:function(){n.prototype.getExtremes.call(this,this.valueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;n.prototype.getExtremes.call(this)}}),
b.extend({haloPath:function(b){if(!b)return[];var c=this.shapeArgs;return["M",c.x-b,c.y-b,"L",c.x-b,c.y+c.height+b,c.x+c.width+b,c.y+c.height+b,c.x+c.width+b,c.y-b,"Z"]}},h))})(h)});
//# sourceMappingURL=heatmap.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,16 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
(c) 2010-2019 Highsoft AS
Author: Sebastian Domas
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define(function(){return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){var g=function(a){var b=a.Series,e=a.addEvent;return{init:function(){b.prototype.init.apply(this,arguments);this.initialised=!1;this.baseSeries=null;this.eventRemovers=[];this.addEvents()},setDerivedData:a.noop,setBaseSeries:function(){var k=this.chart,a=this.options.baseSeries;
this.baseSeries=a&&(k.series[a]||k.get(a))||null},addEvents:function(){var a=this,b;b=e(this.chart,"afterLinkSeries",function(){a.setBaseSeries();a.baseSeries&&!a.initialised&&(a.setDerivedData(),a.addBaseSeriesEvents(),a.initialised=!0)});this.eventRemovers.push(b)},addBaseSeriesEvents:function(){var a=this,b,d;b=e(a.baseSeries,"updatedData",function(){a.setDerivedData()});d=e(a.baseSeries,"destroy",function(){a.baseSeries=null;a.initialised=!1});a.eventRemovers.push(b,d)},destroy:function(){this.eventRemovers.forEach(function(a){a()});
b.prototype.destroy.apply(this,arguments)}}}(b);(function(a,b){function e(a){return function(c){for(var b=1;a[b]<=c;)b++;return a[--b]}}var k=a.objectEach,h=a.seriesType,d=a.correctFloat,q=a.isNumber,p=a.arrayMax,r=a.arrayMin;a=a.merge;var f={"square-root":function(a){return Math.round(Math.sqrt(a.options.data.length))},sturges:function(a){return Math.ceil(Math.log(a.options.data.length)*Math.LOG2E)},rice:function(a){return Math.ceil(2*Math.pow(a.options.data.length,1/3))}};h("histogram","column",
{binsNumber:"square-root",binWidth:void 0,pointPadding:0,groupPadding:0,grouping:!1,pointPlacement:"between",tooltip:{headerFormat:"",pointFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.x} - {point.x2}\x3c/span\x3e\x3cbr/\x3e\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name} \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e'}},a(b,{setDerivedData:function(){var a=this.derivedData(this.baseSeries.yData,this.binsNumber(),this.options.binWidth);this.setData(a,!1)},derivedData:function(a,
b,f){var c=p(a),l=r(a),n=[],m={},h=[],g;f=this.binWidth=d(q(f)?f||1:(c-l)/b);for(b=l;b<c;b=d(b+f))n.push(b),m[b]=0;0!==m[l]&&(n.push(d(l)),m[d(l)]=0);g=e(n.map(function(a){return parseFloat(a)}));a.forEach(function(a){a=d(g(a));m[a]++});k(m,function(a,b){h.push({x:Number(b),y:a,x2:d(Number(b)+f)})});h.sort(function(a,b){return a.x-b.x});return h},binsNumber:function(){var a=this.options.binsNumber,b=f[a]||"function"===typeof a&&a;return Math.ceil(b&&b(this.baseSeries)||(q(a)?a:f["square-root"](this.baseSeries)))}}))})(b,
g);(function(a,b){function e(a){var b=a.length;a=a.reduce(function(a,b){return a+b},0);return 0<b&&a/b}function k(a,b){var c=a.length;b=p(b)?b:e(a);a=a.reduce(function(a,c){c-=b;return a+c*c},0);return 1<c&&Math.sqrt(a/(c-1))}function h(a,b,c){a-=b;return Math.exp(-(a*a)/(2*c*c))/(c*Math.sqrt(2*Math.PI))}var d=a.seriesType,g=a.correctFloat,p=a.isNumber;a=a.merge;d("bellcurve","areaspline",{intervals:3,pointsInInterval:3,marker:{enabled:!1}},a(b,{setMean:function(){this.mean=g(e(this.baseSeries.yData))},
setStandardDeviation:function(){this.standardDeviation=g(k(this.baseSeries.yData,this.mean))},setDerivedData:function(){1<this.baseSeries.yData.length&&(this.setMean(),this.setStandardDeviation(),this.setData(this.derivedData(this.mean,this.standardDeviation),!1))},derivedData:function(a,b){var c=this.options.intervals,d=this.options.pointsInInterval,e=a-c*b,c=c*d*2+1,d=b/d,g=[],f;for(f=0;f<c;f++)g.push([e,h(e,a,b)]),e+=d;return g}}))})(b,g)});
//# sourceMappingURL=histogram-bellcurve.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,570 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
*
* (c) 2010-2019 Highsoft AS
* Author: Sebastian Domas
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var derivedSeriesMixin = (function (H) {
var Series = H.Series,
addEvent = H.addEvent,
noop = H.noop;
/* ************************************************************************** *
*
* DERIVED SERIES MIXIN
*
* ************************************************************************** */
/**
* Provides methods for auto setting/updating series data based on the based
* series data.
*
* @private
* @mixin derivedSeriesMixin
*/
var derivedSeriesMixin = {
/**
* Initialise series
*
* @private
* @function derivedSeriesMixin.init
*/
init: function () {
Series.prototype.init.apply(this, arguments);
this.initialised = false;
this.baseSeries = null;
this.eventRemovers = [];
this.addEvents();
},
/**
* Method to be implemented - inside the method the series has already
* access to the base series via m `this.baseSeries` and the bases data is
* initialised. It should return data in the format accepted by
* `Series.setData()` method
*
* @private
* @function derivedSeriesMixin.setDerivedData
*
* @return {Array<*>}
* An array of data
*/
setDerivedData: noop,
/**
* Sets base series for the series
*
* @private
* @function derivedSeriesMixin.setBaseSeries
*/
setBaseSeries: function () {
var chart = this.chart,
baseSeriesOptions = this.options.baseSeries,
baseSeries =
baseSeriesOptions &&
(chart.series[baseSeriesOptions] || chart.get(baseSeriesOptions));
this.baseSeries = baseSeries || null;
},
/**
* Adds events for the series
*
* @private
* @function derivedSeriesMixin.addEvents
*/
addEvents: function () {
var derivedSeries = this,
chartSeriesLinked;
chartSeriesLinked = addEvent(
this.chart,
'afterLinkSeries',
function () {
derivedSeries.setBaseSeries();
if (derivedSeries.baseSeries && !derivedSeries.initialised) {
derivedSeries.setDerivedData();
derivedSeries.addBaseSeriesEvents();
derivedSeries.initialised = true;
}
}
);
this.eventRemovers.push(
chartSeriesLinked
);
},
/**
* Adds events to the base series - it required for recalculating the data
* in the series if the base series is updated / removed / etc.
*
* @private
* @function derivedSeriesMixin.addBaseSeriesEvents
*/
addBaseSeriesEvents: function () {
var derivedSeries = this,
updatedDataRemover,
destroyRemover;
updatedDataRemover = addEvent(
derivedSeries.baseSeries,
'updatedData',
function () {
derivedSeries.setDerivedData();
}
);
destroyRemover = addEvent(
derivedSeries.baseSeries,
'destroy',
function () {
derivedSeries.baseSeries = null;
derivedSeries.initialised = false;
}
);
derivedSeries.eventRemovers.push(
updatedDataRemover,
destroyRemover
);
},
/**
* Destroys the series
*
* @private
* @function derivedSeriesMixin.destroy
*/
destroy: function () {
this.eventRemovers.forEach(function (remover) {
remover();
});
Series.prototype.destroy.apply(this, arguments);
}
};
return derivedSeriesMixin;
}(Highcharts));
(function (H, derivedSeriesMixin) {
var objectEach = H.objectEach,
seriesType = H.seriesType,
correctFloat = H.correctFloat,
isNumber = H.isNumber,
arrayMax = H.arrayMax,
arrayMin = H.arrayMin,
merge = H.merge;
/* ***************************************************************************
*
* HISTOGRAM
*
**************************************************************************** */
/**
* A dictionary with formulas for calculating number of bins based on the
* base series
**/
var binsNumberFormulas = {
'square-root': function (baseSeries) {
return Math.round(Math.sqrt(baseSeries.options.data.length));
},
'sturges': function (baseSeries) {
return Math.ceil(Math.log(baseSeries.options.data.length) * Math.LOG2E);
},
'rice': function (baseSeries) {
return Math.ceil(2 * Math.pow(baseSeries.options.data.length, 1 / 3));
}
};
/**
* Returns a function for mapping number to the closed (right opened) bins
*
* @param {number} binWidth - width of the bin
* @returns {function}
**/
function fitToBinLeftClosed(bins) {
return function (y) {
var i = 1;
while (bins[i] <= y) {
i++;
}
return bins[--i];
};
}
/**
* Histogram class
*
* @constructor seriesTypes.histogram
* @augments seriesTypes.column
* @mixes DerivedSeriesMixin
**/
/**
* A histogram is a column series which represents the distribution of the data
* set in the base series. Histogram splits data into bins and shows their
* frequencies.
*
* @product highcharts
* @sample {highcharts} highcharts/demo/histogram/ Histogram
* @since 6.0.0
* @extends plotOptions.column
* @excluding boostThreshold, pointInterval, pointIntervalUnit, stacking
* @optionparent plotOptions.histogram
**/
seriesType('histogram', 'column', {
/**
* A preferable number of bins. It is a suggestion, so a histogram may have
* a different number of bins. By default it is set to the square root
* of the base series' data length. Available options are: `square-root`,
* `sturges`, `rice`. You can also define a function which takes a
* `baseSeries` as a parameter and should return a positive integer.
*
* @type {String|Number|Function}
* @validvalue ["square-root", "sturges", "rice"]
*/
binsNumber: 'square-root',
/**
* Width of each bin. By default the bin's width is calculated as
* `(max - min) / number of bins`. This option takes precedence over
* [binsNumber](#plotOptions.histogram.binsNumber).
*
* @type {Number}
*/
binWidth: undefined,
pointPadding: 0,
groupPadding: 0,
grouping: false,
pointPlacement: 'between',
tooltip: {
headerFormat: '',
pointFormat: '<span style="font-size: 10px">{point.x} - {point.x2}' +
'</span><br/>' +
'<span style="color:{point.color}">\u25CF</span>' +
' {series.name} <b>{point.y}</b><br/>'
}
}, merge(derivedSeriesMixin, {
setDerivedData: function () {
var data = this.derivedData(
this.baseSeries.yData,
this.binsNumber(),
this.options.binWidth
);
this.setData(data, false);
},
derivedData: function (baseData, binsNumber, binWidth) {
var max = arrayMax(baseData),
min = arrayMin(baseData),
frequencies = [],
bins = {},
data = [],
x,
fitToBin;
binWidth = this.binWidth = correctFloat(
isNumber(binWidth) ?
(binWidth || 1) :
(max - min) / binsNumber
);
// If binWidth is 0 then max and min are equaled,
// increment the x with some positive value to quit the loop
for (x = min; x < max; x = correctFloat(x + binWidth)) {
frequencies.push(x);
bins[x] = 0;
}
if (bins[min] !== 0) {
frequencies.push(correctFloat(min));
bins[correctFloat(min)] = 0;
}
fitToBin = fitToBinLeftClosed(
frequencies.map(function (elem) {
return parseFloat(elem);
})
);
baseData.forEach(function (y) {
var x = correctFloat(fitToBin(y));
bins[x]++;
});
objectEach(bins, function (frequency, x) {
data.push({
x: Number(x),
y: frequency,
x2: correctFloat(Number(x) + binWidth)
});
});
data.sort(function (a, b) {
return a.x - b.x;
});
return data;
},
binsNumber: function () {
var binsNumberOption = this.options.binsNumber;
var binsNumber = binsNumberFormulas[binsNumberOption] ||
// #7457
(typeof binsNumberOption === 'function' && binsNumberOption);
return Math.ceil(
(binsNumber && binsNumber(this.baseSeries)) ||
(
isNumber(binsNumberOption) ?
binsNumberOption :
binsNumberFormulas['square-root'](this.baseSeries)
)
);
}
}));
/**
* A `histogram` series. If the [type](#series.histogram.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* @type {Object}
* @since 6.0.0
* @extends series,plotOptions.histogram
* @excluding dataParser,dataURL,data
* @product highcharts
* @apioption series.histogram
*/
/**
* An integer identifying the index to use for the base series, or a string
* representing the id of the series.
*
* @type {Number|String}
* @default undefined
* @apioption series.histogram.baseSeries
*/
/**
* An array of data points for the series. For the `histogram` series type,
* points are calculated dynamically. See
* [histogram.baseSeries](#series.histogram.baseSeries).
*
* @type {Array<Object|Array>}
* @since 6.0.0
* @extends series.column.data
* @product highcharts
* @apioption series.histogram.data
*/
}(Highcharts, derivedSeriesMixin));
(function (H, derivedSeriesMixin) {
/* *
* (c) 2010-2019 Highsoft AS
*
* Author: Sebastian Domas
*
* License: www.highcharts.com/license
*/
var seriesType = H.seriesType,
correctFloat = H.correctFloat,
isNumber = H.isNumber,
merge = H.merge;
/* ************************************************************************** *
* BELL CURVE *
* ************************************************************************** */
function mean(data) {
var length = data.length,
sum = data.reduce(function (sum, value) {
return (sum += value);
}, 0);
return length > 0 && sum / length;
}
function standardDeviation(data, average) {
var len = data.length,
sum;
average = isNumber(average) ? average : mean(data);
sum = data.reduce(function (sum, value) {
var diff = value - average;
return (sum += diff * diff);
}, 0);
return len > 1 && Math.sqrt(sum / (len - 1));
}
function normalDensity(x, mean, standardDeviation) {
var translation = x - mean;
return Math.exp(
-(translation * translation) /
(2 * standardDeviation * standardDeviation)
) / (standardDeviation * Math.sqrt(2 * Math.PI));
}
/**
* Bell curve class
*
* @private
* @class
* @name Highcharts.seriesTypes.bellcurve
*
* @augments Highcharts.Series
*
* @mixes DerivedSeriesMixin
*/
seriesType('bellcurve', 'areaspline'
/**
* A bell curve is an areaspline series which represents the probability density
* function of the normal distribution. It calculates mean and standard
* deviation of the base series data and plots the curve according to the
* calculated parameters.
*
* @sample {highcharts} highcharts/demo/bellcurve/
* Bell curve
*
* @extends plotOptions.areaspline
* @since 6.0.0
* @product highcharts
* @excluding boostThreshold, connectNulls, stacking, pointInterval,
* pointIntervalUnit
* @optionparent plotOptions.bellcurve
*/
, {
/**
* This option allows to define the length of the bell curve. A unit of the
* length of the bell curve is standard deviation.
*
* @sample highcharts/plotoptions/bellcurve-intervals-pointsininterval
* Intervals and points in interval
*/
intervals: 3,
/**
* Defines how many points should be plotted within 1 interval. See
* `plotOptions.bellcurve.intervals`.
*
* @sample highcharts/plotoptions/bellcurve-intervals-pointsininterval
* Intervals and points in interval
*/
pointsInInterval: 3,
marker: {
enabled: false
}
}, merge(derivedSeriesMixin, {
setMean: function () {
this.mean = correctFloat(mean(this.baseSeries.yData));
},
setStandardDeviation: function () {
this.standardDeviation = correctFloat(
standardDeviation(this.baseSeries.yData, this.mean)
);
},
setDerivedData: function () {
if (this.baseSeries.yData.length > 1) {
this.setMean();
this.setStandardDeviation();
this.setData(
this.derivedData(this.mean, this.standardDeviation), false
);
}
},
derivedData: function (mean, standardDeviation) {
var intervals = this.options.intervals,
pointsInInterval = this.options.pointsInInterval,
x = mean - intervals * standardDeviation,
stop = intervals * pointsInInterval * 2 + 1,
increment = standardDeviation / pointsInInterval,
data = [],
i;
for (i = 0; i < stop; i++) {
data.push([x, normalDensity(x, mean, standardDeviation)]);
x += increment;
}
return data;
}
}));
/**
* A `bellcurve` series. If the [type](#series.bellcurve.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* For options that apply to multiple series, it is recommended to add
* them to the [plotOptions.series](#plotOptions.series) options structure.
* To apply to all series of this specific type, apply it to
* [plotOptions.bellcurve](#plotOptions.bellcurve).
*
* @extends series,plotOptions.bellcurve
* @since 6.0.0
* @product highcharts
* @excluding dataParser, dataURL, data
* @apioption series.bellcurve
*/
/**
* An integer identifying the index to use for the base series, or a string
* representing the id of the series.
*
* @type {number|string}
* @apioption series.bellcurve.baseSeries
*/
}(Highcharts, derivedSeriesMixin));
return (function () {
}());
}));
@@ -0,0 +1,13 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Item series type for Highcharts
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define(function(){return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){(function(b){var x=b.extend,u=b.pick,r=b.seriesType;r("item","column",{itemPadding:.2,marker:{symbol:"circle",states:{hover:{},select:{}}}},{drawPoints:function(){var c=this,k=c.chart.renderer,l=this.options.marker,m=this.yAxis.transA*c.options.itemPadding,n=this.borderWidth%2?
.5:1;this.points.forEach(function(a){var d,e,f,g,h;d=a.marker||{};var v=d.symbol||l.symbol,r=u(d.radius,l.radius),p,t,w="rect"!==v,q;a.graphics=f=a.graphics||{};h=a.pointAttr?a.pointAttr[a.selected?"selected":""]||c.pointAttr[""]:c.pointAttribs(a,a.selected&&"select");delete h.r;c.chart.styledMode&&(delete h.stroke,delete h["stroke-width"]);if(null!==a.y)for(a.graphic||(a.graphic=k.g("point").add(c.group)),g=a.y,t=u(a.stackY,a.y),p=Math.min(a.pointWidth,c.yAxis.transA-m),d=t;d>t-a.y;d--)e=a.barX+
(w?a.pointWidth/2-p/2:0),q=c.yAxis.toPixels(d,!0)+m/2,c.options.crisp&&(e=Math.round(e)-n,q=Math.round(q)+n),e={x:e,y:q,width:Math.round(w?p:a.pointWidth),height:Math.round(p),r:r},f[g]?f[g].animate(e):f[g]=k.symbol(v).attr(x(e,h)).add(a.graphic),f[g].isActive=!0,g--;b.objectEach(f,function(a,b){a.isActive?a.isActive=!1:(a.destroy(),delete a[b])})})}});b.SVGRenderer.prototype.symbols.rect=function(c,k,l,m,n){return b.SVGRenderer.prototype.symbols.callout(c,k,l,m,n)}})(b)});
//# sourceMappingURL=item-series.js.map
@@ -0,0 +1 @@
{"version":3,"file":"item-series.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,QAAS,EAAG,CACf,MAAOH,EADQ,CAAnB,CADG,CAKHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CATY,CAAnB,CAAA,CAWC,QAAS,CAACD,CAAD,CAAa,CACnB,SAAS,CAACE,CAAD,CAAI,CAAA,IAqBNC,EAASD,CAAAC,OArBH,CAsBNC,EAAOF,CAAAE,KAtBD,CAuBNC,EAAaH,CAAAG,WASjBA,EAAA,CAAW,MAAX,CAAmB,QAAnB,CAA6B,CACzBC,YAAa,EADY,CAEzBC,OAAQ,CACJC,OAAQ,QADJ,CAEJC,OAAQ,CACJC,MAAO,EADH,CAEJC,OAAQ,EAFJ,CAFJ,CAFiB,CAA7B,CASG,CACCC,WAAYA,QAAS,EAAG,CAAA,IAChBC,EAAS,IADO,CAEhBC,EAAWD,CAAAE,MAAAD,SAFK,CAGhBE,EAAsB,IAAAC,QAAAV,OAHN,CAIhBW,EAAwB,IAAAC,MAAAC,OAAxBF,CACIL,CAAAI,QAAAX,YALY,CAOhBe,EADc,IAAAC,YACN,CAAc,CAAd;AAAkB,EAAlB,CAAwB,CAEpC,KAAAC,OAAAC,QAAA,CAAoB,QAAS,CAACC,CAAD,CAAQ,CAAA,IAC7BC,CAD6B,CAE7BC,CAF6B,CAG7BC,CAH6B,CAI7BC,CAJ6B,CAK7BC,CACAC,EAAAA,CAAqBN,CAAAlB,OAArBwB,EAAqC,EANR,KAO7BvB,EACIuB,CAAAvB,OADJA,EAEIQ,CAAAR,OATyB,CAW7BwB,EAAS5B,CAAA,CACL2B,CAAAC,OADK,CAELhB,CAAAgB,OAFK,CAXoB,CAe7BC,CAf6B,CAgB7BC,CAhB6B,CAiB7BC,EAAsB,MAAtBA,GAAW3B,CAjBkB,CAmB7B4B,CAEJX,EAAAG,SAAA,CAAiBA,CAAjB,CAA4BH,CAAAG,SAA5B,EAA8C,EAC9CE,EAAA,CAAYL,CAAAK,UAAA,CAEJL,CAAAK,UAAA,CAAgBL,CAAAY,SAAA,CAAiB,UAAjB,CAA8B,EAA9C,CAFI,EAGJxB,CAAAiB,UAAA,CAAiB,EAAjB,CAHI,CAKRjB,CAAAyB,aAAA,CAAoBb,CAApB,CAA2BA,CAAAY,SAA3B,EAA6C,QAA7C,CACJ,QAAOP,CAAAS,EAEH1B,EAAAE,MAAAyB,WAAJ,GACI,OAAOV,CAAAW,OACP,CAAA,OAAOX,CAAA,CAAU,cAAV,CAFX,CAKA,IAAgB,IAAhB,GAAIL,CAAAW,EAAJ,CAYI,IAVKX,CAAAiB,QAUA,GATDjB,CAAAiB,QASC,CATe5B,CAAA6B,EAAA,CAAW,OAAX,CAAAC,IAAA,CAAwB/B,CAAAgC,MAAxB,CASf,EANLhB,CAMK,CANGJ,CAAAW,EAMH,CALLF,CAKK,CALE9B,CAAA,CAAKqB,CAAAqB,OAAL,CAAmBrB,CAAAW,EAAnB,CAKF,CAJLH,CAIK,CAJEc,IAAAC,IAAA,CACHvB,CAAAwB,WADG,CAEHpC,CAAAM,MAAAC,OAFG,CAEmBF,CAFnB,CAIF,CAAAQ,CAAA,CAAOQ,CAAZ,CAAkBR,CAAlB,CAAyBQ,CAAzB,CAAgCT,CAAAW,EAAhC,CAAyCV,CAAA,EAAzC,CAEIwB,CA4BA,CA5BIzB,CAAA0B,KA4BJ;CA3BIhB,CAAA,CACIV,CAAAwB,WADJ,CACuB,CADvB,CAC2BhB,CAD3B,CACkC,CADlC,CAEI,CAyBR,EAvBAG,CAuBA,CAvBIvB,CAAAM,MAAAiC,SAAA,CAAsB1B,CAAtB,CAA4B,CAAA,CAA5B,CAuBJ,CAtBIR,CAsBJ,CAtB4B,CAsB5B,CApBIL,CAAAI,QAAAI,MAoBJ,GAnBI6B,CACA,CADIH,IAAAM,MAAA,CAAWH,CAAX,CACJ,CADoB7B,CACpB,CAAAe,CAAA,CAAIW,IAAAM,MAAA,CAAWjB,CAAX,CAAJ,CAAoBf,CAkBxB,EAhBAM,CAgBA,CAhBO,CACHuB,EAAGA,CADA,CAEHd,EAAGA,CAFA,CAGHkB,MAAOP,IAAAM,MAAA,CAAWlB,CAAA,CAAWF,CAAX,CAAkBR,CAAAwB,WAA7B,CAHJ,CAIHM,OAAQR,IAAAM,MAAA,CAAWpB,CAAX,CAJL,CAKHM,EAAGP,CALA,CAgBP,CARIJ,CAAA,CAASC,CAAT,CAAJ,CACID,CAAA,CAASC,CAAT,CAAA2B,QAAA,CAAwB7B,CAAxB,CADJ,CAGIC,CAAA,CAASC,CAAT,CAHJ,CAGsBf,CAAAN,OAAA,CAAgBA,CAAhB,CAAAmB,KAAA,CACRxB,CAAA,CAAOwB,CAAP,CAAaG,CAAb,CADQ,CAAAc,IAAA,CAETnB,CAAAiB,QAFS,CAKtB,CADAd,CAAA,CAASC,CAAT,CAAA4B,SACA,CAD2B,CAAA,CAC3B,CAAA5B,CAAA,EAGR3B,EAAAwD,WAAA,CAAa9B,CAAb,CAAuB,QAAS,CAACc,CAAD,CAAUiB,CAAV,CAAe,CACtCjB,CAAAe,SAAL,CAIIf,CAAAe,SAJJ,CAIuB,CAAA,CAJvB,EACIf,CAAAkB,QAAA,EACA,CAAA,OAAOlB,CAAA,CAAQiB,CAAR,CAFX,CAD2C,CAA/C,CAhFiC,CAArC,CAToB,CADzB,CATH,CAgHAzD,EAAA2D,YAAAC,UAAAC,QAAAC,KAAA,CAAuCC,QAAS,CAACf,CAAD,CAAId,CAAJ,CAAO8B,CAAP,CAAUC,CAAV,CAAalD,CAAb,CAAsB,CAClE,MAAOf,EAAA2D,YAAAC,UAAAC,QAAAK,QAAA,CAAwClB,CAAxC,CAA2Cd,CAA3C,CAA8C8B,CAA9C,CAAiDC,CAAjD,CAAoDlD,CAApD,CAD2D,CAhJ5D,CAAb,CAAA,CAoJCjB,CApJD,CADmB,CAXvB;","sources":["item-series.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","H","extend","pick","seriesType","itemPadding","marker","symbol","states","hover","select","drawPoints","series","renderer","chart","seriesMarkerOptions","options","itemPaddingTranslated","yAxis","transA","crisp","borderWidth","points","forEach","point","yPos","attr","graphics","itemY","pointAttr","pointMarkerOptions","radius","size","yTop","isSquare","y","selected","pointAttribs","r","styledMode","stroke","graphic","g","add","group","stackY","Math","min","pointWidth","x","barX","toPixels","round","width","height","animate","isActive","objectEach","key","destroy","SVGRenderer","prototype","symbols","rect","H.SVGRenderer.prototype.symbols.rect","w","h","callout"]}
@@ -0,0 +1,176 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
*
* Item 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
*
* (c) 2009-2019 Torstein Honsi
*
* Item series type for Highcharts
*
* License: www.highcharts.com/license
*
* */
/**
* @private
* @todo
* - Check update, remove etc.
* - Custom icons like persons, carts etc. Either as images, font icons or
* Highcharts symbols.
*/
var extend = H.extend,
pick = H.pick,
seriesType = H.seriesType;
/**
* @private
* @class
* @name Highcharts.seriesTypes.item
*
* @augments Highcharts.Series
*/
seriesType('item', 'column', {
itemPadding: 0.2,
marker: {
symbol: 'circle',
states: {
hover: {},
select: {}
}
}
}, {
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--;
}
}
H.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);
};
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,31 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Force directed graph module
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(l){"object"===typeof module&&module.exports?(l["default"]=l,module.exports=l):"function"===typeof define&&define.amd?define(function(){return l}):l("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(l){(function(g){g.NodesMixin={createNode:function(k){function a(a,b){return g.find(a,function(a){return a.id===b})}var b=a(this.nodes,k),h=this.pointClass,d;b||(d=this.options.nodes&&a(this.options.nodes,k),b=(new h).init(this,g.extend({className:"highcharts-node",isNode:!0,id:k,y:1},
d)),b.linksTo=[],b.linksFrom=[],b.formatPrefix="node",b.name=b.name||b.options.id,b.getSum=function(){var a=0,c=0;b.linksTo.forEach(function(b){a+=b.weight});b.linksFrom.forEach(function(a){c+=a.weight});return Math.max(a,c)},b.offset=function(a,c){for(var e=0,f=0;f<b[c].length;f++){if(b[c][f]===a)return e;e+=b[c][f].weight}},b.hasShape=function(){var a=0;b.linksTo.forEach(function(b){b.outgoing&&a++});return!b.linksTo.length||a!==b.linksTo.length},this.nodes.push(b));return b}}})(l);(function(g){var k=
g.pick;g.layouts={"reingold-fruchterman":function(a){this.options=a;this.nodes=[];this.links=[];this.series=[];this.box={x:0,y:0,width:0,height:0};this.setInitialRendering(!0)}};g.extend(g.layouts["reingold-fruchterman"].prototype,{run:function(){function a(){b.applyBarycenterForces();b.applyRepulsiveForces();b.applyAttractiveForces();b.applyLimits(b.temperature);b.temperature-=b.diffTemperature;b.prevSystemTemperature=b.systemTemperature;b.systemTemperature=b.getSystemTemperature();d.enableSimulation&&
(h.forEach(function(a){a.render()}),b.maxIterations--&&!b.isStable()?b.simulation=g.win.requestAnimationFrame(a):b.simulation=!1)}var b=this,h=this.series,d=this.options;b.initialRendering&&(b.initPositions(),h.forEach(function(a){a.render()}));b.setK();b.resetSimulation(d);if(d.enableSimulation)b.simulation=g.win.requestAnimationFrame(a);else{for(;b.maxIterations--&&!b.isStable();)a();h.forEach(function(a){a.render()})}},stop:function(){this.simulation&&g.win.cancelAnimationFrame(this.simulation)},
setArea:function(a,b,h,d){this.box={left:a,top:b,width:h,height:d}},setK:function(){this.k=this.options.linkLength||Math.pow(this.box.width*this.box.height/this.nodes.length,.4)},addNodes:function(a){a.forEach(function(a){-1===this.nodes.indexOf(a)&&this.nodes.push(a)},this)},removeNode:function(a){a=this.nodes.indexOf(a);-1!==a&&this.nodes.splice(a,1)},removeLink:function(a){a=this.links.indexOf(a);-1!==a&&this.links.splice(a,1)},addLinks:function(a){a.forEach(function(a){-1===this.links.indexOf(a)&&
this.links.push(a)},this)},addSeries:function(a){-1===this.series.indexOf(a)&&this.series.push(a)},clear:function(){this.nodes.length=0;this.links.length=0;this.series.length=0;this.resetSimulation()},resetSimulation:function(){this.forcedStop=!1;this.systemTemperature=0;this.setMaxIterations();this.setTemperature();this.setDiffTemperature()},setMaxIterations:function(a){this.maxIterations=k(a,this.options.maxIterations)},setTemperature:function(){this.temperature=Math.sqrt(this.nodes.length)},setDiffTemperature:function(){this.diffTemperature=
this.temperature/(this.options.maxIterations+1)},setInitialRendering:function(a){this.initialRendering=a},initPositions:function(){var a=this.options.initialPositions;g.isFunction(a)?a.call(this):"circle"===a?this.setCircularPositions():this.setRandomPositions()},setCircularPositions:function(){function a(b){b.linksFrom.forEach(function(f){c[f.toNode.id]||(c[f.toNode.id]=!0,e.push(f.toNode),a(f.toNode))})}var b=this.box,h=this.nodes,d=2*Math.PI/(h.length+1),e=[],c={};h.filter(function(a){return 0===
a.linksTo.length}).forEach(function(b){e.push(b);a(b)});e.length?h.forEach(function(a){-1===e.indexOf(a)&&e.push(a)}):e=h;e.forEach(function(a,f){a.plotX=k(a.plotX,b.width/2+Math.cos(f*d));a.plotY=k(a.plotY,b.height/2+Math.sin(f*d));a.dispX=0;a.dispY=0})},setRandomPositions:function(){function a(a){a=a*a/Math.PI;return a-=Math.floor(a)}var b=this.box,h=this.nodes,d=h.length+1;h.forEach(function(e,c){e.plotX=k(e.plotX,b.width*a(c));e.plotY=k(e.plotY,b.height*a(d+c));e.dispX=0;e.dispY=0})},applyBarycenterForces:function(){var a=
this.nodes.length,b=this.options.gravitationalConstant,h=0,d=0;this.nodes.forEach(function(a){h+=a.plotX;d+=a.plotY});this.barycenter={x:h,y:d};this.nodes.forEach(function(e){var c=e.getDegree(),c=c*(1+c/2);e.dispX=(h/a-e.plotX)*b*c;e.dispY=(d/a-e.plotY)*b*c})},applyRepulsiveForces:function(){var a=this,b=a.nodes,h=a.options,d=this.k;b.forEach(function(e){b.forEach(function(b){var c,f;e===b||e.fixedPosition||(f=a.getDistXY(e,b),c=a.vectorLength(f),0!==c&&(b=h.repulsiveForce.call(a,c,d),e.dispX+=f.x/
c*b,e.dispY+=f.y/c*b))})})},applyAttractiveForces:function(){var a=this,b=this.options,h=this.k;a.links.forEach(function(d){if(d.fromNode&&d.toNode){var e=a.getDistXY(d.fromNode,d.toNode),c=a.vectorLength(e),g=b.attractiveForce.call(a,c,h);0!==c&&(d.fromNode.fixedPosition||(d.fromNode.dispX-=e.x/c*g,d.fromNode.dispY-=e.y/c*g),d.toNode.fixedPosition||(d.toNode.dispX+=e.x/c*g,d.toNode.dispY+=e.y/c*g))}})},applyLimits:function(a){var b=this,g=b.options,d=b.box,e;b.nodes.forEach(function(c){c.fixedPosition||
(c.dispX+=g.friction*c.dispX,c.dispY+=g.friction*c.dispY,e=c.temperature=b.vectorLength({x:c.dispX,y:c.dispY}),0!==e&&(c.plotX+=c.dispX/e*Math.min(Math.abs(c.dispX),a),c.plotY+=c.dispY/e*Math.min(Math.abs(c.dispY),a)),c.plotX=Math.round(Math.max(Math.min(c.plotX,d.width),d.left)),c.plotY=Math.round(Math.max(Math.min(c.plotY,d.height),d.top)),c.dispX=0,c.dispY=0)})},isStable:function(){return 0===Math.abs(this.systemTemperature-this.prevSystemTemperature)},getSystemTemperature:function(){return this.nodes.reduce(function(a,
b){return a+b.temperature},0)},vectorLength:function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},getDistR:function(a,b){a=this.getDistXY(a,b);return Math.sqrt(a.x*a.x+a.y*a.y)},getDistXY:function(a,b){var g=a.plotX-b.plotX;a=a.plotY-b.plotY;return{x:g,y:a,absX:Math.abs(g),absY:Math.abs(a)}}})})(l);(function(g){var k=g.addEvent,a=g.defined,b=g.seriesType,h=g.seriesTypes,d=g.pick,e=g.Chart,c=g.Point,l=g.Series;b("networkgraph","line",{marker:{enabled:!0},dataLabels:{format:"{key}"},link:{color:"rgba(100, 100, 100, 0.5)",
width:1},draggable:!0,layoutAlgorithm:{initialPositions:"circle",enableSimulation:!1,type:"reingold-fruchterman",maxIterations:1E3,gravitationalConstant:.0625,friction:-.981,repulsiveForce:function(a,b){return b*b/a},attractiveForce:function(a,b){return a*a/b}},showInLegend:!1},{isNetworkgraph:!0,drawGraph:null,isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],drawTracker:g.TrackerMixin.drawTrackerPoint,animate:null,createNode:g.NodesMixin.createNode,
generatePoints:function(){var b={},c=this.chart;g.Series.prototype.generatePoints.call(this);this.nodes||(this.nodes=[]);this.colorCounter=0;this.nodes.forEach(function(a){a.linksFrom.length=0;a.linksTo.length=0});this.points.forEach(function(f){a(f.from)&&(b[f.from]||(b[f.from]=this.createNode(f.from)),b[f.from].linksFrom.push(f),f.fromNode=b[f.from],c.styledMode?f.colorIndex=d(f.options.colorIndex,b[f.from].colorIndex):f.color=f.options.color||b[f.from].color);a(f.to)&&(b[f.to]||(b[f.to]=this.createNode(f.to)),
b[f.to].linksTo.push(f),f.toNode=b[f.to]);f.name=f.name||f.id},this);this.options.nodes&&this.options.nodes.forEach(function(a){b[a.id]||(b[a.id]=this.createNode(a.id))},this)},translate:function(){this.processedXData||this.processData();this.generatePoints();this.deferLayout();this.nodes.forEach(function(a){a.isInside=!0;a.linksFrom.forEach(function(a){a.shapeType="path";a.y=1})})},deferLayout:function(){var b=this.options.layoutAlgorithm,c=this.chart.graphLayoutsStorage,e=this.chart.options.chart,
d;this.visible&&(c||(this.chart.graphLayoutsStorage=c={}),d=c[b.type],d||(b.enableSimulation=a(e.forExport)?!e.forExport:b.enableSimulation,c[b.type]=d=new g.layouts[b.type](b)),this.layout=d,d.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight),d.addSeries(this),d.addNodes(this.nodes),d.addLinks(this.points))},render:function(){var a=this.points,b=this.chart.hoverPoint,c=[];this.points=this.nodes;h.line.prototype.render.call(this);this.points=a;a.forEach(function(a){a.fromNode&&a.toNode&&(a.renderLink(),
a.redrawLink())});b&&b.series===this&&this.redrawHalo(b);this.nodes.forEach(function(a){a.dataLabel&&c.push(a.dataLabel)});g.Chart.prototype.hideOverlappingLabels(c)},redrawHalo:function(a){a&&this.halo&&this.halo.attr({d:a.haloPath(this.options.states.hover.halo.size)})},onMouseDown:function(a,b){b=this.chart.pointer.normalize(b);a.fixedPosition={chartX:b.chartX,chartY:b.chartY,plotX:a.plotX,plotY:a.plotY}},onMouseMove:function(a,b){if(a.fixedPosition){var f=this.chart,c=f.pointer.normalize(b);b=
a.fixedPosition.chartX-c.chartX;c=a.fixedPosition.chartY-c.chartY;if(5<Math.abs(b)||5<Math.abs(c))b=a.fixedPosition.plotX-b,c=a.fixedPosition.plotY-c,f.isInsidePlot(b,c)&&(a.plotX=b,a.plotY=c,this.redrawHalo(),this.layout.simulation?this.layout.resetSimulation():(this.layout.enableSimulation||this.layout.setMaxIterations(1),this.layout.setInitialRendering(!1),this.layout.run(),this.layout.setInitialRendering(!0)))}},onMouseUp:function(a){a.fixedPosition&&(this.layout.run(),delete a.fixedPosition)},
destroy:function(){this.nodes.forEach(function(a){a.destroy()});return l.prototype.destroy.apply(this,arguments)}},{getDegree:function(){var a=this.isNode?this.linksFrom.length+this.linksTo.length:0;return 0===a?1:a},getLinkAttribues:function(){var a=this.series.options.link,b=this.options;return{"stroke-width":d(b.width,a.width),stroke:b.color||a.color,dashstyle:b.dashStyle||a.dashStyle}},renderLink:function(){this.graphic||(this.graphic=this.series.chart.renderer.path(this.getLinkPath(this.fromNode,
this.toNode)).attr(this.getLinkAttribues()).add(this.series.group))},redrawLink:function(){this.graphic&&this.graphic.animate({d:this.getLinkPath(this.fromNode,this.toNode)})},getLinkPath:function(a,b){return["M",a.plotX,a.plotY,"L",b.plotX,b.plotY]},destroy:function(){this.isNode&&this.linksFrom.forEach(function(a){a.graphic&&(a.graphic=a.graphic.destroy())});return c.prototype.destroy.apply(this,arguments)}});k(h.networkgraph,"updatedData",function(){this.layout&&this.layout.stop()});k(h.networkgraph.prototype.pointClass,
"remove",function(){this.series.layout&&(this.isNode?this.series.layout.removeNode(this):this.series.layout.removeLink(this))});k(e,"predraw",function(){this.graphLayoutsStorage&&g.objectEach(this.graphLayoutsStorage,function(a){a.stop()})});k(e,"render",function(){this.graphLayoutsStorage&&(g.setAnimation(!1,this),g.objectEach(this.graphLayoutsStorage,function(a){a.run()}))});k(h.networkgraph.prototype.pointClass,"mouseOver",function(){g.css(this.series.chart.container,{cursor:"move"})});k(h.networkgraph.prototype.pointClass,
"mouseOut",function(){g.css(this.series.chart.container,{cursor:"default"})});k(e,"load",function(){var a=this,b=[];a.container&&b.push(k(a.container,"mousedown",function(c){var d=a.hoverPoint;d&&d.series&&d.series.isNetworkgraph&&d.series.options.draggable&&(d.series.onMouseDown(d,c),b.push(k(a.container,"mousemove",function(a){return d.series.onMouseMove(d,a)})),b.push(k(a.container.ownerDocument,"mouseup",function(a){return d.series.onMouseUp(d,a)})))}));k(a,"destroy",function(){b.forEach(function(a){a()})})})})(l)});
//# sourceMappingURL=networkgraph.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,13 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Plugin for displaying a message when there is no data visible in chart.
(c) 2010-2019 Highsoft AS
Author: Oystein Moseng
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define(function(){return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){(function(a){var d=a.seriesTypes,c=a.Chart.prototype,e=a.getOptions(),f=a.extend;f(e.lang,{noData:"No data to display"});e.noData={position:{x:0,y:0,align:"center",verticalAlign:"middle"},style:{fontWeight:"bold",fontSize:"12px",color:"#666666"}};"bubble gauge heatmap networkgraph pie sankey treemap waterfall".split(" ").forEach(function(a){d[a]&&
(d[a].prototype.hasData=function(){return!!this.points.length})});a.Series.prototype.hasData=function(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&0<this.yData.length};c.showNoData=function(a){var b=this.options;a=a||b&&b.lang.noData;b=b&&b.noData;!this.noDataLabel&&this.renderer&&(this.noDataLabel=this.renderer.label(a,0,0,null,null,null,b.useHTML,null,"no-data"),this.styledMode||this.noDataLabel.attr(b.attr).css(b.style),this.noDataLabel.add(),this.noDataLabel.align(f(this.noDataLabel.getBBox(),
b.position),!1,"plotBox"))};c.hideNoData=function(){this.noDataLabel&&(this.noDataLabel=this.noDataLabel.destroy())};c.hasData=function(){for(var a=this.series||[],b=a.length;b--;)if(a[b].hasData()&&!a[b].options.isInternal)return!0;return this.loadingShown};a.addEvent(a.Chart,"render",function(){this.hasData()?this.hideNoData():this.showNoData()})})(a)});
//# sourceMappingURL=no-data-to-display.js.map
@@ -0,0 +1 @@
{"version":3,"file":"no-data-to-display.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,QAAS,EAAG,CACf,MAAOH,EADQ,CAAnB,CADG,CAKHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CATY,CAAnB,CAAA,CAWC,QAAS,CAACD,CAAD,CAAa,CACnB,SAAS,CAACE,CAAD,CAAI,CAAA,IAeNC,EAAcD,CAAAC,YAfR,CAgBNC,EAAiBF,CAAAG,MAAAC,UAhBX,CAiBNC,EAAiBL,CAAAM,WAAA,EAjBX,CAkBNC,EAASP,CAAAO,OAGbA,EAAA,CACIF,CAAAG,KADJ,CAKI,CAWIC,OAAQ,oBAXZ,CALJ,CAmCAJ,EAAAI,OAAA,CAAwB,CA4BpBC,SAAU,CAKNC,EAAG,CALG,CAUNC,EAAG,CAVG,CAiBNC,MAAO,QAjBD,CAwBNC,cAAe,QAxBT,CA5BU,CA+DpBC,MAAO,CAEHC,WAAY,MAFT,CAIHC,SAAU,MAJP,CAMHC,MAAO,SANJ,CA/Da,CA4ExB,iEAAA,MAAA,CAAA,GAAA,CAAAC,QAAA,CASU,QAAS,CAACC,CAAD,CAAO,CAClBnB,CAAA,CAAYmB,CAAZ,CAAJ;CACInB,CAAA,CAAYmB,CAAZ,CAAAhB,UAAAiB,QADJ,CAC0C,QAAS,EAAG,CAC9C,MAAO,CAAEC,CAAA,IAAAC,OAAAD,OADqC,CADtD,CADsB,CAT1B,CA0BAtB,EAAAwB,OAAApB,UAAAiB,QAAA,CAA6BI,QAAS,EAAG,CACrC,MAEQ,KAAAC,QAFR,EAGyB3B,IAAAA,EAHzB,GAGQ,IAAA4B,QAHR,EAIyB5B,IAAAA,EAJzB,GAIQ,IAAA6B,QAJR,EAMK,IAAAF,QANL,EAMqB,IAAAG,MANrB,EAMuD,CANvD,CAMmC,IAAAA,MAAAP,OAPE,CAoBzCpB,EAAA4B,WAAA,CAA4BC,QAAS,CAACC,CAAD,CAAM,CAAA,IAEnCC,EADQC,IACED,QACVE,EAAAA,CAAOH,CAAPG,EAAeF,CAAfE,EAA0BF,CAAAzB,KAAAC,OAC1B2B,EAAAA,CAAgBH,CAAhBG,EAA2BH,CAAAxB,OAE1B4B,EALOH,IAKPG,YAAL,EALYH,IAKcI,SAA1B,GALYJ,IAMRG,YAqBA,CA3BQH,IAMYI,SAAAC,MAAA,CAEZJ,CAFY,CAGZ,CAHY,CAIZ,CAJY,CAKZ,IALY,CAMZ,IANY,CAOZ,IAPY,CAQZC,CAAAI,QARY,CASZ,IATY,CAUZ,SAVY,CAqBpB,CA3BQN,IAmBHO,WAQL,EA3BQP,IAoBJG,YAAAK,KAAA,CACUN,CAAAM,KADV,CAAAC,IAAA,CAESP,CAAArB,MAFT,CAOJ,CA3BQmB,IAyBRG,YAAAO,IAAA,EAEA,CA3BQV,IA2BRG,YAAAxB,MAAA,CACIN,CAAA,CA5BI2B,IA4BGG,YAAAQ,QAAA,EAAP;AAAoCT,CAAA1B,SAApC,CADJ,CAEI,CAAA,CAFJ,CAGI,SAHJ,CAtBJ,CANuC,CA0C3CR,EAAA4C,WAAA,CAA4BC,QAAS,EAAG,CACxBb,IAERG,YAAJ,GAFYH,IAGRG,YADJ,CAFYH,IAGYG,YAAAW,QAAA,EADxB,CAHoC,CAcxC9C,EAAAmB,QAAA,CAAyB4B,QAAS,EAAG,CAKjC,IALiC,IAE7BC,EADQhB,IACCgB,OAATA,EAAyB,EAFI,CAG7BC,EAAID,CAAA5B,OAER,CAAO6B,CAAA,EAAP,CAAA,CACI,GAAID,CAAA,CAAOC,CAAP,CAAA9B,QAAA,EAAJ,EAA4B+B,CAAAF,CAAA,CAAOC,CAAP,CAAAlB,QAAAmB,WAA5B,CACI,MAAO,CAAA,CAIf,OAVYlB,KAULmB,aAX0B,CAerCrD,EAAAsD,SAAA,CAAWtD,CAAAG,MAAX,CAAoB,QAApB,CAA8BoD,QAAqB,EAAG,CAC9C,IAAAlC,QAAA,EAAJ,CACI,IAAAyB,WAAA,EADJ,CAGI,IAAAhB,WAAA,EAJ8C,CAAtD,CAzPU,CAAb,CAAA,CAiQChC,CAjQD,CADmB,CAXvB;","sources":["no-data-to-display.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","H","seriesTypes","chartPrototype","Chart","prototype","defaultOptions","getOptions","extend","lang","noData","position","x","y","align","verticalAlign","style","fontWeight","fontSize","color","forEach","type","hasData","length","points","Series","H.Series.prototype.hasData","visible","dataMax","dataMin","yData","showNoData","chartPrototype.showNoData","str","options","chart","text","noDataOptions","noDataLabel","renderer","label","useHTML","styledMode","attr","css","add","getBBox","hideNoData","chartPrototype.hideNoData","destroy","chartPrototype.hasData","series","i","isInternal","loadingShown","addEvent","handleNoData"]}
@@ -0,0 +1,285 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* Plugin for displaying a message when there is no data visible in chart.
*
* (c) 2010-2019 Highsoft AS
* Author: Oystein Moseng
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
*
* Plugin for displaying a message when there is no data visible in chart.
*
* (c) 2010-2019 Highsoft AS
*
* Author: Oystein Moseng
*
* License: www.highcharts.com/license
*
* */
var seriesTypes = H.seriesTypes,
chartPrototype = H.Chart.prototype,
defaultOptions = H.getOptions(),
extend = H.extend;
// Add language option
extend(
defaultOptions.lang,
/**
* @optionparent lang
*/
{
/**
* The text to display when the chart contains no data. Requires the
* no-data module, see [noData](#noData).
*
* @sample highcharts/no-data-to-display/no-data-line
* No-data text
*
* @since 3.0.8
* @product highcharts highstock
*/
noData: 'No data to display'
}
);
// Add default display options for message
/**
* Options for displaying a message like "No data to display".
* This feature requires the file no-data-to-display.js to be loaded in the
* page. The actual text to display is set in the lang.noData option.
*
* @sample highcharts/no-data-to-display/no-data-line
* Line chart with no-data module
* @sample highcharts/no-data-to-display/no-data-pie
* Pie chart with no-data module
*
* @product highcharts highstock gantt
* @optionparent noData
*/
defaultOptions.noData = {
/**
* An object of additional SVG attributes for the no-data label.
*
* @type {Highcharts.SVGAttributes}
* @since 3.0.8
* @product highcharts highstock gantt
* @apioption noData.attr
*/
/**
* Whether to insert the label as HTML, or as pseudo-HTML rendered with
* SVG.
*
* @type {boolean}
* @default false
* @since 4.1.10
* @product highcharts highstock gantt
* @apioption noData.useHTML
*/
/**
* The position of the no-data label, relative to the plot area.
*
* @type {Highcharts.AlignObject}
* @since 3.0.8
*/
position: {
/**
* Horizontal offset of the label, in pixels.
*/
x: 0,
/**
* Vertical offset of the label, in pixels.
*/
y: 0,
/**
* Horizontal alignment of the label.
*
* @type {Highcharts.AlignType}
*/
align: 'center',
/**
* Vertical alignment of the label.
*
* @type {Highcharts.VerticalAlignType}
*/
verticalAlign: 'middle'
},
/**
* CSS styles for the no-data label.
*
* @sample highcharts/no-data-to-display/no-data-line
* Styled no-data text
*
* @type {Highcharts.CSSObject}
*/
style: {
/** @ignore */
fontWeight: 'bold',
/** @ignore */
fontSize: '12px',
/** @ignore */
color: '#666666'
}
};
// Define hasData function for non-cartesian seris. Returns true if the series
// has points at all.
[
'bubble',
'gauge',
'heatmap',
'networkgraph',
'pie',
'sankey',
'treemap',
'waterfall'
].forEach(function (type) {
if (seriesTypes[type]) {
seriesTypes[type].prototype.hasData = function () {
return !!this.points.length; // != 0
};
}
});
/**
* Define hasData functions for series. These return true if there are data
* points on this series within the plot area.
*
* @private
* @function Highcharts.Series#hasData
*
* @return {boolean}
*/
H.Series.prototype.hasData = function () {
return (
(
this.visible &&
this.dataMax !== undefined &&
this.dataMin !== undefined
) || // #3703
(this.visible && this.yData && this.yData.length > 0) // #9758
);
};
/**
* Display a no-data message.
*
* @private
* @function Highcharts.Chart#showNoData
*
* @param {string} str
* An optional message to show in place of the default one
*/
chartPrototype.showNoData = function (str) {
var chart = this,
options = chart.options,
text = str || (options && options.lang.noData),
noDataOptions = options && options.noData;
if (!chart.noDataLabel && chart.renderer) {
chart.noDataLabel = chart.renderer
.label(
text,
0,
0,
null,
null,
null,
noDataOptions.useHTML,
null,
'no-data'
);
if (!chart.styledMode) {
chart.noDataLabel
.attr(noDataOptions.attr)
.css(noDataOptions.style);
}
chart.noDataLabel.add();
chart.noDataLabel.align(
extend(chart.noDataLabel.getBBox(), noDataOptions.position),
false,
'plotBox'
);
}
};
/**
* Hide no-data message.
*
* @private
* @function Highcharts.Chart#hideNoData
*/
chartPrototype.hideNoData = function () {
var chart = this;
if (chart.noDataLabel) {
chart.noDataLabel = chart.noDataLabel.destroy();
}
};
/**
* Returns true if there are data points within the plot area now.
*
* @private
* @function Highcharts.Chart#hasData
*/
chartPrototype.hasData = function () {
var chart = this,
series = chart.series || [],
i = series.length;
while (i--) {
if (series[i].hasData() && !series[i].options.isInternal) {
return true;
}
}
return chart.loadingShown; // #4588
};
// Add event listener to handle automatic show or hide no-data message.
H.addEvent(H.Chart, 'render', function handleNoData() {
if (this.hasData()) {
this.hideNoData();
} else {
this.showNoData();
}
});
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,22 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Client side exporting module
(c) 2015-2019 Torstein Honsi / Oystein Moseng
License: www.highcharts.com/license
*/
(function(e){"object"===typeof module&&module.exports?(e["default"]=e,module.exports=e):"function"===typeof define&&define.amd?define(function(){return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){(function(a){var b=a.win,e=b.navigator,n=b.document,d=b.URL||b.webkitURL||b,r=/Edge\/\d+/.test(e.userAgent);a.dataURLtoBlob=function(a){if((a=a.match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3<a.length&&b.atob&&b.ArrayBuffer&&b.Uint8Array&&b.Blob&&d.createObjectURL){for(var g=
b.atob(a[3]),f=new b.ArrayBuffer(g.length),f=new b.Uint8Array(f),e=0;e<f.length;++e)f[e]=g.charCodeAt(e);a=new b.Blob([f],{type:a[1]});return d.createObjectURL(a)}};a.downloadURL=function(g,d){var f=n.createElement("a"),x;if("string"===typeof g||g instanceof String||!e.msSaveOrOpenBlob){if(r||2E6<g.length)if(g=a.dataURLtoBlob(g),!g)throw Error("Failed to convert to blob");if(void 0!==f.download)f.href=g,f.download=d,n.body.appendChild(f),f.click(),n.body.removeChild(f);else try{if(x=b.open(g,"chart"),
void 0===x||null===x)throw Error("Failed to open window");}catch(k){b.location.href=g}}else e.msSaveOrOpenBlob(g,d)}})(e);(function(a){function b(k,b){var h=g.getElementsByTagName("head")[0],c=g.createElement("script");c.type="text/javascript";c.src=k;c.onload=b;c.onerror=function(){a.error("Error loading script "+k)};h.appendChild(c)}var e=a.addEvent,n=a.merge,d=a.win,r=d.navigator,g=d.document,B=d.URL||d.webkitURL||d,f=/Edge\/|Trident\/|MSIE /.test(r.userAgent),x=f?150:0;a.CanVGRenderer={};a.svgToDataUrl=
function(a){var k=-1<r.userAgent.indexOf("WebKit")&&0>r.userAgent.indexOf("Chrome");try{if(!k&&0>r.userAgent.toLowerCase().indexOf("firefox"))return B.createObjectURL(new d.Blob([a],{type:"image/svg+xml;charset-utf-16"}))}catch(h){}return"data:image/svg+xml;charset\x3dUTF-8,"+encodeURIComponent(a)};a.imageToDataUrl=function(a,b,h,c,e,f,q,t,p){var l=new d.Image,k,y=function(){setTimeout(function(){var d=g.createElement("canvas"),f=d.getContext&&d.getContext("2d"),z;try{if(f){d.height=l.height*c;d.width=
l.width*c;f.drawImage(l,0,0,d.width,d.height);try{z=d.toDataURL(b),e(z,b,h,c)}catch(C){k(a,b,h,c)}}else q(a,b,h,c)}finally{p&&p(a,b,h,c)}},x)},u=function(){t(a,b,h,c);p&&p(a,b,h,c)};k=function(){l=new d.Image;k=f;l.crossOrigin="Anonymous";l.onload=y;l.onerror=u;l.src=a};l.onload=y;l.onerror=u;l.src=a};a.downloadSVGLocal=function(k,e,h,c){function f(a,c){c=new d.jsPDF("l","pt",[a.width.baseVal.value+2*c,a.height.baseVal.value+2*c]);[].forEach.call(a.querySelectorAll('*[visibility\x3d"hidden"]'),function(a){a.parentNode.removeChild(a)});
d.svg2pdf(a,c,{removeInvalid:!0});return c.output("datauristring")}function u(){A.innerHTML=k;var b=A.getElementsByTagName("text"),d;[].forEach.call(b,function(a){["font-family","font-size"].forEach(function(c){for(var b=a;b&&b!==A;){if(b.style[c]){a.style[c]=b.style[c];break}b=b.parentNode}});a.style["font-family"]=a.style["font-family"]&&a.style["font-family"].split(" ").splice(-1);d=a.getElementsByTagName("title");[].forEach.call(d,function(c){a.removeChild(c)})});b=f(A.firstChild,0);try{a.downloadURL(b,
v),c&&c()}catch(D){h(D)}}var q,t,p=!0,l,m=e.libURL||a.getOptions().exporting.libURL,A=g.createElement("div"),w=e.type||"image/png",v=(e.filename||"chart")+"."+("image/svg+xml"===w?"svg":w.split("/")[1]),n=e.scale||1,m="/"!==m.slice(-1)?m+"/":m;if("image/svg+xml"===w)try{r.msSaveOrOpenBlob?(t=new MSBlobBuilder,t.append(k),q=t.getBlob("image/svg+xml")):q=a.svgToDataUrl(k),a.downloadURL(q,v),c&&c()}catch(z){h(z)}else"application/pdf"===w?d.jsPDF&&d.svg2pdf?u():(p=!0,b(m+"jspdf.js",function(){b(m+"svg2pdf.js",
function(){u()})})):(q=a.svgToDataUrl(k),l=function(){try{B.revokeObjectURL(q)}catch(z){}},a.imageToDataUrl(q,w,{},n,function(b){try{a.downloadURL(b,v),c&&c()}catch(C){h(C)}},function(){var e=g.createElement("canvas"),f=e.getContext("2d"),u=k.match(/^<svg[^>]*width\s*=\s*\"?(\d+)\"?[^>]*>/)[1]*n,y=k.match(/^<svg[^>]*height\s*=\s*\"?(\d+)\"?[^>]*>/)[1]*n,q=function(){f.drawSvg(k,0,0,u,y);try{a.downloadURL(r.msSaveOrOpenBlob?e.msToBlob():e.toDataURL(w),v),c&&c()}catch(E){h(E)}finally{l()}};e.width=
u;e.height=y;d.canvg?q():(p=!0,b(m+"rgbcolor.js",function(){b(m+"canvg.js",function(){q()})}))},h,h,function(){p&&l()}))};a.Chart.prototype.getSVGForLocalExport=function(b,d,h,c){var f=this,g,k=0,t,p,l,m,n,r=function(a,b,e){++k;e.imageElement.setAttributeNS("http://www.w3.org/1999/xlink","href",a);k===g.length&&c(f.sanitizeSVG(t.innerHTML,p))};f.unbindGetSVG=e(f,"getSVG",function(a){p=a.chartCopy.options;t=a.chartCopy.container.cloneNode(!0)});f.getSVGForExport(b,d);g=t.getElementsByTagName("image");
try{if(!g.length){c(f.sanitizeSVG(t.innerHTML,p));return}m=0;for(n=g.length;m<n;++m)l=g[m],a.imageToDataUrl(l.getAttributeNS("http://www.w3.org/1999/xlink","href"),"image/png",{imageElement:l},b.scale,r,h,h,h)}catch(v){h(v)}f.unbindGetSVG()};a.Chart.prototype.exportChartLocal=function(b,e){var d=this,c=a.merge(d.options.exporting,b),g=function(b){!1===c.fallbackToExportServer?c.error?c.error(c,b):a.error(28,!0):d.exportChart(c)};f&&d.styledMode&&(a.SVGRenderer.prototype.inlineWhitelist=[/^blockSize/,
/^border/,/^caretColor/,/^color/,/^columnRule/,/^columnRuleColor/,/^cssFloat/,/^cursor/,/^fill$/,/^fillOpacity/,/^font/,/^inlineSize/,/^length/,/^lineHeight/,/^opacity/,/^outline/,/^parentRule/,/^rx$/,/^ry$/,/^stroke/,/^textAlign/,/^textAnchor/,/^textDecoration/,/^transform/,/^vectorEffect/,/^visibility/,/^x$/,/^y$/]);f&&("application/pdf"===c.type||d.container.getElementsByTagName("image").length&&"image/svg+xml"!==c.type)||"application/pdf"===c.type&&d.container.getElementsByTagName("image").length?
g("Image type not supported for this chart/browser."):d.getSVGForLocalExport(c,e,g,function(b){-1<b.indexOf("\x3cforeignObject")&&"image/svg+xml"!==c.type?g("Image type not supported for charts with embedded HTML"):a.downloadSVGLocal(b,a.extend({filename:d.getFilename()},c),g)})};n(!0,a.getOptions().exporting,{libURL:"https://code.highcharts.com/7.0.3/lib/",menuItemDefinitions:{downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChartLocal()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChartLocal({type:"image/jpeg"})}},
downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChartLocal({type:"image/svg+xml"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChartLocal({type:"application/pdf"})}}}})})(e)});
//# sourceMappingURL=offline-exporting.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,838 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* Client side exporting module
*
* (c) 2015-2019 Torstein Honsi / Oystein Moseng
*
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (Highcharts) {
/* *
* Mixin for downloading content in the browser
*
* (c) 2015-2019 Oystein Moseng
*
* License: www.highcharts.com/license
*/
var win = Highcharts.win,
nav = win.navigator,
doc = win.document,
domurl = win.URL || win.webkitURL || win,
isEdgeBrowser = /Edge\/\d+/.test(nav.userAgent);
// Convert base64 dataURL to Blob if supported, otherwise returns undefined
Highcharts.dataURLtoBlob = function (dataURL) {
var parts = dataURL.match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/);
if (
parts &&
parts.length > 3 &&
win.atob &&
win.ArrayBuffer &&
win.Uint8Array &&
win.Blob &&
domurl.createObjectURL
) {
// Try to convert data URL to Blob
var binStr = win.atob(parts[3]),
buf = new win.ArrayBuffer(binStr.length),
binary = new win.Uint8Array(buf),
blob;
for (var i = 0; i < binary.length; ++i) {
binary[i] = binStr.charCodeAt(i);
}
blob = new win.Blob([binary], { 'type': parts[1] });
return domurl.createObjectURL(blob);
}
};
/**
* Download a data URL in the browser. Can also take a blob as first param.
*
* @private
* @function Highcharts.downloadURL
*
* @param {string|object} dataURL
* The dataURL/Blob to download
*
* @param {string} filename
* The name of the resulting file (w/extension)
*/
Highcharts.downloadURL = function (dataURL, filename) {
var a = doc.createElement('a'),
windowRef;
// IE specific blob implementation
// Don't use for normal dataURLs
if (
typeof dataURL !== 'string' &&
!(dataURL instanceof String) &&
nav.msSaveOrOpenBlob
) {
nav.msSaveOrOpenBlob(dataURL, filename);
return;
}
// Some browsers have limitations for data URL lengths. Try to convert to
// Blob or fall back. Edge always needs that blob.
if (isEdgeBrowser || dataURL.length > 2000000) {
dataURL = Highcharts.dataURLtoBlob(dataURL);
if (!dataURL) {
throw new Error('Failed to convert to blob');
}
}
// Try HTML5 download attr if supported
if (a.download !== undefined) {
a.href = dataURL;
a.download = filename; // HTML5 download attribute
doc.body.appendChild(a);
a.click();
doc.body.removeChild(a);
} else {
// No download attr, just opening data URI
try {
windowRef = win.open(dataURL, 'chart');
if (windowRef === undefined || windowRef === null) {
throw new Error('Failed to open window');
}
} catch (e) {
// window.open failed, trying location.href
win.location.href = dataURL;
}
}
};
}(Highcharts));
(function (Highcharts) {
/**
* Client side exporting module
*
* (c) 2015 Torstein Honsi / Oystein Moseng
*
* License: www.highcharts.com/license
*/
/* global MSBlobBuilder */
var addEvent = Highcharts.addEvent,
merge = Highcharts.merge,
win = Highcharts.win,
nav = win.navigator,
doc = win.document,
domurl = win.URL || win.webkitURL || win,
isMSBrowser = /Edge\/|Trident\/|MSIE /.test(nav.userAgent),
// Milliseconds to defer image load event handlers to offset IE bug
loadEventDeferDelay = isMSBrowser ? 150 : 0;
// Dummy object so we can reuse our canvas-tools.js without errors
Highcharts.CanVGRenderer = {};
/**
* Downloads a script and executes a callback when done.
*
* @private
* @function getScript
*
* @param {string} scriptLocation
*
* @param {Function} callback
*/
function getScript(scriptLocation, callback) {
var head = doc.getElementsByTagName('head')[0],
script = doc.createElement('script');
script.type = 'text/javascript';
script.src = scriptLocation;
script.onload = callback;
script.onerror = function () {
Highcharts.error('Error loading script ' + scriptLocation);
};
head.appendChild(script);
}
/**
* Get blob URL from SVG code. Falls back to normal data URI.
*
* @private
* @function Highcharts.svgToDataURL
*
* @param {string} svg
*
* @return {string}
*/
Highcharts.svgToDataUrl = function (svg) {
// Webkit and not chrome
var webKit = (
nav.userAgent.indexOf('WebKit') > -1 &&
nav.userAgent.indexOf('Chrome') < 0
);
try {
// Safari requires data URI since it doesn't allow navigation to blob
// URLs. Firefox has an issue with Blobs and internal references,
// leading to gradients not working using Blobs (#4550)
if (!webKit && nav.userAgent.toLowerCase().indexOf('firefox') < 0) {
return domurl.createObjectURL(new win.Blob([svg], {
type: 'image/svg+xml;charset-utf-16'
}));
}
} catch (e) {
// Ignore
}
return 'data:image/svg+xml;charset=UTF-8,' + encodeURIComponent(svg);
};
/**
* Get data:URL from image URL. Pass in callbacks to handle results.
*
* @private
* @function Highcharts.imageToDataUrl
*
* @param {string} imageURL
*
* @param {string} imageType
*
* @param {*} callbackArgs
* callbackArgs is used only by callbacks.
*
* @param {number} scale
*
* @param {Function} successCallback
* Receives four arguments: imageURL, imageType, callbackArgs, and scale.
*
* @param {Function} taintedCallback
* Receives four arguments: imageURL, imageType, callbackArgs, and scale.
*
* @param {Function} noCanvasSupportCallback
* Receives four arguments: imageURL, imageType, callbackArgs, and scale.
*
* @param {Function} failedLoadCallback
* Receives four arguments: imageURL, imageType, callbackArgs, and scale.
*
* @param {Function} [finallyCallback]
* finallyCallback is always called at the end of the process. All
* callbacks receive four arguments: imageURL, imageType, callbackArgs,
* and scale.
*/
Highcharts.imageToDataUrl = function (
imageURL,
imageType,
callbackArgs,
scale,
successCallback,
taintedCallback,
noCanvasSupportCallback,
failedLoadCallback,
finallyCallback
) {
var img = new win.Image(),
taintedHandler,
loadHandler = function () {
setTimeout(function () {
var canvas = doc.createElement('canvas'),
ctx = canvas.getContext && canvas.getContext('2d'),
dataURL;
try {
if (!ctx) {
noCanvasSupportCallback(
imageURL,
imageType,
callbackArgs,
scale
);
} else {
canvas.height = img.height * scale;
canvas.width = img.width * scale;
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
// Now we try to get the contents of the canvas.
try {
dataURL = canvas.toDataURL(imageType);
successCallback(
dataURL,
imageType,
callbackArgs,
scale
);
} catch (e) {
taintedHandler(
imageURL,
imageType,
callbackArgs,
scale
);
}
}
} finally {
if (finallyCallback) {
finallyCallback(
imageURL,
imageType,
callbackArgs,
scale
);
}
}
// IE bug where image is not always ready despite calling load
// event.
}, loadEventDeferDelay);
},
// Image load failed (e.g. invalid URL)
errorHandler = function () {
failedLoadCallback(imageURL, imageType, callbackArgs, scale);
if (finallyCallback) {
finallyCallback(imageURL, imageType, callbackArgs, scale);
}
};
// This is called on load if the image drawing to canvas failed with a
// security error. We retry the drawing with crossOrigin set to Anonymous.
taintedHandler = function () {
img = new win.Image();
taintedHandler = taintedCallback;
// Must be set prior to loading image source
img.crossOrigin = 'Anonymous';
img.onload = loadHandler;
img.onerror = errorHandler;
img.src = imageURL;
};
img.onload = loadHandler;
img.onerror = errorHandler;
img.src = imageURL;
};
/**
* Get data URL to an image of an SVG and call download on it options object:
*
* - **filename:** Name of resulting downloaded file without extension. Default
* is `chart`.
*
* - **type:** File type of resulting download. Default is `image/png`.
*
* - **scale:** Scaling factor of downloaded image compared to source. Default
* is `1`.
*
* - **libURL:** URL pointing to location of dependency scripts to download on
* demand. Default is the exporting.libURL option of the global Highcharts
* options pointing to our server.
*
* @function Highcharts.downloadSVGLocal
*
* @param {string} svg
*
* @param {Highcharts.ExportingOptions} options
*
* @param {Function} failCallback
*
* @param {Function} successCallback
*/
Highcharts.downloadSVGLocal = function (
svg,
options,
failCallback,
successCallback
) {
var svgurl,
blob,
objectURLRevoke = true,
finallyHandler,
libURL = options.libURL || Highcharts.getOptions().exporting.libURL,
dummySVGContainer = doc.createElement('div'),
imageType = options.type || 'image/png',
filename = (
(options.filename || 'chart') +
'.' +
(imageType === 'image/svg+xml' ? 'svg' : imageType.split('/')[1])
),
scale = options.scale || 1;
// Allow libURL to end with or without fordward slash
libURL = libURL.slice(-1) !== '/' ? libURL + '/' : libURL;
function svgToPdf(svgElement, margin) {
var width = svgElement.width.baseVal.value + 2 * margin,
height = svgElement.height.baseVal.value + 2 * margin,
pdf = new win.jsPDF( // eslint-disable-line new-cap
'l',
'pt',
[width, height]
);
// Workaround for #7090, hidden elements were drawn anyway. It comes
// down to https://github.com/yWorks/svg2pdf.js/issues/28. Check this
// later.
[].forEach.call(
svgElement.querySelectorAll('*[visibility="hidden"]'),
function (node) {
node.parentNode.removeChild(node);
}
);
win.svg2pdf(svgElement, pdf, { removeInvalid: true });
return pdf.output('datauristring');
}
function downloadPDF() {
dummySVGContainer.innerHTML = svg;
var textElements = dummySVGContainer.getElementsByTagName('text'),
titleElements,
svgData,
// Copy style property to element from parents if it's not there.
// Searches up hierarchy until it finds prop, or hits the chart
// container.
setStylePropertyFromParents = function (el, propName) {
var curParent = el;
while (curParent && curParent !== dummySVGContainer) {
if (curParent.style[propName]) {
el.style[propName] = curParent.style[propName];
break;
}
curParent = curParent.parentNode;
}
};
// Workaround for the text styling. Making sure it does pick up settings
// for parent elements.
[].forEach.call(textElements, function (el) {
// Workaround for the text styling. making sure it does pick up the
// root element
['font-family', 'font-size'].forEach(function (property) {
setStylePropertyFromParents(el, property);
});
el.style['font-family'] = (
el.style['font-family'] &&
el.style['font-family'].split(' ').splice(-1)
);
// Workaround for plotband with width, removing title from text
// nodes
titleElements = el.getElementsByTagName('title');
[].forEach.call(titleElements, function (titleElement) {
el.removeChild(titleElement);
});
});
svgData = svgToPdf(dummySVGContainer.firstChild, 0);
try {
Highcharts.downloadURL(svgData, filename);
if (successCallback) {
successCallback();
}
} catch (e) {
failCallback(e);
}
}
// Initiate download depending on file type
if (imageType === 'image/svg+xml') {
// SVG download. In this case, we want to use Microsoft specific Blob if
// available
try {
if (nav.msSaveOrOpenBlob) {
blob = new MSBlobBuilder();
blob.append(svg);
svgurl = blob.getBlob('image/svg+xml');
} else {
svgurl = Highcharts.svgToDataUrl(svg);
}
Highcharts.downloadURL(svgurl, filename);
if (successCallback) {
successCallback();
}
} catch (e) {
failCallback(e);
}
} else if (imageType === 'application/pdf') {
if (win.jsPDF && win.svg2pdf) {
downloadPDF();
} else {
// Must load pdf libraries first. // Don't destroy the object URL
// yet since we are doing things asynchronously. A cleaner solution
// would be nice, but this will do for now.
objectURLRevoke = true;
getScript(libURL + 'jspdf.js', function () {
getScript(libURL + 'svg2pdf.js', function () {
downloadPDF();
});
});
}
} else {
// PNG/JPEG download - create bitmap from SVG
svgurl = Highcharts.svgToDataUrl(svg);
finallyHandler = function () {
try {
domurl.revokeObjectURL(svgurl);
} catch (e) {
// Ignore
}
};
// First, try to get PNG by rendering on canvas
Highcharts.imageToDataUrl(
svgurl,
imageType,
{},
scale,
function (imageURL) {
// Success
try {
Highcharts.downloadURL(imageURL, filename);
if (successCallback) {
successCallback();
}
} catch (e) {
failCallback(e);
}
}, function () {
// Failed due to tainted canvas
// Create new and untainted canvas
var canvas = doc.createElement('canvas'),
ctx = canvas.getContext('2d'),
imageWidth = svg.match(
/^<svg[^>]*width\s*=\s*\"?(\d+)\"?[^>]*>/
)[1] * scale,
imageHeight = svg.match(
/^<svg[^>]*height\s*=\s*\"?(\d+)\"?[^>]*>/
)[1] * scale,
downloadWithCanVG = function () {
ctx.drawSvg(svg, 0, 0, imageWidth, imageHeight);
try {
Highcharts.downloadURL(
nav.msSaveOrOpenBlob ?
canvas.msToBlob() :
canvas.toDataURL(imageType),
filename
);
if (successCallback) {
successCallback();
}
} catch (e) {
failCallback(e);
} finally {
finallyHandler();
}
};
canvas.width = imageWidth;
canvas.height = imageHeight;
if (win.canvg) {
// Use preloaded canvg
downloadWithCanVG();
} else {
// Must load canVG first. // Don't destroy the object URL
// yet since we are doing things asynchronously. A cleaner
// solution would be nice, but this will do for now.
objectURLRevoke = true;
// Get RGBColor.js first, then canvg
getScript(libURL + 'rgbcolor.js', function () {
getScript(libURL + 'canvg.js', function () {
downloadWithCanVG();
});
});
}
},
// No canvas support
failCallback,
// Failed to load image
failCallback,
// Finally
function () {
if (objectURLRevoke) {
finallyHandler();
}
}
);
}
};
/**
* Get SVG of chart prepared for client side export. This converts embedded
* images in the SVG to data URIs. It requires the regular exporting module. The
* options and chartOptions arguments are passed to the getSVGForExport
* function.
*
* @private
* @function Highcharts.Chart#getSVGForLocalExport
*
* @param {Highcharts.ExportingOptions} options
*
* @param {Highcharts.Options} chartOptions
*
* @param {Function} failCallback
*
* @param {Function} successCallback
*/
Highcharts.Chart.prototype.getSVGForLocalExport = function (
options,
chartOptions,
failCallback,
successCallback
) {
var chart = this,
images,
imagesEmbedded = 0,
chartCopyContainer,
chartCopyOptions,
el,
i,
l,
// After grabbing the SVG of the chart's copy container we need to do
// sanitation on the SVG
sanitize = function (svg) {
return chart.sanitizeSVG(svg, chartCopyOptions);
},
// Success handler, we converted image to base64!
embeddedSuccess = function (imageURL, imageType, callbackArgs) {
++imagesEmbedded;
// Change image href in chart copy
callbackArgs.imageElement.setAttributeNS(
'http://www.w3.org/1999/xlink',
'href',
imageURL
);
// When done with last image we have our SVG
if (imagesEmbedded === images.length) {
successCallback(sanitize(chartCopyContainer.innerHTML));
}
};
// Hook into getSVG to get a copy of the chart copy's container (#8273)
chart.unbindGetSVG = addEvent(chart, 'getSVG', function (e) {
chartCopyOptions = e.chartCopy.options;
chartCopyContainer = e.chartCopy.container.cloneNode(true);
});
// Trigger hook to get chart copy
chart.getSVGForExport(options, chartOptions);
images = chartCopyContainer.getElementsByTagName('image');
try {
// If there are no images to embed, the SVG is okay now.
if (!images.length) {
// Use SVG of chart copy
successCallback(sanitize(chartCopyContainer.innerHTML));
return;
}
// Go through the images we want to embed
for (i = 0, l = images.length; i < l; ++i) {
el = images[i];
Highcharts.imageToDataUrl(
el.getAttributeNS(
'http://www.w3.org/1999/xlink',
'href'
),
'image/png',
{ imageElement: el }, options.scale,
embeddedSuccess,
// Tainted canvas
failCallback,
// No canvas support
failCallback,
// Failed to load source
failCallback
);
}
} catch (e) {
failCallback(e);
}
// Clean up
chart.unbindGetSVG();
};
/**
* Exporting and offline-exporting modules required. Export a chart to an image
* locally in the user's browser. Requires the regular exporting module.
*
* @function Highcharts.Chart#exportChartLocal
*
* @param {Highcharts.ExportingOptions} exportingOptions
* Exporting options, the same as in
* {@link Highcharts.Chart#exportChart}.
*
* @param {Highcharts.Options} chartOptions
* Additional chart options for the exported chart. For example a
* different background color can be added here, or `dataLabels`
* for export only.
*/
Highcharts.Chart.prototype.exportChartLocal = function (
exportingOptions,
chartOptions
) {
var chart = this,
options = Highcharts.merge(chart.options.exporting, exportingOptions),
fallbackToExportServer = function (err) {
if (options.fallbackToExportServer === false) {
if (options.error) {
options.error(options, err);
} else {
Highcharts.error(28, true); // Fallback disabled
}
} else {
chart.exportChart(options);
}
},
svgSuccess = function (svg) {
// If SVG contains foreignObjects all exports except SVG will fail,
// as both CanVG and svg2pdf choke on this. Gracefully fall back.
if (
svg.indexOf('<foreignObject') > -1 &&
options.type !== 'image/svg+xml'
) {
fallbackToExportServer(
'Image type not supported for charts with embedded HTML'
);
} else {
Highcharts.downloadSVGLocal(
svg,
Highcharts.extend(
{ filename: chart.getFilename() },
options
),
fallbackToExportServer
);
}
};
// If we are on IE and in styled mode, add a whitelist to the renderer for
// inline styles that we want to pass through. There are so many styles by
// default in IE that we don't want to blacklist them all.
if (isMSBrowser && chart.styledMode) {
Highcharts.SVGRenderer.prototype.inlineWhitelist = [
/^blockSize/,
/^border/,
/^caretColor/,
/^color/,
/^columnRule/,
/^columnRuleColor/,
/^cssFloat/,
/^cursor/,
/^fill$/,
/^fillOpacity/,
/^font/,
/^inlineSize/,
/^length/,
/^lineHeight/,
/^opacity/,
/^outline/,
/^parentRule/,
/^rx$/,
/^ry$/,
/^stroke/,
/^textAlign/,
/^textAnchor/,
/^textDecoration/,
/^transform/,
/^vectorEffect/,
/^visibility/,
/^x$/,
/^y$/
];
}
// Always fall back on:
// - MS browsers: Embedded images JPEG/PNG, or any PDF
// - Embedded images and PDF
if (
(
isMSBrowser &&
(
options.type === 'application/pdf' ||
chart.container.getElementsByTagName('image').length &&
options.type !== 'image/svg+xml'
)
) || (
options.type === 'application/pdf' &&
chart.container.getElementsByTagName('image').length
)
) {
fallbackToExportServer(
'Image type not supported for this chart/browser.'
);
return;
}
chart.getSVGForLocalExport(
options,
chartOptions,
fallbackToExportServer,
svgSuccess
);
};
// Extend the default options to use the local exporter logic
merge(true, Highcharts.getOptions().exporting, {
libURL: 'https://code.highcharts.com/7.0.3/lib/',
// When offline-exporting is loaded, redefine the menu item definitions
// related to download.
menuItemDefinitions: {
downloadPNG: {
textKey: 'downloadPNG',
onclick: function () {
this.exportChartLocal();
}
},
downloadJPEG: {
textKey: 'downloadJPEG',
onclick: function () {
this.exportChartLocal({
type: 'image/jpeg'
});
}
},
downloadSVG: {
textKey: 'downloadSVG',
onclick: function () {
this.exportChartLocal({
type: 'image/svg+xml'
});
}
},
downloadPDF: {
textKey: 'downloadPDF',
onclick: function () {
this.exportChartLocal({
type: 'application/pdf'
});
}
}
}
});
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,13 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Old IE (v6, v7, v8) array polyfills for Highcharts v7+.
(c) 2010-2019 Highsoft AS
Author: 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(function(){return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){(function(){Array.prototype.forEach||(Array.prototype.forEach=function(d,b){for(var a=0,c=this.length;a<c;a++)if(void 0!==this[a]&&!1===d.call(b,this[a],a,this))return a});Array.prototype.map||(Array.prototype.map=function(d){for(var b=[],a=0,c=this.length;a<c;a++)b[a]=d.call(this[a],
this[a],a,this);return b});Array.prototype.indexOf||(Array.prototype.indexOf=function(d,b){var a=b||0;if(this)for(b=this.length;a<b;a++)if(this[a]===d)return a;return-1});Array.prototype.filter||(Array.prototype.filter=function(d){for(var b=[],a=0,c=this.length;a<c;a++)d(this[a],a)&&b.push(this[a]);return b});Array.prototype.some||(Array.prototype.some=function(d,b){for(var a=0,c=this.length;a<c;a++)if(!0===d.call(b,this[a],a,this))return!0;return!1});Array.prototype.reduce||(Array.prototype.reduce=
function(d,b){for(var a=1<arguments.length?0:1,c=1<arguments.length?b:this[0],e=this.length;a<e;++a)c=d.call(this,c,this[a],a,this);return c});Object.keys||(Object.keys=function(d){var b=[],a=Object.prototype.hasOwnProperty,c;for(c in d)a.call(d,c)&&b.push(c);return b})})()});
//# sourceMappingURL=oldie-polyfills.js.map
@@ -0,0 +1 @@
{"version":3,"file":"oldie-polyfills.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,QAAS,EAAG,CACf,MAAOH,EADQ,CAAnB,CADG,CAKHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CATY,CAAnB,CAAA,CAWC,QAAS,CAACD,CAAD,CAAa,CACnB,SAAS,EAAG,CAaJE,KAAAC,UAAAC,QAAL,GACIF,KAAAC,UAAAC,QADJ,CAC8BC,QAAS,CAACC,CAAD,CAAKC,CAAL,CAAU,CAIzC,IAJyC,IACrCC,EAAI,CADiC,CAErCC,EAAM,IAAAC,OAEV,CAAOF,CAAP,CAAWC,CAAX,CAAgBD,CAAA,EAAhB,CACI,GACgBP,IAAAA,EADhB,GACI,IAAA,CAAKO,CAAL,CADJ,EAEuC,CAAA,CAFvC,GAEIF,CAAAK,KAAA,CAAQJ,CAAR,CAAa,IAAA,CAAKC,CAAL,CAAb,CAAsBA,CAAtB,CAAyB,IAAzB,CAFJ,CAII,MAAOA,EAT0B,CADjD,CAgBKN,MAAAC,UAAAS,IAAL,GACIV,KAAAC,UAAAS,IADJ,CAC0BC,QAAS,CAACP,CAAD,CAAK,CAKhC,IALgC,IAC5BQ,EAAU,EADkB,CAE5BN,EAAI,CAFwB,CAG5BC,EAAM,IAAAC,OAEV,CAAOF,CAAP,CAAWC,CAAX,CAAgBD,CAAA,EAAhB,CACIM,CAAA,CAAQN,CAAR,CAAA,CAAaF,CAAAK,KAAA,CAAQ,IAAA,CAAKH,CAAL,CAAR;AAAiB,IAAA,CAAKA,CAAL,CAAjB,CAA0BA,CAA1B,CAA6B,IAA7B,CAGjB,OAAOM,EATyB,CADxC,CAcKZ,MAAAC,UAAAY,QAAL,GACIb,KAAAC,UAAAY,QADJ,CAC8BC,QAAS,CAACC,CAAD,CAASC,CAAT,CAAoB,CACnD,IAEIV,EAAIU,CAAJV,EAAiB,CAErB,IAJUW,IAIV,CAGI,IAFAV,CAEA,CAPMU,IAKAT,OAEN,CAAOF,CAAP,CAAWC,CAAX,CAAgBD,CAAA,EAAhB,CACI,GAREW,IAQE,CAAIX,CAAJ,CAAJ,GAAeS,CAAf,CACI,MAAOT,EAKnB,OAAQ,EAf2C,CAD3D,CAoBKN,MAAAC,UAAAiB,OAAL,GACIlB,KAAAC,UAAAiB,OADJ,CAC6BC,QAAS,CAACf,CAAD,CAAK,CAKnC,IALmC,IAC/BgB,EAAM,EADyB,CAE/Bd,EAAI,CAF2B,CAG/BE,EAAS,IAAAA,OAEb,CAAOF,CAAP,CAAWE,CAAX,CAAmBF,CAAA,EAAnB,CACQF,CAAA,CAAG,IAAA,CAAKE,CAAL,CAAH,CAAYA,CAAZ,CAAJ,EACIc,CAAAC,KAAA,CAAS,IAAA,CAAKf,CAAL,CAAT,CAIR,OAAOc,EAX4B,CAD3C,CAgBKpB,MAAAC,UAAAqB,KAAL,GACItB,KAAAC,UAAAqB,KADJ,CAC2BC,QAAS,CAACnB,CAAD,CAAKC,CAAL,CAAU,CAItC,IAJsC,IAClCC,EAAI,CAD8B,CAElCC,EAAM,IAAAC,OAEV,CAAOF,CAAP,CAAWC,CAAX,CAAgBD,CAAA,EAAhB,CACI,GAAuC,CAAA,CAAvC,GAAIF,CAAAK,KAAA,CAAQJ,CAAR,CAAa,IAAA,CAAKC,CAAL,CAAb,CAAsBA,CAAtB,CAAyB,IAAzB,CAAJ,CACI,MAAO,CAAA,CAGf,OAAO,CAAA,CAT+B,CAD9C,CAcKN,MAAAC,UAAAuB,OAAL,GACIxB,KAAAC,UAAAuB,OADJ;AAC6BC,QAAS,CAACC,CAAD,CAAOC,CAAP,CAAqB,CAMnD,IANmD,IAE/CrB,EAAuB,CAAnB,CAAAsB,SAAApB,OAAA,CAAuB,CAAvB,CAA2B,CAFgB,CAG/CqB,EAAiC,CAAnB,CAAAD,SAAApB,OAAA,CAAuBmB,CAAvB,CAAsC,IAAA,CAAK,CAAL,CAHL,CAI/CpB,EAAM,IAAAC,OAEV,CAAOF,CAAP,CAAWC,CAAX,CAAgB,EAAED,CAAlB,CACIuB,CAAA,CAAcH,CAAAjB,KAAA,CANJqB,IAMI,CAAmBD,CAAnB,CAAgC,IAAA,CAAKvB,CAAL,CAAhC,CAAyCA,CAAzC,CAA4C,IAA5C,CAElB,OAAOuB,EAT4C,CAD3D,CAcKE,OAAAC,KAAL,GACID,MAAAC,KADJ,CACkBC,QAAS,CAACC,CAAD,CAAM,CAAA,IACrBC,EAAS,EADY,CAErBC,EAAiBL,MAAA9B,UAAAmC,eAFI,CAGrBC,CAEJ,KAAKA,CAAL,GAAaH,EAAb,CACQE,CAAA3B,KAAA,CAAoByB,CAApB,CAAyBG,CAAzB,CAAJ,EACIF,CAAAd,KAAA,CAAYgB,CAAZ,CAGR,OAAOF,EAVkB,CADjC,CA3GS,CAAZ,CAAA,EADmB,CAXvB;","sources":["oldie-polyfills.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","Array","prototype","forEach","Array.prototype.forEach","fn","ctx","i","len","length","call","map","Array.prototype.map","results","indexOf","Array.prototype.indexOf","member","fromIndex","arr","filter","Array.prototype.filter","ret","push","some","Array.prototype.some","reduce","Array.prototype.reduce","func","initialValue","arguments","accumulator","context","Object","keys","Object.keys","obj","result","hasOwnProperty","prop"]}
@@ -0,0 +1,150 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
* Old IE (v6, v7, v8) array polyfills for Highcharts v7+.
*
* (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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function () {
/**
* (c) 2010-2019 Torstein Honsi
*
* Simple polyfills for array functions in old IE browsers (6, 7 and 8) in
* Highcharts v7+. These polyfills are sufficient for Highcharts to work, but
* for fully compatible polyfills, see MDN.
*
* License: www.highcharts.com/license
*/
/* eslint no-extend-native: 0 */
if (!Array.prototype.forEach) {
Array.prototype.forEach = function (fn, ctx) {
var i = 0,
len = this.length;
for (; i < len; i++) {
if (
this[i] !== undefined && // added check
fn.call(ctx, this[i], i, this) === false
) {
return i;
}
}
};
}
if (!Array.prototype.map) {
Array.prototype.map = function (fn) {
var results = [],
i = 0,
len = this.length;
for (; i < len; i++) {
results[i] = fn.call(this[i], this[i], i, this);
}
return results;
};
}
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (member, fromIndex) {
var arr = this, // #8874
len,
i = fromIndex || 0; // #8346
if (arr) {
len = arr.length;
for (; i < len; i++) {
if (arr[i] === member) {
return i;
}
}
}
return -1;
};
}
if (!Array.prototype.filter) {
Array.prototype.filter = function (fn) {
var ret = [],
i = 0,
length = this.length;
for (; i < length; i++) {
if (fn(this[i], i)) {
ret.push(this[i]);
}
}
return ret;
};
}
if (!Array.prototype.some) {
Array.prototype.some = function (fn, ctx) { // legacy
var i = 0,
len = this.length;
for (; i < len; i++) {
if (fn.call(ctx, this[i], i, this) === true) {
return true;
}
}
return false;
};
}
if (!Array.prototype.reduce) {
Array.prototype.reduce = function (func, initialValue) {
var context = this,
i = arguments.length > 1 ? 0 : 1,
accumulator = arguments.length > 1 ? initialValue : this[0],
len = this.length;
for (; i < len; ++i) {
accumulator = func.call(context, accumulator, this[i], i, this);
}
return accumulator;
};
}
if (!Object.keys) {
Object.keys = function (obj) {
var result = [],
hasOwnProperty = Object.prototype.hasOwnProperty,
prop;
for (prop in obj) {
if (hasOwnProperty.call(obj, prop)) {
result.push(prop);
}
}
return result;
};
}
}());
return (function () {
}());
}));
@@ -0,0 +1,35 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Old IE (v6, v7, v8) module for Highcharts v6+.
(c) 2010-2019 Highsoft AS
Author: Torstein Honsi
License: www.highcharts.com/license
*/
(function(k){"object"===typeof module&&module.exports?(k["default"]=k,module.exports=k):"function"===typeof define&&define.amd?define(function(){return k}):k("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(k){(function(d){var k,f;f=d.Chart;var A=d.createElement,w=d.css,E=d.defined,n=d.deg2rad,F=d.discardElement,h=d.doc,G=d.erase,B=d.extend;k=d.extendClass;var M=d.isArray,K=d.isNumber,C=d.isObject,N=d.merge,L=d.noop,x=d.pick,r=d.pInt,D=d.svg,y=d.SVGElement,t=d.SVGRenderer,u=d.win;d.getOptions().global.VMLRadialGradientURL=
"http://code.highcharts.com/7.0.3/gfx/vml-radial-gradient.png";h&&!h.defaultView&&(d.getStyle=function(a,b){var c={width:"clientWidth",height:"clientHeight"}[b];if(a.style[b])return d.pInt(a.style[b]);"opacity"===b&&(b="filter");if(c)return a.style.zoom=1,Math.max(a[c]-2*d.getStyle(a,"padding"),0);a=a.currentStyle[b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()})];"filter"===b&&(a=a.replace(/alpha\(opacity=([0-9]+)\)/,function(a,b){return b/100}));return""===a?1:d.pInt(a)});D||(d.addEvent(y,
"afterInit",function(){"text"===this.element.nodeName&&this.css({position:"absolute"})}),d.Pointer.prototype.normalize=function(a,b){a=a||u.event;a.target||(a.target=a.srcElement);b||(this.chartPosition=b=d.offset(this.chart.container));return d.extend(a,{chartX:Math.round(Math.max(a.x,a.clientX-b.left)),chartY:Math.round(a.y)})},f.prototype.ieSanitizeSVG=function(a){return a=a.replace(/<IMG /g,"\x3cimage ").replace(/<(\/?)TITLE>/g,"\x3c$1title\x3e").replace(/height=([^" ]+)/g,'height\x3d"$1"').replace(/width=([^" ]+)/g,
'width\x3d"$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href\x3d"$1"/\x3e').replace(/ id=([^" >]+)/g,' id\x3d"$1"').replace(/class=([^" >]+)/g,'class\x3d"$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()})},f.prototype.isReadyToRender=function(){var a=this;return D||u!=u.top||"complete"===h.readyState?!0:(h.attachEvent("onreadystatechange",function(){h.detachEvent("onreadystatechange",a.firstRender);"complete"===h.readyState&&
a.firstRender()}),!1)},h.createElementNS||(h.createElementNS=function(a,b){return h.createElement(b)}),d.addEventListenerPolyfill=function(a,b){function c(a){a.target=a.srcElement||u;b.call(e,a)}var e=this;e.attachEvent&&(e.hcEventsIE||(e.hcEventsIE={}),b.hcKey||(b.hcKey=d.uniqueKey()),e.hcEventsIE[b.hcKey]=c,e.attachEvent("on"+a,c))},d.removeEventListenerPolyfill=function(a,b){this.detachEvent&&(b=this.hcEventsIE[b.hcKey],this.detachEvent("on"+a,b))},f={docMode8:h&&8===h.documentMode,init:function(a,
b){var c=["\x3c",b,' filled\x3d"f" stroked\x3d"f"'],e=["position: ","absolute",";"],m="div"===b;("shape"===b||m)&&e.push("left:0;top:0;width:1px;height:1px;");e.push("visibility: ",m?"hidden":"visible");c.push(' style\x3d"',e.join(""),'"/\x3e');b&&(c=m||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=A(c));this.renderer=a},add:function(a){var b=this.renderer,c=this.element,e=b.box,m=a&&a.inverted,e=a?a.element||a:e;a&&(this.parentGroup=a);m&&b.invertChild(c,e);e.appendChild(c);this.added=
!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();if(this.onAdd)this.onAdd();this.className&&this.attr("class",this.className);return this},updateTransform:y.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=Math.cos(a*n),c=Math.sin(a*n);w(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11\x3d",b,", M12\x3d",-c,", M21\x3d",c,", M22\x3d",b,", sizingMethod\x3d'auto expand')"].join(""):"none"})},getSpanCorrection:function(a,b,c,e,m){var d=
e?Math.cos(e*n):1,J=e?Math.sin(e*n):0,q=x(this.elemHeight,this.element.offsetHeight),h;this.xCorr=0>d&&-a;this.yCorr=0>J&&-q;h=0>d*J;this.xCorr+=J*b*(h?1-c:c);this.yCorr-=d*b*(e?h?c:1-c:1);m&&"left"!==m&&(this.xCorr-=a*c*(0>d?-1:1),e&&(this.yCorr-=q*c*(0>J?-1:1)),w(this.element,{textAlign:m}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)K(a[b])?c[b]=Math.round(10*a[b])-5:"Z"===a[b]?c[b]="x":(c[b]=a[b],!a.isArc||"wa"!==a[b]&&"at"!==a[b]||(c[b+5]===c[b+7]&&(c[b+7]+=a[b+7]>a[b+5]?1:-1),c[b+6]===
c[b+8]&&(c[b+8]+=a[b+8]>a[b+6]?1:-1)));return c.join(" ")||"x"},clip:function(a){var b=this,c;a?(c=a.members,G(c,b),c.push(b),b.destroyClip=function(){G(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:b.docMode8?"inherit":"rect(auto)"});return b.css(a)},css:y.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&F(a)},destroy:function(){this.destroyClip&&this.destroyClip();return y.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=u.event;a.target=
a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c;a=a.split(/[ ,]/);c=a.length;if(9===c||11===c)a[c-4]=a[c-2]=r(a[c-2])-10*b;return a.join(" ")},shadow:function(a,b,c){var e=[],d,g=this.element,h=this.renderer,q,f=g.style,l,H=g.path,k,p,v,n;H&&"string"!==typeof H.value&&(H="x");p=H;if(a){v=x(a.width,3);n=(a.opacity||.15)/v;for(d=1;3>=d;d++)k=2*v+1-2*d,c&&(p=this.cutOffPath(H.value,k+.5)),l=['\x3cshape isShadow\x3d"true" strokeweight\x3d"',k,'" filled\x3d"false" path\x3d"',p,'" coordsize\x3d"10 10" style\x3d"',
g.style.cssText,'" /\x3e'],q=A(h.prepVML(l),null,{left:r(f.left)+x(a.offsetX,1),top:r(f.top)+x(a.offsetY,1)}),c&&(q.cutOff=k+1),l=['\x3cstroke color\x3d"',a.color||"#000000",'" opacity\x3d"',n*d,'"/\x3e'],A(h.prepVML(l),null,null,q),b?b.element.appendChild(q):g.parentNode.insertBefore(q,g),e.push(q);this.shadows=e}return this},updateShadows:L,setAttr:function(a,b){this.docMode8?this.element[a]=b:this.element.setAttribute(a,b)},getAttr:function(a){return this.docMode8?this.element[a]:this.element.getAttribute(a)},
classSetter:function(a){(this.added?this.element:this).className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||A(this.renderer.prepVML(["\x3cstroke/\x3e"]),null,null,c))[b]=a||"solid";this[b]=a},dSetter:function(a,b,c){var e=this.shadows;a=a||[];this.d=a.join&&a.join(" ");c.path=a=this.pathToVML(a);if(e)for(c=e.length;c--;)e[c].path=e[c].cutOff?this.cutOffPath(a,e[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var e=c.nodeName;"SPAN"===e?c.style.color=a:"IMG"!==
e&&(c.filled="none"!==a,this.setAttr("fillcolor",this.renderer.color(a,c,b,this)))},"fill-opacitySetter":function(a,b,c){A(this.renderer.prepVML(["\x3c",b.split("-")[0],' opacity\x3d"',a,'"/\x3e']),null,null,c)},opacitySetter:L,rotationSetter:function(a,b,c){c=c.style;this[b]=c[b]=a;c.left=-Math.round(Math.sin(a*n)+1)+"px";c.top=Math.round(Math.cos(a*n))+"px"},strokeSetter:function(a,b,c){this.setAttr("strokecolor",this.renderer.color(a,c,b,this))},"stroke-widthSetter":function(a,b,c){c.stroked=!!a;
this[b]=a;K(a)&&(a+="px");this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){"inherit"===a&&(a="visible");this.shadows&&this.shadows.forEach(function(c){c.style[b]=a});"DIV"===c.nodeName&&(a="hidden"===a?"-999em":0,this.docMode8||(c.style[b]=a?"visible":"hidden"),b="top");c.style[b]=a},xSetter:function(a,b,c){this[b]=a;"x"===b?b="left":"y"===b&&(b="top");this.updateClipping?(this[b]=a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,
b,c){c.style[b]=a},fillGetter:function(){return this.getAttr("fillcolor")||""},strokeGetter:function(){return this.getAttr("strokecolor")||""},classGetter:function(){return this.getAttr("className")||""}},f["stroke-opacitySetter"]=f["fill-opacitySetter"],d.VMLElement=f=k(y,f),f.prototype.ySetter=f.prototype.widthSetter=f.prototype.heightSetter=f.prototype.xSetter,f={Element:f,isIE8:-1<u.navigator.userAgent.indexOf("MSIE 8.0"),init:function(a,b,c){var e,d;this.alignedObjects=[];e=this.createElement("div").css({position:"relative"});
d=e.element;a.appendChild(e.element);this.isVML=!0;this.box=d;this.boxWrapper=e;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(b,c,!1);if(!h.namespaces.hcv){h.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{h.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(g){h.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},
isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,e){var d=this.createElement(),g=C(a);return B(d,{members:[],count:0,left:(g?a.x:a)+1,top:(g?a.y:b)+1,width:(g?a.width:c)-1,height:(g?a.height:e)-1,getCSS:function(a){var b=a.element,c=b.nodeName,e=a.inverted,d=this.top-("shape"===c?b.offsetTop:0),m=this.left,b=m+this.width,g=d+this.height,d={clip:"rect("+Math.round(e?m:d)+"px,"+Math.round(e?g:b)+"px,"+Math.round(e?b:g)+"px,"+Math.round(e?d:m)+"px)"};!e&&a.docMode8&&"DIV"===c&&
B(d,{width:b+"px",height:g+"px"});return d},updateClipping:function(){d.members.forEach(function(a){a.element&&a.css(d.getCSS(a))})}})},color:function(a,b,c,e){var m=this,g,h=/^rgba/,q,k,l="none";a&&a.linearGradient?k="gradient":a&&a.radialGradient&&(k="pattern");if(k){var f,n,p=a.linearGradient||a.radialGradient,v,r,t,u,y,w="";a=a.stops;var x,B=[],C=function(){q=['\x3cfill colors\x3d"'+B.join(",")+'" opacity\x3d"',t,'" o:opacity2\x3d"',r,'" type\x3d"',k,'" ',w,'focus\x3d"100%" method\x3d"any" /\x3e'];
A(m.prepVML(q),null,null,b)};v=a[0];x=a[a.length-1];0<v[0]&&a.unshift([0,v[1]]);1>x[0]&&a.push([1,x[1]]);a.forEach(function(a,b){h.test(a[1])?(g=d.color(a[1]),f=g.get("rgb"),n=g.get("a")):(f=a[1],n=1);B.push(100*a[0]+"% "+f);b?(t=n,u=f):(r=n,y=f)});if("fill"===c)if("gradient"===k)c=p.x1||p[0]||0,a=p.y1||p[1]||0,v=p.x2||p[2]||0,p=p.y2||p[3]||0,w='angle\x3d"'+(90-180*Math.atan((p-a)/(v-c))/Math.PI)+'"',C();else{var l=p.r,D=2*l,E=2*l,F=p.cx,G=p.cy,I=b.radialReference,z,l=function(){I&&(z=e.getBBox(),
F+=(I[0]-z.x)/z.width-.5,G+=(I[1]-z.y)/z.height-.5,D*=I[2]/z.width,E*=I[2]/z.height);w='src\x3d"'+d.getOptions().global.VMLRadialGradientURL+'" size\x3d"'+D+","+E+'" origin\x3d"0.5,0.5" position\x3d"'+F+","+G+'" color2\x3d"'+y+'" ';C()};e.added?l():e.onAdd=l;l=u}else l=f}else h.test(a)&&"IMG"!==b.tagName?(g=d.color(a),e[c+"-opacitySetter"](g.get("a"),c,b),l=g.get("rgb")):(l=b.getElementsByTagName(c),l.length&&(l[0].opacity=1,l[0].type="solid"),l=a);return l},prepVML:function(a){var b=this.isIE8;a=
a.join("");b?(a=a.replace("/\x3e",' xmlns\x3d"urn:schemas-microsoft-com:vml" /\x3e'),a=-1===a.indexOf('style\x3d"')?a.replace("/\x3e",' style\x3d"display:inline-block;behavior:url(#default#VML);" /\x3e'):a.replace('style\x3d"','style\x3d"display:inline-block;behavior:url(#default#VML);')):a=a.replace("\x3c","\x3chcv:");return a},text:t.prototype.html,path:function(a){var b={coordsize:"10 10"};M(a)?b.d=a:C(a)&&B(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,c){var e=this.symbol("circle");
C(a)&&(c=a.r,b=a.y,a=a.x);e.isCircle=!0;e.r=c;return e.attr({x:a,y:b})},g:function(a){var b;a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a});return this.createElement("div").attr(b)},image:function(a,b,c,e,d){var g=this.createElement("img").attr({src:a});1<arguments.length&&g.attr({x:b,y:c,width:e,height:d});return g},createElement:function(a){return"rect"===a?this.symbol(a):t.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this;b=b.style;var e="IMG"===a.tagName&&a.style;
w(a,{flip:"x",left:r(b.width)-(e?r(e.top):1),top:r(b.height)-(e?r(e.left):1),rotation:-90});[].forEach.call(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,e,d){var g=d.start,h=d.end,f=d.r||c||e;c=d.innerR;e=Math.cos(g);var m=Math.sin(g),k=Math.cos(h),n=Math.sin(h);if(0===h-g)return["x"];g=["wa",a-f,b-f,a+f,b+f,a+f*e,b+f*m,a+f*k,b+f*n];d.open&&!c&&g.push("e","M",a,b);g.push("at",a-c,b-c,a+c,b+c,a+c*k,b+c*n,a+c*e,b+c*m,"x","e");g.isArc=!0;return g},circle:function(a,b,c,
e,d){d&&E(d.r)&&(c=e=2*d.r);d&&d.isCircle&&(a-=c/2,b-=e/2);return["wa",a,b,a+c,b+e,a+c,b+e/2,a+c,b+e/2,"e"]},rect:function(a,b,c,d,f){return t.prototype.symbols[E(f)&&f.r?"callout":"square"].call(0,a,b,c,d,f)}}},d.VMLRenderer=k=function(){this.init.apply(this,arguments)},k.prototype=N(t.prototype,f),d.Renderer=k);t.prototype.getSpanWidth=function(a,b){var c=a.getBBox(!0).width;!D&&this.forExport&&(c=this.measureSpanWidth(b.firstChild.data,a.styles));return c};t.prototype.measureSpanWidth=function(a,
b){var c=h.createElement("span");a=h.createTextNode(a);c.appendChild(a);w(c,b);this.box.appendChild(c);b=c.offsetWidth;F(c);return b}})(k)});
//# sourceMappingURL=oldie.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,9 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
(c) 2009-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define(function(){return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){});
//# sourceMappingURL=overlapping-datalabels.js.map
@@ -0,0 +1 @@
{"version":3,"file":"overlapping-datalabels.js.map","lineCount":8,"mappings":"A;;;;;;;AAQC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,QAAS,EAAG,CACf,MAAOH,EADQ,CAAnB,CADG,CAKHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CATY,CAAnB,CAAA,CAWC,QAAS,CAACD,CAAD,CAAa,EAXvB;","sources":["overlapping-datalabels.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined"]}
@@ -0,0 +1,22 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
*
* (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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
}));
@@ -0,0 +1,18 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Support for parallel coordinates in Highcharts
(c) 2010-2019 Pawel Fus
License: www.highcharts.com/license
*/
(function(e){"object"===typeof module&&module.exports?(e["default"]=e,module.exports=e):"function"===typeof define&&define.amd?define(function(){return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){(function(b){function e(a){var c=this.series&&this.series.chart,h=a.apply(this,Array.prototype.slice.call(arguments,1)),k,e,d;c&&c.hasParallelCoordinates&&!m(h.formattedValue)&&(d=c.yAxis[this.x],k=d.options,c=(e=q(k.tooltipValueFormat,k.labels.format))?b.format(e,n(this,{value:this.y}),
c.time):d.isDatetimeAxis?c.time.dateFormat(c.time.resolveDTLFormat(k.dateTimeLabelFormats[d.tickPositions.info.unitName]).main,this.y):k.categories?k.categories[this.y]:this.y,h.formattedValue=h.point.formattedValue=c);return h}var r=b.Axis,p=b.Chart,w=p.prototype,t=b.Axis.prototype,f=b.addEvent,q=b.pick,x=b.wrap,l=b.merge,y=b.erase,u=b.splat,n=b.extend,m=b.defined,z=b.arrayMin,A=b.arrayMax,v={lineWidth:0,tickLength:0,opposite:!0,type:"category"};b.setOptions({chart:{parallelCoordinates:!1,parallelAxes:{lineWidth:1,
title:{text:"",reserveSpace:!1},labels:{x:0,y:4,align:"center",reserveSpace:!1},offset:0}}});f(p,"init",function(a){a=a.args[0];var c=u(a.yAxis||{}),h=c.length,b=[];if(this.hasParallelCoordinates=a.chart&&a.chart.parallelCoordinates){for(this.setParallelInfo(a);h<=this.parallelInfo.counter;h++)b.push({});a.legend||(a.legend={});void 0===a.legend.enabled&&(a.legend.enabled=!1);l(!0,a,{boost:{seriesThreshold:Number.MAX_VALUE},plotOptions:{series:{boostThreshold:Number.MAX_VALUE}}});a.yAxis=c.concat(b);
a.xAxis=l(v,u(a.xAxis||{})[0])}});f(p,"update",function(a){a=a.options;a.chart&&(m(a.chart.parallelCoordinates)&&(this.hasParallelCoordinates=a.chart.parallelCoordinates),this.hasParallelCoordinates&&a.chart.parallelAxes&&(this.options.chart.parallelAxes=l(this.options.chart.parallelAxes,a.chart.parallelAxes),this.yAxis.forEach(function(a){a.update({},!1)})))});n(w,{setParallelInfo:function(a){var c=this;a=a.series;c.parallelInfo={counter:0};a.forEach(function(a){a.data&&(c.parallelInfo.counter=Math.max(c.parallelInfo.counter,
a.data.length-1))})}});t.keepProps.push("parallelPosition");f(r,"afterSetOptions",function(a){var c=this.chart,b=["left","width","height","top"];c.hasParallelCoordinates&&(c.inverted&&(b=b.reverse()),this.isXAxis?this.options=l(this.options,v,a.userOptions):(this.options=l(this.options,this.chart.options.chart.parallelAxes,a.userOptions),this.parallelPosition=q(this.parallelPosition,c.yAxis.length),this.setParallelPosition(b,this.options)))});f(r,"getSeriesExtremes",function(a){if(this.chart&&this.chart.hasParallelCoordinates&&
!this.isXAxis){var c=this.parallelPosition,b=[];this.series.forEach(function(a){a.visible&&m(a.yData[c])&&b.push(a.yData[c])});this.dataMin=z(b);this.dataMax=A(b);a.preventDefault()}});n(t,{setParallelPosition:function(a,c){var b=(this.parallelPosition+.5)/(this.chart.parallelInfo.counter+1);this.chart.polar?c.angle=360*b:(c[a[0]]=100*b+"%",this[a[1]]=c[a[1]]=0,this[a[2]]=c[a[2]]=null,this[a[3]]=c[a[3]]=null)}});f(b.Series,"bindAxes",function(a){if(this.chart.hasParallelCoordinates){var c=this;this.chart.axes.forEach(function(a){c.insert(a.series);
a.isDirty=!0});c.xAxis=this.chart.xAxis[0];c.yAxis=this.chart.yAxis[0];a.preventDefault()}});f(b.Series,"afterTranslate",function(){var a=this.chart,c=this.points,b=c&&c.length,e=Number.MAX_VALUE,f,d,g;if(this.chart.hasParallelCoordinates){for(g=0;g<b;g++)d=c[g],m(d.y)?(d.plotX=a.polar?a.yAxis[g].angleRad||0:a.inverted?a.plotHeight-a.yAxis[g].top+a.plotTop:a.yAxis[g].left-a.plotLeft,d.clientX=d.plotX,d.plotY=a.yAxis[g].translate(d.y,!1,!0,null,!0),void 0!==f&&(e=Math.min(e,Math.abs(d.plotX-f))),f=
d.plotX,d.isInside=a.isInsidePlot(d.plotX,d.plotY,a.inverted)):d.isNull=!0;this.closestPointRangePx=e}},{order:1});b.addEvent(b.Series,"destroy",function(){this.chart.hasParallelCoordinates&&(this.chart.axes||[]).forEach(function(a){a&&a.series&&(y(a.series,this),a.isDirty=a.forceRedraw=!0)},this)});["line","spline"].forEach(function(a){x(b.seriesTypes[a].prototype.pointClass.prototype,"getLabelConfig",e)})})(e)});
//# sourceMappingURL=parallel-coordinates.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,517 @@
/**
* @license Highcharts JS v7.0.3 (2019-02-06)
*
* Support for parallel coordinates in Highcharts
*
* (c) 2010-2019 Pawel Fus
*
* 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(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
(function (H) {
/* *
* Parallel coordinates module
*
* (c) 2010-2019 Pawel Fus
*
* License: www.highcharts.com/license
*/
// Extensions for parallel coordinates plot.
var Axis = H.Axis,
Chart = H.Chart,
ChartProto = Chart.prototype,
AxisProto = H.Axis.prototype;
var addEvent = H.addEvent,
pick = H.pick,
wrap = H.wrap,
merge = H.merge,
erase = H.erase,
splat = H.splat,
extend = H.extend,
defined = H.defined,
arrayMin = H.arrayMin,
arrayMax = H.arrayMax;
var defaultXAxisOptions = {
lineWidth: 0,
tickLength: 0,
opposite: true,
type: 'category'
};
/**
* @optionparent chart
*/
var defaultParallelOptions = {
/**
* Flag to render charts as a parallel coordinates plot. In a parallel
* coordinates plot (||-coords) by default all required yAxes are generated
* and the legend is disabled. This feature requires
* `modules/parallel-coordinates.js`.
*
* @sample {highcharts} /highcharts/demo/parallel-coordinates/
* Parallel coordinates demo
* @sample {highcharts} highcharts/parallel-coordinates/polar/
* Star plot, multivariate data in a polar chart
*
* @since 6.0.0
* @product highcharts
*/
parallelCoordinates: false,
/**
* Common options for all yAxes rendered in a parallel coordinates plot.
* This feature requires `modules/parallel-coordinates.js`.
*
* The default options are:
* <pre>
* parallelAxes: {
* lineWidth: 1, // classic mode only
* gridlinesWidth: 0, // classic mode only
* title: {
* text: '',
* reserveSpace: false
* },
* labels: {
* x: 0,
* y: 0,
* align: 'center',
* reserveSpace: false
* },
* offset: 0
* }</pre>
*
* @sample {highcharts} highcharts/parallel-coordinates/parallelaxes/
* Set the same tickAmount for all yAxes
*
* @extends yAxis
* @since 6.0.0
* @product highcharts
* @excluding alternateGridColor, breaks, id, gridLineColor,
* gridLineDashStyle, gridLineWidth, minorGridLineColor,
* minorGridLineDashStyle, minorGridLineWidth, plotBands,
* plotLines, angle, gridLineInterpolation, maxColor, maxZoom,
* minColor, scrollbar, stackLabels, stops
*/
parallelAxes: {
lineWidth: 1,
/**
* Titles for yAxes are taken from
* [xAxis.categories](#xAxis.categories). All options for `xAxis.labels`
* applies to parallel coordinates titles. For example, to style
* categories, use [xAxis.labels.style](#xAxis.labels.style).
*
* @excluding align, enabled, margin, offset, position3d, reserveSpace,
* rotation, skew3d, style, text, useHTML, x, y
*/
title: {
text: '',
reserveSpace: false
},
labels: {
x: 0,
y: 4,
align: 'center',
reserveSpace: false
},
offset: 0
}
};
H.setOptions({
chart: defaultParallelOptions
});
// Initialize parallelCoordinates
addEvent(Chart, 'init', function (e) {
var options = e.args[0],
defaultyAxis = splat(options.yAxis || {}),
yAxisLength = defaultyAxis.length,
newYAxes = [];
/**
* Flag used in parallel coordinates plot to check if chart has ||-coords
* (parallel coords).
*
* @requires module:modules/parallel-coordinates
*
* @name Highcharts.Chart#hasParallelCoordinates
* @type {boolean}
*/
this.hasParallelCoordinates = options.chart &&
options.chart.parallelCoordinates;
if (this.hasParallelCoordinates) {
this.setParallelInfo(options);
// Push empty yAxes in case user did not define them:
for (; yAxisLength <= this.parallelInfo.counter; yAxisLength++) {
newYAxes.push({});
}
if (!options.legend) {
options.legend = {};
}
if (options.legend.enabled === undefined) {
options.legend.enabled = false;
}
merge(
true,
options,
// Disable boost
{
boost: {
seriesThreshold: Number.MAX_VALUE
},
plotOptions: {
series: {
boostThreshold: Number.MAX_VALUE
}
}
}
);
options.yAxis = defaultyAxis.concat(newYAxes);
options.xAxis = merge(
defaultXAxisOptions, // docs
splat(options.xAxis || {})[0]
);
}
});
// Initialize parallelCoordinates
addEvent(Chart, 'update', function (e) {
var options = e.options;
if (options.chart) {
if (defined(options.chart.parallelCoordinates)) {
this.hasParallelCoordinates = options.chart.parallelCoordinates;
}
if (this.hasParallelCoordinates && options.chart.parallelAxes) {
this.options.chart.parallelAxes = merge(
this.options.chart.parallelAxes,
options.chart.parallelAxes
);
this.yAxis.forEach(function (axis) {
axis.update({}, false);
});
}
}
});
extend(ChartProto, /** @lends Highcharts.Chart.prototype */ {
/**
* Define how many parellel axes we have according to the longest dataset.
* This is quite heavy - loop over all series and check series.data.length
* Consider:
*
* - make this an option, so user needs to set this to get better
* performance
*
* - check only first series for number of points and assume the rest is the
* same
*
* @private
* @function Highcharts.Chart#setParallelInfo
*
* @param {Highcharts.Options} options
* User options
*/
setParallelInfo: function (options) {
var chart = this,
seriesOptions = options.series;
chart.parallelInfo = {
counter: 0
};
seriesOptions.forEach(function (series) {
if (series.data) {
chart.parallelInfo.counter = Math.max(
chart.parallelInfo.counter,
series.data.length - 1
);
}
});
}
});
// On update, keep parallelPosition.
AxisProto.keepProps.push('parallelPosition');
// Update default options with predefined for a parallel coords.
addEvent(Axis, 'afterSetOptions', function (e) {
var axis = this,
chart = axis.chart,
axisPosition = ['left', 'width', 'height', 'top'];
if (chart.hasParallelCoordinates) {
if (chart.inverted) {
axisPosition = axisPosition.reverse();
}
if (axis.isXAxis) {
axis.options = merge(
axis.options,
defaultXAxisOptions,
e.userOptions
);
} else {
axis.options = merge(
axis.options,
axis.chart.options.chart.parallelAxes,
e.userOptions
);
axis.parallelPosition = pick(
axis.parallelPosition,
chart.yAxis.length
);
axis.setParallelPosition(axisPosition, axis.options);
}
}
});
/* Each axis should gather extremes from points on a particular position in
series.data. Not like the default one, which gathers extremes from all series
bind to this axis. Consider using series.points instead of series.yData. */
addEvent(Axis, 'getSeriesExtremes', function (e) {
if (this.chart && this.chart.hasParallelCoordinates && !this.isXAxis) {
var index = this.parallelPosition,
currentPoints = [];
this.series.forEach(function (series) {
if (series.visible && defined(series.yData[index])) {
// We need to use push() beacause of null points
currentPoints.push(series.yData[index]);
}
});
this.dataMin = arrayMin(currentPoints);
this.dataMax = arrayMax(currentPoints);
e.preventDefault();
}
});
extend(AxisProto, /** @lends Highcharts.Axis.prototype */ {
/**
* Set predefined left+width and top+height (inverted) for yAxes. This
* method modifies options param.
*
* @function Highcharts.Axis#setParallelPosition
*
* @param {Array<string>} axisPosition
* ['left', 'width', 'height', 'top'] or
* ['top', 'height', 'width', 'left'] for an inverted chart.
*
* @param {Highcharts.AxisOptions} options
* {@link Highcharts.Axis#options}.
*/
setParallelPosition: function (axisPosition, options) {
var fraction = (this.parallelPosition + 0.5) /
(this.chart.parallelInfo.counter + 1);
if (this.chart.polar) {
options.angle = 360 * fraction;
} else {
options[axisPosition[0]] = 100 * fraction + '%';
this[axisPosition[1]] = options[axisPosition[1]] = 0;
// In case of chart.update(inverted), remove old options:
this[axisPosition[2]] = options[axisPosition[2]] = null;
this[axisPosition[3]] = options[axisPosition[3]] = null;
}
}
});
// Bind each series to each yAxis. yAxis needs a reference to all series to
// calculate extremes.
addEvent(H.Series, 'bindAxes', function (e) {
if (this.chart.hasParallelCoordinates) {
var series = this;
this.chart.axes.forEach(function (axis) {
series.insert(axis.series);
axis.isDirty = true;
});
series.xAxis = this.chart.xAxis[0];
series.yAxis = this.chart.yAxis[0];
e.preventDefault();
}
});
// Translate each point using corresponding yAxis.
addEvent(H.Series, 'afterTranslate', function () {
var series = this,
chart = this.chart,
points = series.points,
dataLength = points && points.length,
closestPointRangePx = Number.MAX_VALUE,
lastPlotX,
point,
i;
if (this.chart.hasParallelCoordinates) {
for (i = 0; i < dataLength; i++) {
point = points[i];
if (defined(point.y)) {
if (chart.polar) {
point.plotX = chart.yAxis[i].angleRad || 0;
} else if (chart.inverted) {
point.plotX = (
chart.plotHeight -
chart.yAxis[i].top +
chart.plotTop
);
} else {
point.plotX = chart.yAxis[i].left - chart.plotLeft;
}
point.clientX = point.plotX;
point.plotY = chart.yAxis[i]
.translate(point.y, false, true, null, true);
if (lastPlotX !== undefined) {
closestPointRangePx = Math.min(
closestPointRangePx,
Math.abs(point.plotX - lastPlotX)
);
}
lastPlotX = point.plotX;
point.isInside = chart.isInsidePlot(
point.plotX,
point.plotY,
chart.inverted
);
} else {
point.isNull = true;
}
}
this.closestPointRangePx = closestPointRangePx;
}
}, { order: 1 });
// On destroy, we need to remove series from each axis.series
H.addEvent(H.Series, 'destroy', function () {
if (this.chart.hasParallelCoordinates) {
(this.chart.axes || []).forEach(function (axis) {
if (axis && axis.series) {
erase(axis.series, this);
axis.isDirty = axis.forceRedraw = true;
}
}, this);
}
});
function addFormattedValue(proceed) {
var chart = this.series && this.series.chart,
config = proceed.apply(this, Array.prototype.slice.call(arguments, 1)),
formattedValue,
yAxisOptions,
labelFormat,
yAxis;
if (
chart &&
chart.hasParallelCoordinates &&
!defined(config.formattedValue)
) {
yAxis = chart.yAxis[this.x];
yAxisOptions = yAxis.options;
labelFormat = pick(
/**
* Parallel coordinates only. Format that will be used for point.y
* and available in [tooltip.pointFormat](#tooltip.pointFormat) as
* `{point.formattedValue}`. If not set, `{point.formattedValue}`
* will use other options, in this order:
*
* 1. [yAxis.labels.format](#yAxis.labels.format) will be used if
* set
*
* 2. If yAxis is a category, then category name will be displayed
*
* 3. If yAxis is a datetime, then value will use the same format as
* yAxis labels
*
* 4. If yAxis is linear/logarithmic type, then simple value will be
* used
*
* @sample {highcharts}
* /highcharts/parallel-coordinates/tooltipvalueformat/
* Different tooltipValueFormats's
*
* @type {string}
* @default undefined
* @since 6.0.0
* @product highcharts
* @apioption yAxis.tooltipValueFormat
*/
yAxisOptions.tooltipValueFormat,
yAxisOptions.labels.format
);
if (labelFormat) {
formattedValue = H.format(
labelFormat,
extend(
this,
{ value: this.y }
),
chart.time
);
} else if (yAxis.isDatetimeAxis) {
formattedValue = chart.time.dateFormat(
chart.time.resolveDTLFormat(yAxisOptions.dateTimeLabelFormats[
yAxis.tickPositions.info.unitName
]).main,
this.y
);
} else if (yAxisOptions.categories) {
formattedValue = yAxisOptions.categories[this.y];
} else {
formattedValue = this.y;
}
config.formattedValue = config.point.formattedValue = formattedValue;
}
return config;
}
['line', 'spline'].forEach(function (seriesName) {
wrap(
H.seriesTypes[seriesName].prototype.pointClass.prototype,
'getLabelConfig',
addFormattedValue
);
});
}(Highcharts));
return (function () {
}());
}));
@@ -0,0 +1,14 @@
/*
Highcharts JS v7.0.3 (2019-02-06)
Pareto series type for Highcharts
(c) 2010-2019 Sebastian Bochan
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define(function(){return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){var e=function(f){var a=f.Series,d=f.addEvent;return{init:function(){a.prototype.init.apply(this,arguments);this.initialised=!1;this.baseSeries=null;this.eventRemovers=[];this.addEvents()},setDerivedData:f.noop,setBaseSeries:function(){var b=this.chart,c=this.options.baseSeries;
this.baseSeries=c&&(b.series[c]||b.get(c))||null},addEvents:function(){var b=this,c;c=d(this.chart,"afterLinkSeries",function(){b.setBaseSeries();b.baseSeries&&!b.initialised&&(b.setDerivedData(),b.addBaseSeriesEvents(),b.initialised=!0)});this.eventRemovers.push(c)},addBaseSeriesEvents:function(){var b=this,c,a;c=d(b.baseSeries,"updatedData",function(){b.setDerivedData()});a=d(b.baseSeries,"destroy",function(){b.baseSeries=null;b.initialised=!1});b.eventRemovers.push(c,a)},destroy:function(){this.eventRemovers.forEach(function(b){b()});
a.prototype.destroy.apply(this,arguments)}}}(a);(function(a,e){var d=a.correctFloat,b=a.seriesType;a=a.merge;b("pareto","line",{zIndex:3},a(e,{setDerivedData:function(){if(1<this.baseSeries.yData.length){var a=this.baseSeries.xData,b=this.baseSeries.yData,d=this.sumPointsPercents(b,a,null,!0);this.setData(this.sumPointsPercents(b,a,d,!1),!1)}},sumPointsPercents:function(a,b,f,e){var c=0,h=0,k=[],g;a.forEach(function(a,l){null!==a&&(e?c+=a:(g=a/f*100,k.push([b[l],d(h+g)]),h+=g))});return e?c:k}}))})(a,
e)});
//# sourceMappingURL=pareto.js.map

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