daru-view 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +4 -0
- data/.rubocop.yml +122 -0
- data/.simplecov +3 -0
- data/.travis.yml +18 -0
- data/CHANGELOG.md +21 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/CONTRIBUTING.md +53 -0
- data/Gemfile +11 -0
- data/LICENSE.txt +21 -0
- data/README.md +287 -0
- data/Rakefile +22 -0
- data/_config.yml +1 -0
- data/daru-view.gemspec +52 -0
- data/lib/assets/.keep +0 -0
- data/lib/daru/view.rb +127 -0
- data/lib/daru/view/adapters/datatables.rb +90 -0
- data/lib/daru/view/adapters/googlecharts.rb +180 -0
- data/lib/daru/view/adapters/googlecharts/data_table_iruby.rb +86 -0
- data/lib/daru/view/adapters/googlecharts/display.rb +54 -0
- data/lib/daru/view/adapters/googlecharts/iruby_notebook.rb +15 -0
- data/lib/daru/view/adapters/highcharts.rb +114 -0
- data/lib/daru/view/adapters/highcharts/core_ext/string.rb +10 -0
- data/lib/daru/view/adapters/highcharts/display.rb +58 -0
- data/lib/daru/view/adapters/highcharts/iruby_notebook.rb +29 -0
- data/lib/daru/view/adapters/highcharts/layout_helper_iruby.rb +76 -0
- data/lib/daru/view/adapters/js/googlecharts_js/google_visualr.js +44 -0
- data/lib/daru/view/adapters/js/googlecharts_js/loader.js +226 -0
- data/lib/daru/view/adapters/js/highcharts_js/adapters/mootools-adapter.js +13 -0
- data/lib/daru/view/adapters/js/highcharts_js/adapters/prototype-adapter.js +15 -0
- data/lib/daru/view/adapters/js/highcharts_js/highcharts-3d.js +74 -0
- data/lib/daru/view/adapters/js/highcharts_js/highcharts-more.js +64 -0
- data/lib/daru/view/adapters/js/highcharts_js/highcharts.js +399 -0
- data/lib/daru/view/adapters/js/highcharts_js/highstock.js +519 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/accessibility.js +48 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/annotations.js +14 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/boost.js +51 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/broken-axis.js +15 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/canvas-tools.js +133 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/data.js +26 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/drilldown.js +25 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/exporting.js +27 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/funnel.js +13 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/heatmap.js +25 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/no-data-to-display.js +12 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/offline-exporting.js +19 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/solid-gauge.js +14 -0
- data/lib/daru/view/adapters/js/highcharts_js/modules/treemap.js +31 -0
- data/lib/daru/view/adapters/js/highcharts_js/stock/adapters/mootools-adapter.js +13 -0
- data/lib/daru/view/adapters/js/highcharts_js/stock/adapters/prototype-adapter.js +15 -0
- data/lib/daru/view/adapters/js/highcharts_js/stock/highcharts-more.js +64 -0
- data/lib/daru/view/adapters/js/highcharts_js/stock/modules/exporting.js +27 -0
- data/lib/daru/view/adapters/js/highcharts_js/stock/modules/funnel.js +13 -0
- data/lib/daru/view/adapters/js/nyaplot_js/d3-downloadable.js +129 -0
- data/lib/daru/view/adapters/js/nyaplot_js/d3.min.js +5 -0
- data/lib/daru/view/adapters/js/nyaplot_js/nyaplot.js +5294 -0
- data/lib/daru/view/adapters/nyaplot.rb +62 -0
- data/lib/daru/view/adapters/nyaplot/display.rb +9 -0
- data/lib/daru/view/adapters/nyaplot/iruby_notebook.rb +22 -0
- data/lib/daru/view/app/rails/helpers/view_helper.rb +26 -0
- data/lib/daru/view/app/rails/railtie.rb +15 -0
- data/lib/daru/view/plot.rb +106 -0
- data/lib/daru/view/table.rb +99 -0
- data/lib/daru/view/templates/googlecharts/chart_div.erb +4 -0
- data/lib/daru/view/templates/googlecharts/init.inline.js.erb +16 -0
- data/lib/daru/view/templates/highcharts/init.inline.js.erb +16 -0
- data/lib/daru/view/templates/highcharts/static_html.erb +7 -0
- data/lib/daru/view/templates/nyaplot/init.inline.js.erb +16 -0
- data/lib/daru/view/templates/nyaplot/init_script.erb +3 -0
- data/lib/daru/view/version.rb +5 -0
- data/lib/tasks/.keep +0 -0
- data/lib/tasks/google_charts.rake +25 -0
- data/lib/tasks/high_charts.rake +60 -0
- data/lib/tasks/nyaplot.rake +25 -0
- data/spec/adapters/datatables_spec.rb +21 -0
- data/spec/adapters/googlecharts_spec.rb +34 -0
- data/spec/adapters/highcharts_spec.rb +177 -0
- data/spec/adapters/nyaplot_spec.rb +447 -0
- data/spec/app/rails/helpers/view_helpers_spec.rb +35 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Daru DataFrame and DataTables-checkpoint.ipynb +16091 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/DataTables | basic examples-checkpoint.ipynb +6 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Line Chart-checkpoint.ipynb +1389 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Area Chart-checkpoint.ipynb +606 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Bar Chart-checkpoint.ipynb +1404 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Bubble Chart-checkpoint.ipynb +866 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Candlestick Chart-checkpoint.ipynb +607 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Combo Chart-checkpoint.ipynb +478 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Histogram-checkpoint.ipynb +1182 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Org Chart-checkpoint.ipynb +6 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Pie Chart-checkpoint.ipynb +6 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Stepped Area Chart-checkpoint.ipynb +699 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Timeline-checkpoint.ipynb +1523 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | Treemap-checkpoint.ipynb +650 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Chart | gauge-checkpoint.ipynb +477 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Charts | Basics-checkpoint.ipynb +1881 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Charts | Column Charts-checkpoint.ipynb +6 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Charts | Geo Charts examples-checkpoint.ipynb +791 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Google Charts | Scatter Chart-checkpoint.ipynb +1570 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/GoolgeChart | Datatables-checkpoint.ipynb +1792 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/HighCharts - Area chart-checkpoint.ipynb +1272 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/HighCharts - Bar Chart-checkpoint.ipynb +877 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/HighCharts - column charts-checkpoint.ipynb +1587 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/HighCharts- Pie charts-checkpoint.ipynb +1126 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Highcharts - Combinations -checkpoint.ipynb +925 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Highcharts - Daynamic charts-checkpoint.ipynb +839 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Highcharts - line graphs-checkpoint.ipynb +1297 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Highcharts - line graphs2-checkpoint.ipynb +879 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Highcharts - scatter -bubble charts-checkpoint.ipynb +1071 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Highcharts | add_series method and highcharts examples-checkpoint.ipynb +1165 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Nyaplot basics | Daru Examples-checkpoint.ipynb +1383 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Nyaplot other examples-checkpoint.ipynb +6 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Nyaplot testing -checkpoint.ipynb +270 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Nyaplot | Creating Visualizations with DataFrame | from daru examples-checkpoint.ipynb +1716 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/Pie Chart using HighCharts2-checkpoint.ipynb +784 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/highcharts - Use HTML table (generated from daru) as data source-checkpoint.ipynb +956 -0
- data/spec/dummy_iruby/.ipynb_checkpoints/spec_testing-checkpoint.ipynb +1433 -0
- data/spec/dummy_iruby/Daru DataFrame and DataTables.ipynb +16091 -0
- data/spec/dummy_iruby/DataTables | basic examples.ipynb +15587 -0
- data/spec/dummy_iruby/Gemfile +33 -0
- data/spec/dummy_iruby/Google Chart | Line Chart.ipynb +1389 -0
- data/spec/dummy_iruby/Google Chart | Area Chart.ipynb +606 -0
- data/spec/dummy_iruby/Google Chart | Bar Chart.ipynb +1394 -0
- data/spec/dummy_iruby/Google Chart | Bubble Chart.ipynb +866 -0
- data/spec/dummy_iruby/Google Chart | Candlestick Chart.ipynb +607 -0
- data/spec/dummy_iruby/Google Chart | Combo Chart.ipynb +478 -0
- data/spec/dummy_iruby/Google Chart | Histogram.ipynb +1182 -0
- data/spec/dummy_iruby/Google Chart | Org Chart.ipynb +474 -0
- data/spec/dummy_iruby/Google Chart | Pie Chart.ipynb +1177 -0
- data/spec/dummy_iruby/Google Chart | Stepped Area Chart.ipynb +699 -0
- data/spec/dummy_iruby/Google Chart | Timeline.ipynb +1523 -0
- data/spec/dummy_iruby/Google Chart | Treemap.ipynb +659 -0
- data/spec/dummy_iruby/Google Chart | gauge.ipynb +477 -0
- data/spec/dummy_iruby/Google Charts | Basics.ipynb +1882 -0
- data/spec/dummy_iruby/Google Charts | Column Charts.ipynb +1138 -0
- data/spec/dummy_iruby/Google Charts | Geo Charts examples.ipynb +791 -0
- data/spec/dummy_iruby/Google Charts | Scatter Chart.ipynb +1570 -0
- data/spec/dummy_iruby/GoolgeChart | Datatables.ipynb +1801 -0
- data/spec/dummy_iruby/HighCharts - Area chart.ipynb +1272 -0
- data/spec/dummy_iruby/HighCharts - Bar Chart.ipynb +877 -0
- data/spec/dummy_iruby/HighCharts - column charts.ipynb +1587 -0
- data/spec/dummy_iruby/HighCharts- Pie charts.ipynb +1197 -0
- data/spec/dummy_iruby/Highcharts - Combinations .ipynb +925 -0
- data/spec/dummy_iruby/Highcharts - Daynamic charts.ipynb +839 -0
- data/spec/dummy_iruby/Highcharts - line graphs.ipynb +1297 -0
- data/spec/dummy_iruby/Highcharts - line graphs2.ipynb +879 -0
- data/spec/dummy_iruby/Highcharts - scatter -bubble charts.ipynb +1071 -0
- data/spec/dummy_iruby/Highcharts | add_series method and highcharts examples.ipynb +1228 -0
- data/spec/dummy_iruby/Nyaplot basics | Daru Examples.ipynb +1390 -0
- data/spec/dummy_iruby/Nyaplot other examples.ipynb +589 -0
- data/spec/dummy_iruby/Nyaplot testing .ipynb +270 -0
- data/spec/dummy_iruby/Nyaplot | Creating Visualizations with DataFrame | from daru examples.ipynb +1716 -0
- data/spec/dummy_iruby/Pie Chart using HighCharts2.ipynb +784 -0
- data/spec/dummy_iruby/highcharts - Use HTML table (generated from daru) as data source.ipynb +951 -0
- data/spec/dummy_iruby/spec_testing.ipynb +1433 -0
- data/spec/dummy_nanoc/Gemfile +12 -0
- data/spec/dummy_nanoc/README.md +40 -0
- data/spec/dummy_nanoc/Rules +90 -0
- data/spec/dummy_nanoc/content/googlecharts/index.html +29 -0
- data/spec/dummy_nanoc/content/highcharts/index.html +42 -0
- data/spec/dummy_nanoc/content/index.html +26 -0
- data/spec/dummy_nanoc/content/nyaplot/index.html +9 -0
- data/spec/dummy_nanoc/content/stylesheet.css +101 -0
- data/spec/dummy_nanoc/layouts/default.html +31 -0
- data/spec/dummy_nanoc/layouts/googlecharts_layout.html +30 -0
- data/spec/dummy_nanoc/layouts/highcharts_layout.html +30 -0
- data/spec/dummy_nanoc/layouts/nyaplot_layout.html +30 -0
- data/spec/dummy_nanoc/lib/default.rb +300 -0
- data/spec/dummy_nanoc/nanoc.yaml +90 -0
- data/spec/dummy_nanoc/output/googlecharts/index.html +390 -0
- data/spec/dummy_nanoc/output/highcharts/index.html +1153 -0
- data/spec/dummy_nanoc/output/index.html +87 -0
- data/spec/dummy_nanoc/output/nyaplot/index.html +135 -0
- data/spec/dummy_nanoc/output/stylesheet.css +101 -0
- data/spec/dummy_nanoc/tmp/nanoc/1029d67644815/checksums +0 -0
- data/spec/dummy_nanoc/tmp/nanoc/1029d67644815/compiled_content +2229 -0
- data/spec/dummy_nanoc/tmp/nanoc/1029d67644815/dependencies +5 -0
- data/spec/dummy_nanoc/tmp/nanoc/1029d67644815/outdatedness +0 -0
- data/spec/dummy_nanoc/tmp/nanoc/1029d67644815/rule_memory +0 -0
- data/spec/dummy_sinatra/Gemfile +9 -0
- data/spec/dummy_sinatra/README.md +15 -0
- data/spec/dummy_sinatra/app.rb +143 -0
- data/spec/dummy_sinatra/config.ru +0 -0
- data/spec/dummy_sinatra/views/googlecharts.erb +31 -0
- data/spec/dummy_sinatra/views/googlecharts_layout.erb +12 -0
- data/spec/dummy_sinatra/views/highcharts.erb +15 -0
- data/spec/dummy_sinatra/views/highcharts_layout.erb +12 -0
- data/spec/dummy_sinatra/views/index.erb +2 -0
- data/spec/dummy_sinatra/views/layout.erb +26 -0
- data/spec/dummy_sinatra/views/nyaplot.erb +13 -0
- data/spec/dummy_sinatra/views/nyaplot_layout.erb +14 -0
- data/spec/plot_spec.rb +86 -0
- data/spec/spec_helper.rb +11 -0
- metadata +568 -0
@@ -0,0 +1,1153 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Highcharts examples</title>
|
6
|
+
<link rel="stylesheet" href="/stylesheet.css">
|
7
|
+
|
8
|
+
<!-- you don't need to keep this, but it's cool for stats! -->
|
9
|
+
<meta name="generator" content="Nanoc 4.7.13">
|
10
|
+
|
11
|
+
<script type='text/javascript'>
|
12
|
+
/* BEGIN highcharts.js */
|
13
|
+
|
14
|
+
/*
|
15
|
+
Highcharts JS v5.0.12 (2017-05-24)
|
16
|
+
|
17
|
+
(c) 2009-2016 Torstein Honsi
|
18
|
+
|
19
|
+
License: www.highcharts.com/license
|
20
|
+
*/
|
21
|
+
(function(K,S){"object"===typeof module&&module.exports?module.exports=K.document?S(K):S:K.Highcharts=S(K)})("undefined"!==typeof window?window:this,function(K){K=function(){var a=window,C=a.document,A=a.navigator&&a.navigator.userAgent||"",G=C&&C.createElementNS&&!!C.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,F=/(edge|msie|trident)/i.test(A)&&!window.opera,m=!G,g=/Firefox/.test(A),k=g&&4>parseInt(A.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highcharts",
|
22
|
+
version:"5.0.12",deg2rad:2*Math.PI/360,doc:C,hasBidiBug:k,hasTouch:C&&void 0!==C.documentElement.ontouchstart,isMS:F,isWebKit:/AppleWebKit/.test(A),isFirefox:g,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(A),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:G,vml:m,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){var C=[],A=a.charts,G=a.doc,F=a.win;a.error=function(m,g){m=a.isNumber(m)?"Highcharts error #"+
|
23
|
+
m+": www.highcharts.com/errors/"+m:m;if(g)throw Error(m);F.console&&console.log(m)};a.Fx=function(a,g,k){this.options=g;this.elem=a;this.prop=k};a.Fx.prototype={dSetter:function(){var a=this.paths[0],g=this.paths[1],k=[],q=this.now,v=a.length,u;if(1===q)k=this.toD;else if(v===g.length&&1>q)for(;v--;)u=parseFloat(a[v]),k[v]=isNaN(u)?a[v]:q*parseFloat(g[v]-u)+u;else k=g;this.elem.attr("d",k,null,!0)},update:function(){var a=this.elem,g=this.prop,k=this.now,q=this.options.step;if(this[g+"Setter"])this[g+
|
24
|
+
"Setter"]();else a.attr?a.element&&a.attr(g,k,null,!0):a.style[g]=k+this.unit;q&&q.call(a,k,this)},run:function(a,g,k){var m=this,v=function(a){return v.stopped?!1:m.step(a)},u;this.startTime=+new Date;this.start=a;this.end=g;this.unit=k;this.now=this.start;this.pos=0;v.elem=this.elem;v.prop=this.prop;v()&&1===C.push(v)&&(v.timerId=setInterval(function(){for(u=0;u<C.length;u++)C[u]()||C.splice(u--,1);C.length||clearInterval(v.timerId)},13))},step:function(m){var g=+new Date,k,q=this.options,v=this.elem,
|
25
|
+
u=q.complete,h=q.duration,e=q.curAnim;v.attr&&!v.element?m=!1:m||g>=h+this.startTime?(this.now=this.end,this.pos=1,this.update(),k=e[this.prop]=!0,a.objectEach(e,function(a){!0!==a&&(k=!1)}),k&&u&&u.call(v),m=!1):(this.pos=q.easing((g-this.startTime)/h),this.now=this.start+(this.end-this.start)*this.pos,this.update(),m=!0);return m},initPath:function(m,g,k){function q(a){var b,l;for(y=a.length;y--;)b="M"===a[y]||"L"===a[y],l=/[a-zA-Z]/.test(a[y+3]),b&&l&&a.splice(y+1,0,a[y+1],a[y+2],a[y+1],a[y+2])}
|
26
|
+
function v(a,b){for(;a.length<w;){a[0]=b[w-a.length];var l=a.slice(0,c);[].splice.apply(a,[0,0].concat(l));D&&(l=a.slice(a.length-c),[].splice.apply(a,[a.length,0].concat(l)),y--)}a[0]="M"}function u(a,l){for(var r=(w-a.length)/c;0<r&&r--;)b=a.slice().splice(a.length/H-c,c*H),b[0]=l[w-c-r*c],d&&(b[c-6]=b[c-2],b[c-5]=b[c-1]),[].splice.apply(a,[a.length/H,0].concat(b)),D&&r--}g=g||"";var h,e=m.startX,n=m.endX,d=-1<g.indexOf("C"),c=d?7:3,w,b,y;g=g.split(" ");k=k.slice();var D=m.isArea,H=D?2:1,l;d&&(q(g),
|
27
|
+
q(k));if(e&&n){for(y=0;y<e.length;y++)if(e[y]===n[0]){h=y;break}else if(e[0]===n[n.length-e.length+y]){h=y;l=!0;break}void 0===h&&(g=[])}g.length&&a.isNumber(h)&&(w=k.length+h*H*c,l?(v(g,k),u(k,g)):(v(k,g),u(g,k)));return[g,k]}};a.Fx.prototype.fillSetter=a.Fx.prototype.strokeSetter=function(){this.elem.attr(this.prop,a.color(this.start).tweenTo(a.color(this.end),this.pos),null,!0)};a.extend=function(a,g){var m;a||(a={});for(m in g)a[m]=g[m];return a};a.merge=function(){var m,g=arguments,k,q={},v=
|
28
|
+
function(g,h){"object"!==typeof g&&(g={});a.objectEach(h,function(e,n){!a.isObject(e,!0)||a.isClass(e)||a.isDOMElement(e)?g[n]=h[n]:g[n]=v(g[n]||{},e)});return g};!0===g[0]&&(q=g[1],g=Array.prototype.slice.call(g,2));k=g.length;for(m=0;m<k;m++)q=v(q,g[m]);return q};a.pInt=function(a,g){return parseInt(a,g||10)};a.isString=function(a){return"string"===typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a};a.isObject=function(m,
|
29
|
+
g){return!!m&&"object"===typeof m&&(!g||!a.isArray(m))};a.isDOMElement=function(m){return a.isObject(m)&&"number"===typeof m.nodeType};a.isClass=function(m){var g=m&&m.constructor;return!(!a.isObject(m,!0)||a.isDOMElement(m)||!g||!g.name||"Object"===g.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=function(a,g){for(var m=a.length;m--;)if(a[m]===g){a.splice(m,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(m,g,k){var q;a.isString(g)?a.defined(k)?
|
30
|
+
m.setAttribute(g,k):m&&m.getAttribute&&(q=m.getAttribute(g)):a.defined(g)&&a.isObject(g)&&a.objectEach(g,function(a,g){m.setAttribute(g,a)});return q};a.splat=function(m){return a.isArray(m)?m:[m]};a.syncTimeout=function(a,g,k){if(g)return setTimeout(a,g,k);a.call(0,k)};a.pick=function(){var a=arguments,g,k,q=a.length;for(g=0;g<q;g++)if(k=a[g],void 0!==k&&null!==k)return k};a.css=function(m,g){a.isMS&&!a.svg&&g&&void 0!==g.opacity&&(g.filter="alpha(opacity\x3d"+100*g.opacity+")");a.extend(m.style,
|
31
|
+
g)};a.createElement=function(m,g,k,q,v){m=G.createElement(m);var u=a.css;g&&a.extend(m,g);v&&u(m,{padding:0,border:"none",margin:0});k&&u(m,k);q&&q.appendChild(m);return m};a.extendClass=function(m,g){var k=function(){};k.prototype=new m;a.extend(k.prototype,g);return k};a.pad=function(a,g,k){return Array((g||2)+1-String(a).length).join(k||0)+a};a.relativeLength=function(a,g){return/%$/.test(a)?g*parseFloat(a)/100:parseFloat(a)};a.wrap=function(a,g,k){var q=a[g];a[g]=function(){var a=Array.prototype.slice.call(arguments),
|
32
|
+
g=arguments,h=this;h.proceed=function(){q.apply(h,arguments.length?arguments:g)};a.unshift(q);a=k.apply(this,a);h.proceed=null;return a}};a.getTZOffset=function(m){var g=a.Date;return 6E4*(g.hcGetTimezoneOffset&&g.hcGetTimezoneOffset(m)||g.hcTimezoneOffset||0)};a.dateFormat=function(m,g,k){if(!a.defined(g)||isNaN(g))return a.defaultOptions.lang.invalidDate||"";m=a.pick(m,"%Y-%m-%d %H:%M:%S");var q=a.Date,v=new q(g-a.getTZOffset(g)),u=v[q.hcGetHours](),h=v[q.hcGetDay](),e=v[q.hcGetDate](),n=v[q.hcGetMonth](),
|
33
|
+
d=v[q.hcGetFullYear](),c=a.defaultOptions.lang,w=c.weekdays,b=c.shortWeekdays,y=a.pad,q=a.extend({a:b?b[h]:w[h].substr(0,3),A:w[h],d:y(e),e:y(e,2," "),w:h,b:c.shortMonths[n],B:c.months[n],m:y(n+1),y:d.toString().substr(2,2),Y:d,H:y(u),k:u,I:y(u%12||12),l:u%12||12,M:y(v[q.hcGetMinutes]()),p:12>u?"AM":"PM",P:12>u?"am":"pm",S:y(v.getSeconds()),L:y(Math.round(g%1E3),3)},a.dateFormats);a.objectEach(q,function(a,b){for(;-1!==m.indexOf("%"+b);)m=m.replace("%"+b,"function"===typeof a?a(g):a)});return k?m.substr(0,
|
34
|
+
1).toUpperCase()+m.substr(1):m};a.formatSingle=function(m,g){var k=/\.([0-9])/,q=a.defaultOptions.lang;/f$/.test(m)?(k=(k=m.match(k))?k[1]:-1,null!==g&&(g=a.numberFormat(g,k,q.decimalPoint,-1<m.indexOf(",")?q.thousandsSep:""))):g=a.dateFormat(m,g);return g};a.format=function(m,g){for(var k="{",q=!1,v,u,h,e,n=[],d;m;){k=m.indexOf(k);if(-1===k)break;v=m.slice(0,k);if(q){v=v.split(":");u=v.shift().split(".");e=u.length;d=g;for(h=0;h<e;h++)d=d[u[h]];v.length&&(d=a.formatSingle(v.join(":"),d));n.push(d)}else n.push(v);
|
35
|
+
m=m.slice(k+1);k=(q=!q)?"}":"{"}n.push(m);return n.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(m,g,k,q,v){var u,h=m;k=a.pick(k,1);u=m/k;g||(g=v?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===q&&(1===k?g=a.grep(g,function(a){return 0===a%1}):.1>=k&&(g=[1/k])));for(q=0;q<g.length&&!(h=g[q],v&&h*k>=m||!v&&u<=(g[q]+(g[q+1]||g[q]))/2);q++);return h=a.correctFloat(h*k,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=
|
36
|
+
function(a,g){var k=a.length,q,m;for(m=0;m<k;m++)a[m].safeI=m;a.sort(function(a,h){q=g(a,h);return 0===q?a.safeI-h.safeI:q});for(m=0;m<k;m++)delete a[m].safeI};a.arrayMin=function(a){for(var g=a.length,k=a[0];g--;)a[g]<k&&(k=a[g]);return k};a.arrayMax=function(a){for(var g=a.length,k=a[0];g--;)a[g]>k&&(k=a[g]);return k};a.destroyObjectProperties=function(m,g){a.objectEach(m,function(a,q){a&&a!==g&&a.destroy&&a.destroy();delete m[q]})};a.discardElement=function(m){var g=a.garbageBin;g||(g=a.createElement("div"));
|
37
|
+
m&&g.appendChild(m);g.innerHTML=""};a.correctFloat=function(a,g){return parseFloat(a.toPrecision(g||14))};a.setAnimation=function(m,g){g.renderer.globalAnimation=a.pick(m,g.options.chart.animation,!0)};a.animObject=function(m){return a.isObject(m)?a.merge(m):{duration:m?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(m,g,k,q){m=+m||0;g=+g;var v=a.defaultOptions.lang,u=(m.toString().split(".")[1]||"").length,
|
38
|
+
h,e;-1===g?g=Math.min(u,20):a.isNumber(g)||(g=2);e=(Math.abs(m)+Math.pow(10,-Math.max(g,u)-1)).toFixed(g);u=String(a.pInt(e));h=3<u.length?u.length%3:0;k=a.pick(k,v.decimalPoint);q=a.pick(q,v.thousandsSep);m=(0>m?"-":"")+(h?u.substr(0,h)+q:"");m+=u.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+q);g&&(m+=k+e.slice(-g));return m};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(m,g,k){if("width"===g)return Math.min(m.offsetWidth,m.scrollWidth)-a.getStyle(m,"padding-left")-
|
39
|
+
a.getStyle(m,"padding-right");if("height"===g)return Math.min(m.offsetHeight,m.scrollHeight)-a.getStyle(m,"padding-top")-a.getStyle(m,"padding-bottom");if(m=F.getComputedStyle(m,void 0))m=m.getPropertyValue(g),a.pick(k,!0)&&(m=a.pInt(m));return m};a.inArray=function(a,g){return g.indexOf?g.indexOf(a):[].indexOf.call(g,a)};a.grep=function(a,g){return[].filter.call(a,g)};a.find=function(a,g){return[].find.call(a,g)};a.map=function(a,g){for(var k=[],q=0,m=a.length;q<m;q++)k[q]=g.call(a[q],a[q],q,a);
|
40
|
+
return k};a.offset=function(a){var g=G.documentElement;a=a.getBoundingClientRect();return{top:a.top+(F.pageYOffset||g.scrollTop)-(g.clientTop||0),left:a.left+(F.pageXOffset||g.scrollLeft)-(g.clientLeft||0)}};a.stop=function(a,g){for(var k=C.length;k--;)C[k].elem!==a||g&&g!==C[k].prop||(C[k].stopped=!0)};a.each=function(a,g,k){return Array.prototype.forEach.call(a,g,k)};a.objectEach=function(a,g,k){for(var q in a)a.hasOwnProperty(q)&&g.call(k,a[q],q,a)};a.addEvent=function(m,g,k){function q(a){a.target=
|
41
|
+
a.srcElement||F;k.call(m,a)}var v=m.hcEvents=m.hcEvents||{};m.addEventListener?m.addEventListener(g,k,!1):m.attachEvent&&(m.hcEventsIE||(m.hcEventsIE={}),m.hcEventsIE[k.toString()]=q,m.attachEvent("on"+g,q));v[g]||(v[g]=[]);v[g].push(k);return function(){a.removeEvent(m,g,k)}};a.removeEvent=function(m,g,k){function q(a,d){m.removeEventListener?m.removeEventListener(a,d,!1):m.attachEvent&&(d=m.hcEventsIE[d.toString()],m.detachEvent("on"+a,d))}function v(){var e,d;m.nodeName&&(g?(e={},e[g]=!0):e=h,
|
42
|
+
a.objectEach(e,function(a,e){if(h[e])for(d=h[e].length;d--;)q(e,h[e][d])}))}var u,h=m.hcEvents,e;h&&(g?(u=h[g]||[],k?(e=a.inArray(k,u),-1<e&&(u.splice(e,1),h[g]=u),q(g,k)):(v(),h[g]=[])):(v(),m.hcEvents={}))};a.fireEvent=function(m,g,k,q){var v;v=m.hcEvents;var u,h;k=k||{};if(G.createEvent&&(m.dispatchEvent||m.fireEvent))v=G.createEvent("Events"),v.initEvent(g,!0,!0),a.extend(v,k),m.dispatchEvent?m.dispatchEvent(v):m.fireEvent(g,v);else if(v)for(v=v[g]||[],u=v.length,k.target||a.extend(k,{preventDefault:function(){k.defaultPrevented=
|
43
|
+
!0},target:m,type:g}),g=0;g<u;g++)(h=v[g])&&!1===h.call(m,k)&&k.preventDefault();q&&!k.defaultPrevented&&q(k)};a.animate=function(m,g,k){var q,v="",u,h,e;a.isObject(k)||(e=arguments,k={duration:e[2],easing:e[3],complete:e[4]});a.isNumber(k.duration)||(k.duration=400);k.easing="function"===typeof k.easing?k.easing:Math[k.easing]||Math.easeInOutSine;k.curAnim=a.merge(g);a.objectEach(g,function(e,d){a.stop(m,d);h=new a.Fx(m,k,d);u=null;"d"===d?(h.paths=h.initPath(m,m.d,g.d),h.toD=g.d,q=0,u=1):m.attr?
|
44
|
+
q=m.attr(d):(q=parseFloat(a.getStyle(m,d))||0,"opacity"!==d&&(v="px"));u||(u=e);u&&u.match&&u.match("px")&&(u=u.replace(/px/g,""));h.run(q,u,v)})};a.seriesType=function(m,g,k,q,v){var u=a.getOptions(),h=a.seriesTypes;if(h[m])return a.error(27);u.plotOptions[m]=a.merge(u.plotOptions[g],k);h[m]=a.extendClass(h[g]||function(){},q);h[m].prototype.type=m;v&&(h[m].prototype.pointClass=a.extendClass(a.Point,v));return h[m]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),g=0;return function(){return"highcharts-"+
|
45
|
+
a+"-"+g++}}();F.jQuery&&(F.jQuery.fn.highcharts=function(){var m=[].slice.call(arguments);if(this[0])return m[0]?(new (a[a.isString(m[0])?m.shift():"Chart"])(this[0],m[0],m[1]),this):A[a.attr(this[0],"data-highcharts-chart")]});G&&!G.defaultView&&(a.getStyle=function(m,g){var k={width:"clientWidth",height:"clientHeight"}[g];if(m.style[g])return a.pInt(m.style[g]);"opacity"===g&&(g="filter");if(k)return m.style.zoom=1,Math.max(m[k]-2*a.getStyle(m,"padding"),0);m=m.currentStyle[g.replace(/\-(\w)/g,
|
46
|
+
function(a,g){return g.toUpperCase()})];"filter"===g&&(m=m.replace(/alpha\(opacity=([0-9]+)\)/,function(a,g){return g/100}));return""===m?1:a.pInt(m)});Array.prototype.forEach||(a.each=function(a,g,k){for(var q=0,m=a.length;q<m;q++)if(!1===g.call(k,a[q],q,a))return q});Array.prototype.indexOf||(a.inArray=function(a,g){var k,q=0;if(g)for(k=g.length;q<k;q++)if(g[q]===a)return q;return-1});Array.prototype.filter||(a.grep=function(a,g){for(var k=[],q=0,m=a.length;q<m;q++)g(a[q],q)&&k.push(a[q]);return k});
|
47
|
+
Array.prototype.find||(a.find=function(a,g){var k,q=a.length;for(k=0;k<q;k++)if(g(a[k],k))return a[k]})})(K);(function(a){var C=a.each,A=a.isNumber,G=a.map,F=a.merge,m=a.pInt;a.Color=function(g){if(!(this instanceof a.Color))return new a.Color(g);this.init(g)};a.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(a){return[m(a[1]),m(a[2]),m(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,
|
48
|
+
parse:function(a){return[m(a[1]),m(a[2]),m(a[3]),1]}}],names:{none:"rgba(255,255,255,0)",white:"#ffffff",black:"#000000"},init:function(g){var k,q,m,u;if((this.input=g=this.names[g&&g.toLowerCase?g.toLowerCase():""]||g)&&g.stops)this.stops=G(g.stops,function(h){return new a.Color(h[1])});else if(g&&"#"===g[0]&&(k=g.length,g=parseInt(g.substr(1),16),7===k?q=[(g&16711680)>>16,(g&65280)>>8,g&255,1]:4===k&&(q=[(g&3840)>>4|(g&3840)>>8,(g&240)>>4|g&240,(g&15)<<4|g&15,1])),!q)for(m=this.parsers.length;m--&&
|
49
|
+
!q;)u=this.parsers[m],(k=u.regex.exec(g))&&(q=u.parse(k));this.rgba=q||[]},get:function(a){var g=this.input,q=this.rgba,m;this.stops?(m=F(g),m.stops=[].concat(m.stops),C(this.stops,function(g,h){m.stops[h]=[m.stops[h][0],g.get(a)]})):m=q&&A(q[0])?"rgb"===a||!a&&1===q[3]?"rgb("+q[0]+","+q[1]+","+q[2]+")":"a"===a?q[3]:"rgba("+q.join(",")+")":g;return m},brighten:function(a){var g,q=this.rgba;if(this.stops)C(this.stops,function(g){g.brighten(a)});else if(A(a)&&0!==a)for(g=0;3>g;g++)q[g]+=m(255*a),0>
|
50
|
+
q[g]&&(q[g]=0),255<q[g]&&(q[g]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,k){var g,m;a.rgba.length?(g=this.rgba,a=a.rgba,m=1!==a[3]||1!==g[3],a=(m?"rgba(":"rgb(")+Math.round(a[0]+(g[0]-a[0])*(1-k))+","+Math.round(a[1]+(g[1]-a[1])*(1-k))+","+Math.round(a[2]+(g[2]-a[2])*(1-k))+(m?","+(a[3]+(g[3]-a[3])*(1-k)):"")+")"):a=a.input||"none";return a}};a.color=function(g){return new a.Color(g)}})(K);(function(a){var C,A,G=a.addEvent,F=a.animate,m=a.attr,g=a.charts,
|
51
|
+
k=a.color,q=a.css,v=a.createElement,u=a.defined,h=a.deg2rad,e=a.destroyObjectProperties,n=a.doc,d=a.each,c=a.extend,w=a.erase,b=a.grep,y=a.hasTouch,D=a.inArray,H=a.isArray,l=a.isFirefox,B=a.isMS,r=a.isObject,z=a.isString,M=a.isWebKit,p=a.merge,E=a.noop,I=a.objectEach,L=a.pick,f=a.pInt,t=a.removeEvent,R=a.stop,J=a.svg,N=a.SVG_NS,O=a.symbolSizes,P=a.win;C=a.SVGElement=function(){return this};c(C.prototype,{opacity:1,SVG_NS:N,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),
|
52
|
+
init:function(a,f){this.element="span"===f?v(f):n.createElementNS(this.SVG_NS,f);this.renderer=a},animate:function(x,f,t){f=a.animObject(L(f,this.renderer.globalAnimation,!0));0!==f.duration?(t&&(f.complete=t),F(this,x,f)):(this.attr(x,null,t),f.step&&f.step.call(this));return this},colorGradient:function(x,f,t){var b=this.renderer,l,c,r,Q,e,h,n,y,E,w,J=[],B;x.radialGradient?c="radialGradient":x.linearGradient&&(c="linearGradient");c&&(r=x[c],e=b.gradients,n=x.stops,w=t.radialReference,H(r)&&(x[c]=
|
53
|
+
r={x1:r[0],y1:r[1],x2:r[2],y2:r[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===c&&w&&!u(r.gradientUnits)&&(Q=r,r=p(r,b.getRadialAttr(w,Q),{gradientUnits:"userSpaceOnUse"})),I(r,function(a,x){"id"!==x&&J.push(x,a)}),I(n,function(a){J.push(a)}),J=J.join(","),e[J]?w=e[J].attr("id"):(r.id=w=a.uniqueKey(),e[J]=h=b.createElement(c).attr(r).add(b.defs),h.radAttr=Q,h.stops=[],d(n,function(x){0===x[1].indexOf("rgba")?(l=a.color(x[1]),y=l.get("rgb"),E=l.get("a")):(y=x[1],E=1);x=b.createElement("stop").attr({offset:x[0],
|
54
|
+
"stop-color":y,"stop-opacity":E}).add(h);h.stops.push(x)})),B="url("+b.url+"#"+w+")",t.setAttribute(f,B),t.gradient=J,x.toString=function(){return B})},applyTextOutline:function(x){var f=this.element,t,b,l,c,r;-1!==x.indexOf("contrast")&&(x=x.replace(/contrast/g,this.renderer.getContrast(f.style.fill)));x=x.split(" ");b=x[x.length-1];if((l=x[0])&&"none"!==l&&a.svg){this.fakeTS=!0;x=[].slice.call(f.getElementsByTagName("tspan"));this.ySetter=this.xSetter;l=l.replace(/(^[\d\.]+)(.*?)$/g,function(a,
|
55
|
+
x,f){return 2*x+f});for(r=x.length;r--;)t=x[r],"highcharts-text-outline"===t.getAttribute("class")&&w(x,f.removeChild(t));c=f.firstChild;d(x,function(a,x){0===x&&(a.setAttribute("x",f.getAttribute("x")),x=f.getAttribute("y"),a.setAttribute("y",x||0),null===x&&f.setAttribute("y",0));a=a.cloneNode(1);m(a,{"class":"highcharts-text-outline",fill:b,stroke:b,"stroke-width":l,"stroke-linejoin":"round"});f.insertBefore(a,c)})}},attr:function(a,f,t,b){var x,l=this.element,c,r=this,d,p;"string"===typeof a&&
|
56
|
+
void 0!==f&&(x=a,a={},a[x]=f);"string"===typeof a?r=(this[a+"Getter"]||this._defaultGetter).call(this,a,l):(I(a,function(x,f){d=!1;b||R(this,f);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(f)&&(c||(this.symbolAttr(a),c=!0),d=!0);!this.rotation||"x"!==f&&"y"!==f||(this.doTransform=!0);d||(p=this[f+"Setter"]||this._defaultSetter,p.call(this,x,f,l),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(f)&&this.updateShadows(f,x,p))},this),this.afterSetters());
|
57
|
+
t&&t();return r},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(a,f,t){for(var x=this.shadows,b=x.length;b--;)t.call(x[b],"height"===a?Math.max(f-(x[b].cutHeight||0),0):"d"===a?this.d:f,a,x[b])},addClass:function(a,f){var x=this.attr("class")||"";-1===x.indexOf(a)&&(f||(a=(x+(x?" ":"")+a).replace(" "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==m(this.element,"class").indexOf(a)},removeClass:function(a){m(this.element,
|
58
|
+
"class",(m(this.element,"class")||"").replace(a,""));return this},symbolAttr:function(a){var x=this;d("x y r start end width height innerR anchorX anchorY".split(" "),function(f){x[f]=L(a[f],x[f])});x.attr({d:x.renderer.symbols[x.symbolName](x.x,x.y,x.width,x.height,x)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,f){var x=this,t={},b;f=f||a.strokeWidth||0;b=Math.round(f)%2/2;a.x=Math.floor(a.x||x.x||0)+b;a.y=Math.floor(a.y||x.y||
|
59
|
+
0)+b;a.width=Math.floor((a.width||x.width||0)-2*b);a.height=Math.floor((a.height||x.height||0)-2*b);u(a.strokeWidth)&&(a.strokeWidth=f);I(a,function(a,f){x[f]!==a&&(x[f]=t[f]=a)});return t},css:function(a){var x=this.styles,t={},b=this.element,l,r="",d,p=!x,e=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);x&&I(a,function(a,f){a!==x[f]&&(t[f]=a,p=!0)});p&&(x&&(a=c(x,t)),l=this.textWidth=a&&a.width&&"auto"!==a.width&&"text"===b.nodeName.toLowerCase()&&f(a.width),this.styles=a,l&&
|
60
|
+
!J&&this.renderer.forExport&&delete a.width,B&&!J?q(this.element,a):(d=function(a,x){return"-"+x.toLowerCase()},I(a,function(a,x){-1===D(x,e)&&(r+=x.replace(/([A-Z])/g,d)+":"+a+";")}),r&&m(b,"style",r)),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},strokeWidth:function(){return this["stroke-width"]||0},on:function(a,f){var x=this,t=x.element;y&&"click"===a?(t.ontouchstart=function(a){x.touchEventFired=
|
61
|
+
Date.now();a.preventDefault();f.call(t,a)},t.onclick=function(a){(-1===P.navigator.userAgent.indexOf("Android")||1100<Date.now()-(x.touchEventFired||0))&&f.call(t,a)}):t["on"+a]=f;return this},setRadialReference:function(a){var x=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;x&&x.radAttr&&x.animate(this.renderer.getRadialAttr(a,x.radAttr));return this},translate:function(a,f){return this.attr({translateX:a,translateY:f})},invert:function(a){this.inverted=a;this.updateTransform();
|
62
|
+
return this},updateTransform:function(){var a=this.translateX||0,f=this.translateY||0,t=this.scaleX,b=this.scaleY,l=this.inverted,c=this.rotation,r=this.element;l&&(a+=this.width,f+=this.height);a=["translate("+a+","+f+")"];l?a.push("rotate(90) scale(-1,1)"):c&&a.push("rotate("+c+" "+(r.getAttribute("x")||0)+" "+(r.getAttribute("y")||0)+")");(u(t)||u(b))&&a.push("scale("+L(t,1)+" "+L(b,1)+")");a.length&&r.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);
|
63
|
+
return this},align:function(a,f,t){var x,b,l,c,r={};b=this.renderer;l=b.alignedObjects;var d,p;if(a){if(this.alignOptions=a,this.alignByTranslate=f,!t||z(t))this.alignTo=x=t||"renderer",w(l,this),l.push(this),t=null}else a=this.alignOptions,f=this.alignByTranslate,x=this.alignTo;t=L(t,b[x],b);x=a.align;b=a.verticalAlign;l=(t.x||0)+(a.x||0);c=(t.y||0)+(a.y||0);"right"===x?d=1:"center"===x&&(d=2);d&&(l+=(t.width-(a.width||0))/d);r[f?"translateX":"x"]=Math.round(l);"bottom"===b?p=1:"middle"===b&&(p=
|
64
|
+
2);p&&(c+=(t.height-(a.height||0))/p);r[f?"translateY":"y"]=Math.round(c);this[this.placed?"animate":"attr"](r);this.placed=!0;this.alignAttr=r;return this},getBBox:function(a,f){var x,t=this.renderer,b,l=this.element,r=this.styles,p,e=this.textStr,n,Q=t.cache,y=t.cacheKeys,E;f=L(f,this.rotation);b=f*h;p=r&&r.fontSize;void 0!==e&&(E=e.toString(),-1===E.indexOf("\x3c")&&(E=E.replace(/[0-9]/g,"0")),E+=["",f||0,p,r&&r.width,r&&r.textOverflow].join());E&&!a&&(x=Q[E]);if(!x){if(l.namespaceURI===this.SVG_NS||
|
65
|
+
t.forExport){try{(n=this.fakeTS&&function(a){d(l.querySelectorAll(".highcharts-text-outline"),function(x){x.style.display=a})})&&n("none"),x=l.getBBox?c({},l.getBBox()):{width:l.offsetWidth,height:l.offsetHeight},n&&n("")}catch(X){}if(!x||0>x.width)x={width:0,height:0}}else x=this.htmlGetBBox();t.isSVG&&(a=x.width,t=x.height,r&&"11px"===r.fontSize&&17===Math.round(t)&&(x.height=t=14),f&&(x.width=Math.abs(t*Math.sin(b))+Math.abs(a*Math.cos(b)),x.height=Math.abs(t*Math.cos(b))+Math.abs(a*Math.sin(b))));
|
66
|
+
if(E&&0<x.height){for(;250<y.length;)delete Q[y.shift()];Q[E]||y.push(E);Q[E]=x}}return x},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var x=this;x.animate({opacity:0},{duration:a||150,complete:function(){x.attr({y:-9999})}})},add:function(a){var x=this.renderer,f=this.element,t;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&x.buildText(this);this.added=!0;if(!a||
|
67
|
+
a.handleZ||this.zIndex)t=this.zIndexSetter();t||(a?a.element:x.box).appendChild(f);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var x=a.parentNode;x&&x.removeChild(a)},destroy:function(){var a=this,f=a.element||{},t=a.renderer.isSVG&&"SPAN"===f.nodeName&&a.parentGroup,b=f.ownerSVGElement;f.onclick=f.onmouseout=f.onmouseover=f.onmousemove=f.point=null;R(a);a.clipPath&&b&&(d(b.querySelectorAll("[clip-path]"),function(x){-1<x.getAttribute("clip-path").indexOf(a.clipPath.element.id+
|
68
|
+
")")&&x.removeAttribute("clip-path")}),a.clipPath=a.clipPath.destroy());if(a.stops){for(b=0;b<a.stops.length;b++)a.stops[b]=a.stops[b].destroy();a.stops=null}a.safeRemoveChild(f);for(a.destroyShadows();t&&t.div&&0===t.div.childNodes.length;)f=t.parentGroup,a.safeRemoveChild(t.div),delete t.div,t=f;a.alignTo&&w(a.renderer.alignedObjects,a);I(a,function(x,f){delete a[f]});return null},shadow:function(a,f,t){var x=[],b,l,c=this.element,r,d,p,e;if(!a)this.destroyShadows();else if(!this.shadows){d=L(a.width,
|
69
|
+
3);p=(a.opacity||.15)/d;e=this.parentInverted?"(-1,-1)":"("+L(a.offsetX,1)+", "+L(a.offsetY,1)+")";for(b=1;b<=d;b++)l=c.cloneNode(0),r=2*d+1-2*b,m(l,{isShadow:"true",stroke:a.color||"#000000","stroke-opacity":p*b,"stroke-width":r,transform:"translate"+e,fill:"none"}),t&&(m(l,"height",Math.max(m(l,"height")-r,0)),l.cutHeight=r),f?f.element.appendChild(l):c.parentNode.insertBefore(l,c),x.push(l);this.shadows=x}return this},destroyShadows:function(){d(this.shadows||[],function(a){this.safeRemoveChild(a)},
|
70
|
+
this);this.shadows=void 0},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=L(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,f,t){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");t.setAttribute(f,a);this[f]=a},dashstyleSetter:function(a){var x,t=this["stroke-width"];"inherit"===t&&(t=1);if(a=a&&a.toLowerCase()){a=
|
71
|
+
a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(x=a.length;x--;)a[x]=f(a[x])*t;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,f,t){this[f]=
|
72
|
+
a;t.setAttribute(f,a)},titleSetter:function(a){var f=this.element.getElementsByTagName("title")[0];f||(f=n.createElementNS(this.SVG_NS,"title"),this.element.appendChild(f));f.firstChild&&f.removeChild(f.firstChild);f.appendChild(n.createTextNode(String(L(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,f,t){"string"===typeof a?t.setAttribute(f,a):a&&this.colorGradient(a,f,t)},
|
73
|
+
visibilitySetter:function(a,f,t){"inherit"===a?t.removeAttribute(f):t.setAttribute(f,a)},zIndexSetter:function(a,t){var x=this.renderer,b=this.parentGroup,l=(b||x).element||x.box,c,r=this.element,d;c=this.added;var p;u(a)&&(r.zIndex=a,a=+a,this[t]===a&&(c=!1),this[t]=a);if(c){(a=this.zIndex)&&b&&(b.handleZ=!0);t=l.childNodes;for(p=0;p<t.length&&!d;p++)b=t[p],c=b.zIndex,b!==r&&(f(c)>a||!u(a)&&u(c)||0>a&&!u(c)&&l!==x.box)&&(l.insertBefore(r,b),d=!0);d||l.appendChild(r)}return d},_defaultSetter:function(a,
|
74
|
+
f,t){t.setAttribute(f,a)}});C.prototype.yGetter=C.prototype.xGetter;C.prototype.translateXSetter=C.prototype.translateYSetter=C.prototype.rotationSetter=C.prototype.verticalAlignSetter=C.prototype.scaleXSetter=C.prototype.scaleYSetter=function(a,f){this[f]=a;this.doTransform=!0};C.prototype["stroke-widthSetter"]=C.prototype.strokeSetter=function(a,f,t){this[f]=a;this.stroke&&this["stroke-width"]?(C.prototype.fillSetter.call(this,this.stroke,"stroke",t),t.setAttribute("stroke-width",this["stroke-width"]),
|
75
|
+
this.hasStroke=!0):"stroke-width"===f&&0===a&&this.hasStroke&&(t.removeAttribute("stroke"),this.hasStroke=!1)};A=a.SVGRenderer=function(){this.init.apply(this,arguments)};c(A.prototype,{Element:C,SVG_NS:N,init:function(a,f,t,b,c,r){var x;b=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(b));x=b.element;a.appendChild(x);-1===a.innerHTML.indexOf("xmlns")&&m(x,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=x;this.boxWrapper=b;this.alignedObjects=[];this.url=(l||
|
76
|
+
M)&&n.getElementsByTagName("base").length?P.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(n.createTextNode("Created with Highcharts 5.0.12"));this.defs=this.createElement("defs").add();this.allowHTML=r;this.forExport=c;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(f,t,!1);var d;l&&a.getBoundingClientRect&&(f=function(){q(a,{left:0,top:0});d=a.getBoundingClientRect();
|
77
|
+
q(a,{left:Math.ceil(d.left)-d.left+"px",top:Math.ceil(d.top)-d.top+"px"})},f(),this.unSubPixelFix=G(P,"resize",f))},getStyle:function(a){return this.style=c({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();e(this.gradients||{});this.gradients=
|
78
|
+
null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var f=new this.Element;f.init(this,a);return f},draw:E,getRadialAttr:function(a,f){return{cx:a[0]-a[2]/2+f.cx*a[2],cy:a[1]-a[2]/2+f.cy*a[2],r:f.r*a[2]}},getSpanWidth:function(a,f){var t=a.getBBox(!0).width;!J&&this.forExport&&(t=this.measureSpanWidth(f.firstChild.data,a.styles));return t},applyEllipsis:function(a,f,t,b){var x=this.getSpanWidth(a,f),l=x>b,x=t,c,r=0,d=
|
79
|
+
t.length,p=function(a){f.removeChild(f.firstChild);a&&f.appendChild(n.createTextNode(a))};if(l){for(;r<=d;)c=Math.ceil((r+d)/2),x=t.substring(0,c)+"\u2026",p(x),x=this.getSpanWidth(a,f),r===d?r=d+1:x>b?d=c-1:r=c;0===d&&p("")}return l},buildText:function(a){var t=a.element,x=this,l=x.forExport,c=L(a.textStr,"").toString(),r=-1!==c.indexOf("\x3c"),p=t.childNodes,e,h,E,y,w=m(t,"x"),B=a.styles,g=a.textWidth,I=B&&B.lineHeight,z=B&&B.textOutline,D=B&&"ellipsis"===B.textOverflow,k=B&&"nowrap"===B.whiteSpace,
|
80
|
+
u=B&&B.fontSize,R,H,v=p.length,B=g&&!a.added&&this.box,M=function(a){var b;b=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:u||x.style.fontSize||12;return I?f(I):x.fontMetrics(b,a.getAttribute("style")?a:t).h};R=[c,D,k,I,z,u,g].join();if(R!==a.textCache){for(a.textCache=R;v--;)t.removeChild(p[v]);r||z||D||g||-1!==c.indexOf(" ")?(e=/<.*class="([^"]+)".*>/,h=/<.*style="([^"]+)".*>/,E=/<.*href="([^"]+)".*>/,B&&B.appendChild(t),c=r?c.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g,
|
81
|
+
'\x3cspan style\x3d"font-style:italic"\x3e').replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g):[c],c=b(c,function(a){return""!==a}),d(c,function(f,b){var c,r=0;f=f.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");c=f.split("|||");d(c,function(f){if(""!==f||1===c.length){var d={},p=n.createElementNS(x.SVG_NS,"tspan"),B,I;e.test(f)&&(B=f.match(e)[1],m(p,"class",B));h.test(f)&&(I=f.match(h)[1].replace(/(;| |^)color([ :])/,
|
82
|
+
"$1fill$2"),m(p,"style",I));E.test(f)&&!l&&(m(p,"onclick",'location.href\x3d"'+f.match(E)[1]+'"'),q(p,{cursor:"pointer"}));f=(f.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"\x3c").replace(/>/g,"\x3e");if(" "!==f){p.appendChild(n.createTextNode(f));r?d.dx=0:b&&null!==w&&(d.x=w);m(p,d);t.appendChild(p);!r&&H&&(!J&&l&&q(p,{display:"block"}),m(p,"dy",M(p)));if(g){d=f.replace(/([^\^])-/g,"$1- ").split(" ");B=1<c.length||b||1<d.length&&!k;var z=[],Q,u=M(p),R=a.rotation;for(D&&(y=x.applyEllipsis(a,
|
83
|
+
p,f,g));!D&&B&&(d.length||z.length);)a.rotation=0,Q=x.getSpanWidth(a,p),f=Q>g,void 0===y&&(y=f),f&&1!==d.length?(p.removeChild(p.firstChild),z.unshift(d.pop())):(d=z,z=[],d.length&&!k&&(p=n.createElementNS(N,"tspan"),m(p,{dy:u,x:w}),I&&m(p,"style",I),t.appendChild(p)),Q>g&&(g=Q)),d.length&&p.appendChild(n.createTextNode(d.join(" ").replace(/- /g,"-")));a.rotation=R}r++}}});H=H||t.childNodes.length}),y&&a.attr("title",a.textStr),B&&B.removeChild(t),z&&a.applyTextOutline&&a.applyTextOutline(z)):t.appendChild(n.createTextNode(c.replace(/</g,
|
84
|
+
"\x3c").replace(/>/g,"\x3e")))}},getContrast:function(a){a=k(a).rgba;return 510<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,f,t,b,l,r,d,e,h){var x=this.label(a,f,t,h,null,null,null,null,"button"),n=0;x.attr(p({padding:8,r:2},l));var E,y,w,J;l=p({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},l);E=l.style;delete l.style;r=p(l,{fill:"#e6e6e6"},r);y=r.style;delete r.style;d=p(l,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},
|
85
|
+
d);w=d.style;delete d.style;e=p(l,{style:{color:"#cccccc"}},e);J=e.style;delete e.style;G(x.element,B?"mouseover":"mouseenter",function(){3!==n&&x.setState(1)});G(x.element,B?"mouseout":"mouseleave",function(){3!==n&&x.setState(n)});x.setState=function(a){1!==a&&(x.state=n=a);x.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0]);x.attr([l,r,d,e][a||0]).css([E,y,w,J][a||0])};x.attr(l).css(c({cursor:"default"},
|
86
|
+
E));return x.on("click",function(a){3!==n&&b.call(x,a)})},crispLine:function(a,f){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-f%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+f%2/2);return a},path:function(a){var f={fill:"none"};H(a)?f.d=a:r(a)&&c(f,a);return this.createElement("path").attr(f)},circle:function(a,f,t){a=r(a)?a:{x:a,y:f,r:t};f=this.createElement("circle");f.xSetter=f.ySetter=function(a,f,t){t.setAttribute("c"+f,a)};return f.attr(a)},arc:function(a,f,t,b,l,c){r(a)?(b=a,f=b.y,t=b.r,a=b.x):
|
87
|
+
b={innerR:b,start:l,end:c};a=this.symbol("arc",a,f,t,t,b);a.r=t;return a},rect:function(a,f,t,b,l,c){l=r(a)?a.r:l;var x=this.createElement("rect");a=r(a)?a:void 0===a?{}:{x:a,y:f,width:Math.max(t,0),height:Math.max(b,0)};void 0!==c&&(a.strokeWidth=c,a=x.crisp(a));a.fill="none";l&&(a.r=l);x.rSetter=function(a,f,t){m(t,{rx:a,ry:a})};return x.attr(a)},setSize:function(a,f,t){var b=this.alignedObjects,l=b.length;this.width=a;this.height=f;for(this.boxWrapper.animate({width:a,height:f},{step:function(){this.attr({viewBox:"0 0 "+
|
88
|
+
this.attr("width")+" "+this.attr("height")})},duration:L(t,!0)?void 0:0});l--;)b[l].align()},g:function(a){var f=this.createElement("g");return a?f.attr({"class":"highcharts-"+a}):f},image:function(a,f,t,b,l){var x={preserveAspectRatio:"none"};1<arguments.length&&c(x,{x:f,y:t,width:b,height:l});x=this.createElement("image").attr(x);x.element.setAttributeNS?x.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):x.element.setAttribute("hc-svg-href",a);return x},symbol:function(a,f,t,b,l,
|
89
|
+
r){var x=this,p,e=/^url\((.*?)\)$/,h=e.test(a),E=!h&&(this.symbols[a]?a:"circle"),y=E&&this.symbols[E],B=u(f)&&y&&y.call(this.symbols,Math.round(f),Math.round(t),b,l,r),w,J;y?(p=this.path(B),p.attr("fill","none"),c(p,{symbolName:E,x:f,y:t,width:b,height:l}),r&&c(p,r)):h&&(w=a.match(e)[1],p=this.image(w),p.imgwidth=L(O[w]&&O[w].width,r&&r.width),p.imgheight=L(O[w]&&O[w].height,r&&r.height),J=function(){p.attr({width:p.width,height:p.height})},d(["width","height"],function(a){p[a+"Setter"]=function(a,
|
90
|
+
f){var t={},b=this["img"+f],l="width"===f?"translateX":"translateY";this[f]=a;u(b)&&(this.element&&this.element.setAttribute(f,b),this.alignByTranslate||(t[l]=((this[f]||0)-b)/2,this.attr(t)))}}),u(f)&&p.attr({x:f,y:t}),p.isImg=!0,u(p.imgwidth)&&u(p.imgheight)?J():(p.attr({width:0,height:0}),v("img",{onload:function(){var a=g[x.chartIndex];0===this.width&&(q(this,{position:"absolute",top:"-999em"}),n.body.appendChild(this));O[w]={width:this.width,height:this.height};p.imgwidth=this.width;p.imgheight=
|
91
|
+
this.height;p.element&&J();this.parentNode&&this.parentNode.removeChild(this);x.imgCount--;if(!x.imgCount&&a&&a.onload)a.onload()},src:w}),this.imgCount++));return p},symbols:{circle:function(a,f,t,b){return this.arc(a+t/2,f+b/2,t/2,b/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,f,t,b){return["M",a,f,"L",a+t,f,a+t,f+b,a,f+b,"Z"]},triangle:function(a,f,t,b){return["M",a+t/2,f,"L",a+t,f+b,a,f+b,"Z"]},"triangle-down":function(a,f,t,b){return["M",a,f,"L",a+t,f,a+t/2,f+b,"Z"]},diamond:function(a,
|
92
|
+
f,t,b){return["M",a+t/2,f,"L",a+t,f+b/2,a+t/2,f+b,a,f+b/2,"Z"]},arc:function(a,f,t,b,l){var c=l.start,x=l.r||t,r=l.r||b||t,p=l.end-.001;t=l.innerR;b=l.open;var d=Math.cos(c),e=Math.sin(c),h=Math.cos(p),p=Math.sin(p);l=l.end-c<Math.PI?0:1;x=["M",a+x*d,f+r*e,"A",x,r,0,l,1,a+x*h,f+r*p];u(t)&&x.push(b?"M":"L",a+t*h,f+t*p,"A",t,t,0,l,0,a+t*d,f+t*e);x.push(b?"":"Z");return x},callout:function(a,f,t,b,l){var c=Math.min(l&&l.r||0,t,b),r=c+6,p=l&&l.anchorX;l=l&&l.anchorY;var d;d=["M",a+c,f,"L",a+t-c,f,"C",
|
93
|
+
a+t,f,a+t,f,a+t,f+c,"L",a+t,f+b-c,"C",a+t,f+b,a+t,f+b,a+t-c,f+b,"L",a+c,f+b,"C",a,f+b,a,f+b,a,f+b-c,"L",a,f+c,"C",a,f,a,f,a+c,f];p&&p>t?l>f+r&&l<f+b-r?d.splice(13,3,"L",a+t,l-6,a+t+6,l,a+t,l+6,a+t,f+b-c):d.splice(13,3,"L",a+t,b/2,p,l,a+t,b/2,a+t,f+b-c):p&&0>p?l>f+r&&l<f+b-r?d.splice(33,3,"L",a,l+6,a-6,l,a,l-6,a,f+c):d.splice(33,3,"L",a,b/2,p,l,a,b/2,a,f+c):l&&l>b&&p>a+r&&p<a+t-r?d.splice(23,3,"L",p+6,f+b,p,f+b+6,p-6,f+b,a+c,f+b):l&&0>l&&p>a+r&&p<a+t-r&&d.splice(3,3,"L",p-6,f,p,f-6,p+6,f,t-c,f);return d}},
|
94
|
+
clipRect:function(f,t,b,l){var c=a.uniqueKey(),r=this.createElement("clipPath").attr({id:c}).add(this.defs);f=this.rect(f,t,b,l,0).add(r);f.id=c;f.clipPath=r;f.count=0;return f},text:function(a,f,t,b){var l=!J&&this.forExport,c={};if(b&&(this.allowHTML||!this.forExport))return this.html(a,f,t);c.x=Math.round(f||0);t&&(c.y=Math.round(t));if(a||0===a)c.text=a;a=this.createElement("text").attr(c);l&&a.css({position:"absolute"});b||(a.xSetter=function(a,f,t){var b=t.getElementsByTagName("tspan"),l,c=
|
95
|
+
t.getAttribute(f),r;for(r=0;r<b.length;r++)l=b[r],l.getAttribute(f)===c&&l.setAttribute(f,a);t.setAttribute(f,a)});return a},fontMetrics:function(a,t){a=a||t&&t.style&&t.style.fontSize||this.style&&this.style.fontSize;a=/px/.test(a)?f(a):/em/.test(a)?parseFloat(a)*(t?this.fontMetrics(null,t.parentNode).f:16):12;t=24>a?a+3:Math.round(1.2*a);return{h:t,b:Math.round(.8*t),f:a}},rotCorr:function(a,f,t){var b=a;f&&t&&(b=Math.max(b*Math.cos(f*h),4));return{x:-a/3*Math.sin(f*h),y:b}},label:function(f,b,
|
96
|
+
l,r,e,h,n,E,y){var x=this,B=x.g("button"!==y&&"label"),w=B.text=x.text("",0,0,n).attr({zIndex:1}),J,g,I=0,z=3,D=0,q,k,m,R,H,v={},N,M,L=/^url\((.*?)\)$/.test(r),Q=L,V,U,O,P;y&&B.addClass("highcharts-"+y);Q=L;V=function(){return(N||0)%2/2};U=function(){var a=w.element.style,f={};g=(void 0===q||void 0===k||H)&&u(w.textStr)&&w.getBBox();B.width=(q||g.width||0)+2*z+D;B.height=(k||g.height||0)+2*z;M=z+x.fontMetrics(a&&a.fontSize,w).b;Q&&(J||(B.box=J=x.symbols[r]||L?x.symbol(r):x.rect(),J.addClass(("button"===
|
97
|
+
y?"":"highcharts-label-box")+(y?" highcharts-"+y+"-box":"")),J.add(B),a=V(),f.x=a,f.y=(E?-M:0)+a),f.width=Math.round(B.width),f.height=Math.round(B.height),J.attr(c(f,v)),v={})};O=function(){var a=D+z,f;f=E?0:M;u(q)&&g&&("center"===H||"right"===H)&&(a+={center:.5,right:1}[H]*(q-g.width));if(a!==w.x||f!==w.y)w.attr("x",a),void 0!==f&&w.attr("y",f);w.x=a;w.y=f};P=function(a,f){J?J.attr(a,f):v[a]=f};B.onAdd=function(){w.add(B);B.attr({text:f||0===f?f:"",x:b,y:l});J&&u(e)&&B.attr({anchorX:e,anchorY:h})};
|
98
|
+
B.widthSetter=function(f){q=a.isNumber(f)?f:null};B.heightSetter=function(a){k=a};B["text-alignSetter"]=function(a){H=a};B.paddingSetter=function(a){u(a)&&a!==z&&(z=B.padding=a,O())};B.paddingLeftSetter=function(a){u(a)&&a!==D&&(D=a,O())};B.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==I&&(I=a,g&&B.attr({x:m}))};B.textSetter=function(a){void 0!==a&&w.textSetter(a);U();O()};B["stroke-widthSetter"]=function(a,f){a&&(Q=!0);N=this["stroke-width"]=a;P(f,a)};B.strokeSetter=B.fillSetter=B.rSetter=
|
99
|
+
function(a,f){"fill"===f&&a&&(Q=!0);P(f,a)};B.anchorXSetter=function(a,f){e=B.anchorX=a;P(f,Math.round(a)-V()-m)};B.anchorYSetter=function(a,f){h=B.anchorY=a;P(f,a-R)};B.xSetter=function(a){B.x=a;I&&(a-=I*((q||g.width)+2*z));m=Math.round(a);B.attr("translateX",m)};B.ySetter=function(a){R=B.y=Math.round(a);B.attr("translateY",R)};var W=B.css;return c(B,{css:function(a){if(a){var f={};a=p(a);d(B.textProps,function(t){void 0!==a[t]&&(f[t]=a[t],delete a[t])});w.css(f)}return W.call(B,a)},getBBox:function(){return{width:g.width+
|
100
|
+
2*z,height:g.height+2*z,x:g.x-z,y:g.y-z}},shadow:function(a){a&&(U(),J&&J.shadow(a));return B},destroy:function(){t(B.element,"mouseenter");t(B.element,"mouseleave");w&&(w=w.destroy());J&&(J=J.destroy());C.prototype.destroy.call(B);B=x=U=O=P=null}})}});a.Renderer=A})(K);(function(a){var C=a.attr,A=a.createElement,G=a.css,F=a.defined,m=a.each,g=a.extend,k=a.isFirefox,q=a.isMS,v=a.isWebKit,u=a.pInt,h=a.SVGRenderer,e=a.win,n=a.wrap;g(a.SVGElement.prototype,{htmlCss:function(a){var c=this.element;if(c=
|
101
|
+
a&&"SPAN"===c.tagName&&a.width)delete a.width,this.textWidth=c,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=g(this.styles,a);G(this.element,a);return this},htmlGetBBox:function(){var a=this.element;"text"===a.nodeName&&(a.style.position="absolute");return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,c=this.element,e=this.translateX||0,b=this.translateY||
|
102
|
+
0,h=this.x||0,n=this.y||0,g=this.textAlign||"left",l={left:0,center:.5,right:1}[g],B=this.styles;G(c,{marginLeft:e,marginTop:b});this.shadows&&m(this.shadows,function(a){G(a,{marginLeft:e+1,marginTop:b+1})});this.inverted&&m(c.childNodes,function(b){a.invertChild(b,c)});if("SPAN"===c.tagName){var r=this.rotation,z=u(this.textWidth),q=B&&B.whiteSpace,p=[r,g,c.innerHTML,this.textWidth,this.textAlign].join();p!==this.cTT&&(B=a.fontMetrics(c.style.fontSize).b,F(r)&&this.setSpanRotation(r,l,B),G(c,{width:"",
|
103
|
+
whiteSpace:q||"nowrap"}),c.offsetWidth>z&&/[ \-]/.test(c.textContent||c.innerText)&&G(c,{width:z+"px",display:"block",whiteSpace:q||"normal"}),this.getSpanCorrection(c.offsetWidth,B,l,r,g));G(c,{left:h+(this.xCorr||0)+"px",top:n+(this.yCorr||0)+"px"});v&&(B=c.offsetHeight);this.cTT=p}}else this.alignOnAdd=!0},setSpanRotation:function(a,c,h){var b={},d=q?"-ms-transform":v?"-webkit-transform":k?"MozTransform":e.opera?"-o-transform":"";b[d]=b.transform="rotate("+a+"deg)";b[d+(k?"Origin":"-origin")]=
|
104
|
+
b.transformOrigin=100*c+"% "+h+"px";G(this.element,b)},getSpanCorrection:function(a,c,e){this.xCorr=-a*e;this.yCorr=-c}});g(h.prototype,{html:function(a,c,e){var b=this.createElement("span"),d=b.element,h=b.renderer,w=h.isSVG,l=function(a,b){m(["opacity","visibility"],function(l){n(a,l+"Setter",function(a,l,c,r){a.call(this,l,c,r);b[c]=l})})};b.textSetter=function(a){a!==d.innerHTML&&delete this.bBox;d.innerHTML=this.textStr=a;b.htmlUpdateTransform()};w&&l(b,b.element.style);b.xSetter=b.ySetter=b.alignSetter=
|
105
|
+
b.rotationSetter=function(a,l){"align"===l&&(l="textAlign");b[l]=a;b.htmlUpdateTransform()};b.attr({text:a,x:Math.round(c),y:Math.round(e)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"});d.style.whiteSpace="nowrap";b.css=b.htmlCss;w&&(b.add=function(a){var c,e=h.box.parentNode,B=[];if(this.parentGroup=a){if(c=a.div,!c){for(;a;)B.push(a),a=a.parentGroup;m(B.reverse(),function(a){var r,p=C(a.element,"class");p&&(p={className:p});c=a.div=a.div||A("div",p,{position:"absolute",
|
106
|
+
left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},c||e);r=c.style;g(a,{on:function(){b.on.apply({element:B[0].div},arguments);return a},translateXSetter:function(b,f){r.left=b+"px";a[f]=b;a.doTransform=!0},translateYSetter:function(b,f){r.top=b+"px";a[f]=b;a.doTransform=!0}});l(a,r)})}}else c=e;c.appendChild(d);b.added=!0;b.alignOnAdd&&b.htmlUpdateTransform();return b});return b}})})(K);(function(a){var C,A,G=
|
107
|
+
a.createElement,F=a.css,m=a.defined,g=a.deg2rad,k=a.discardElement,q=a.doc,v=a.each,u=a.erase,h=a.extend;C=a.extendClass;var e=a.isArray,n=a.isNumber,d=a.isObject,c=a.merge;A=a.noop;var w=a.pick,b=a.pInt,y=a.SVGElement,D=a.SVGRenderer,H=a.win;a.svg||(A={docMode8:q&&8===q.documentMode,init:function(a,b){var l=["\x3c",b,' filled\x3d"f" stroked\x3d"f"'],c=["position: ","absolute",";"],d="div"===b;("shape"===b||d)&&c.push("left:0;top:0;width:1px;height:1px;");c.push("visibility: ",d?"hidden":"visible");
|
108
|
+
l.push(' style\x3d"',c.join(""),'"/\x3e');b&&(l=d||"span"===b||"img"===b?l.join(""):a.prepVML(l),this.element=G(l));this.renderer=a},add:function(a){var b=this.renderer,l=this.element,c=b.box,d=a&&a.inverted,c=a?a.element||a:c;a&&(this.parentGroup=a);d&&b.invertChild(l,c);c.appendChild(l);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,
|
109
|
+
setSpanRotation:function(){var a=this.rotation,b=Math.cos(a*g),c=Math.sin(a*g);F(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,d,e){var l=d?Math.cos(d*g):1,r=d?Math.sin(d*g):0,h=w(this.elemHeight,this.element.offsetHeight),n;this.xCorr=0>l&&-a;this.yCorr=0>r&&-h;n=0>l*r;this.xCorr+=r*b*(n?1-c:c);this.yCorr-=l*b*(d?n?c:1-c:1);e&&"left"!==
|
110
|
+
e&&(this.xCorr-=a*c*(0>l?-1:1),d&&(this.yCorr-=h*c*(0>r?-1:1)),F(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,l=[];b--;)n(a[b])?l[b]=Math.round(10*a[b])-5:"Z"===a[b]?l[b]="x":(l[b]=a[b],!a.isArc||"wa"!==a[b]&&"at"!==a[b]||(l[b+5]===l[b+7]&&(l[b+7]+=a[b+7]>a[b+5]?1:-1),l[b+6]===l[b+8]&&(l[b+8]+=a[b+8]>a[b+6]?1:-1)));return l.join(" ")||"x"},clip:function(a){var b=this,l;a?(l=a.members,u(l,b),l.push(b),b.destroyClip=function(){u(l,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),
|
111
|
+
a={clip:b.docMode8?"inherit":"rect(auto)"});return b.css(a)},css:y.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&k(a)},destroy:function(){this.destroyClip&&this.destroyClip();return y.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=H.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,c){var l;a=a.split(/[ ,]/);l=a.length;if(9===l||11===l)a[l-4]=a[l-2]=b(a[l-2])-10*c;return a.join(" ")},shadow:function(a,c,d){var l=[],r,p=this.element,
|
112
|
+
e=this.renderer,h,n=p.style,f,t=p.path,y,J,g,B;t&&"string"!==typeof t.value&&(t="x");J=t;if(a){g=w(a.width,3);B=(a.opacity||.15)/g;for(r=1;3>=r;r++)y=2*g+1-2*r,d&&(J=this.cutOffPath(t.value,y+.5)),f=['\x3cshape isShadow\x3d"true" strokeweight\x3d"',y,'" filled\x3d"false" path\x3d"',J,'" coordsize\x3d"10 10" style\x3d"',p.style.cssText,'" /\x3e'],h=G(e.prepVML(f),null,{left:b(n.left)+w(a.offsetX,1),top:b(n.top)+w(a.offsetY,1)}),d&&(h.cutOff=y+1),f=['\x3cstroke color\x3d"',a.color||"#000000",'" opacity\x3d"',
|
113
|
+
B*r,'"/\x3e'],G(e.prepVML(f),null,null,h),c?c.element.appendChild(h):p.parentNode.insertBefore(h,p),l.push(h);this.shadows=l}return this},updateShadows:A,setAttr:function(a,b){this.docMode8?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){(this.added?this.element:this).className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||G(this.renderer.prepVML(["\x3cstroke/\x3e"]),null,null,c))[b]=a||"solid";this[b]=a},dSetter:function(a,b,c){var l=this.shadows;
|
114
|
+
a=a||[];this.d=a.join&&a.join(" ");c.path=a=this.pathToVML(a);if(l)for(c=l.length;c--;)l[c].path=l[c].cutOff?this.cutOffPath(a,l[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var l=c.nodeName;"SPAN"===l?c.style.color=a:"IMG"!==l&&(c.filled="none"!==a,this.setAttr("fillcolor",this.renderer.color(a,c,b,this)))},"fill-opacitySetter":function(a,b,c){G(this.renderer.prepVML(["\x3c",b.split("-")[0],' opacity\x3d"',a,'"/\x3e']),null,null,c)},opacitySetter:A,rotationSetter:function(a,b,c){c=
|
115
|
+
c.style;this[b]=c[b]=a;c.left=-Math.round(Math.sin(a*g)+1)+"px";c.top=Math.round(Math.cos(a*g))+"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;n(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&&v(this.shadows,function(c){c.style[b]=a});"DIV"===c.nodeName&&(a="hidden"===a?"-999em":
|
116
|
+
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}},A["stroke-opacitySetter"]=A["fill-opacitySetter"],a.VMLElement=A=C(y,A),A.prototype.ySetter=A.prototype.widthSetter=A.prototype.heightSetter=A.prototype.xSetter,A={Element:A,isIE8:-1<H.navigator.userAgent.indexOf("MSIE 8.0"),init:function(a,b,c){var l,
|
117
|
+
d;this.alignedObjects=[];l=this.createElement("div").css({position:"relative"});d=l.element;a.appendChild(l.element);this.isVML=!0;this.box=d;this.boxWrapper=l;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(b,c,!1);if(!q.namespaces.hcv){q.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{q.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(p){q.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},
|
118
|
+
isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,e){var l=this.createElement(),p=d(a);return h(l,{members:[],count:0,left:(p?a.x:a)+1,top:(p?a.y:b)+1,width:(p?a.width:c)-1,height:(p?a.height:e)-1,getCSS:function(a){var b=a.element,c=b.nodeName,f=a.inverted,t=this.top-("shape"===c?b.offsetTop:0),l=this.left,b=l+this.width,p=t+this.height,t={clip:"rect("+Math.round(f?l:t)+"px,"+Math.round(f?p:b)+"px,"+Math.round(f?b:p)+"px,"+Math.round(f?t:l)+"px)"};!f&&a.docMode8&&"DIV"===c&&
|
119
|
+
h(t,{width:b+"px",height:p+"px"});return t},updateClipping:function(){v(l.members,function(a){a.element&&a.css(l.getCSS(a))})}})},color:function(b,c,d,e){var l=this,p,r=/^rgba/,h,n,f="none";b&&b.linearGradient?n="gradient":b&&b.radialGradient&&(n="pattern");if(n){var t,y,w=b.linearGradient||b.radialGradient,g,q,B,x,D,z="";b=b.stops;var k,m=[],u=function(){h=['\x3cfill colors\x3d"'+m.join(",")+'" opacity\x3d"',B,'" o:opacity2\x3d"',q,'" type\x3d"',n,'" ',z,'focus\x3d"100%" method\x3d"any" /\x3e'];
|
120
|
+
G(l.prepVML(h),null,null,c)};g=b[0];k=b[b.length-1];0<g[0]&&b.unshift([0,g[1]]);1>k[0]&&b.push([1,k[1]]);v(b,function(f,b){r.test(f[1])?(p=a.color(f[1]),t=p.get("rgb"),y=p.get("a")):(t=f[1],y=1);m.push(100*f[0]+"% "+t);b?(B=y,x=t):(q=y,D=t)});if("fill"===d)if("gradient"===n)d=w.x1||w[0]||0,b=w.y1||w[1]||0,g=w.x2||w[2]||0,w=w.y2||w[3]||0,z='angle\x3d"'+(90-180*Math.atan((w-b)/(g-d))/Math.PI)+'"',u();else{var f=w.r,H=2*f,A=2*f,C=w.cx,F=w.cy,T=c.radialReference,K,f=function(){T&&(K=e.getBBox(),C+=(T[0]-
|
121
|
+
K.x)/K.width-.5,F+=(T[1]-K.y)/K.height-.5,H*=T[2]/K.width,A*=T[2]/K.height);z='src\x3d"'+a.getOptions().global.VMLRadialGradientURL+'" size\x3d"'+H+","+A+'" origin\x3d"0.5,0.5" position\x3d"'+C+","+F+'" color2\x3d"'+D+'" ';u()};e.added?f():e.onAdd=f;f=x}else f=t}else r.test(b)&&"IMG"!==c.tagName?(p=a.color(b),e[d+"-opacitySetter"](p.get("a"),d,c),f=p.get("rgb")):(f=c.getElementsByTagName(d),f.length&&(f[0].opacity=1,f[0].type="solid"),f=b);return f},prepVML:function(a){var b=this.isIE8;a=a.join("");
|
122
|
+
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:D.prototype.html,path:function(a){var b={coordsize:"10 10"};e(a)?b.d=a:d(a)&&h(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,c){var l=this.symbol("circle");
|
123
|
+
d(a)&&(c=a.r,b=a.y,a=a.x);l.isCircle=!0;l.r=c;return l.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,d,e){var l=this.createElement("img").attr({src:a});1<arguments.length&&l.attr({x:b,y:c,width:d,height:e});return l},createElement:function(a){return"rect"===a?this.symbol(a):D.prototype.createElement.call(this,a)},invertChild:function(a,c){var d=this;c=c.style;var l="IMG"===a.tagName&&a.style;
|
124
|
+
F(a,{flip:"x",left:b(c.width)-(l?b(l.top):1),top:b(c.height)-(l?b(l.left):1),rotation:-90});v(a.childNodes,function(b){d.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var p=e.start,l=e.end,r=e.r||c||d;c=e.innerR;d=Math.cos(p);var h=Math.sin(p),f=Math.cos(l),t=Math.sin(l);if(0===l-p)return["x"];p=["wa",a-r,b-r,a+r,b+r,a+r*d,b+r*h,a+r*f,b+r*t];e.open&&!c&&p.push("e","M",a,b);p.push("at",a-c,b-c,a+c,b+c,a+c*f,b+c*t,a+c*d,b+c*h,"x","e");p.isArc=!0;return p},circle:function(a,b,c,d,e){e&&m(e.r)&&
|
125
|
+
(c=d=2*e.r);e&&e.isCircle&&(a-=c/2,b-=d/2);return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){return D.prototype.symbols[m(e)&&e.r?"callout":"square"].call(0,a,b,c,d,e)}}},a.VMLRenderer=C=function(){this.init.apply(this,arguments)},C.prototype=c(D.prototype,A),a.Renderer=C);D.prototype.measureSpanWidth=function(a,b){var c=q.createElement("span");a=q.createTextNode(a);c.appendChild(a);F(c,b);this.box.appendChild(c);b=c.offsetWidth;k(c);return b}})(K);(function(a){function C(){var g=
|
126
|
+
a.defaultOptions.global,k=q.moment;if(g.timezone){if(k)return function(a){return-k.tz(a,g.timezone).utcOffset()};a.error(25)}return g.useUTC&&g.getTimezoneOffset}function A(){var g=a.defaultOptions.global,u,h=g.useUTC,e=h?"getUTC":"get",n=h?"setUTC":"set";a.Date=u=g.Date||q.Date;u.hcTimezoneOffset=h&&g.timezoneOffset;u.hcGetTimezoneOffset=C();u.hcMakeTime=function(a,c,e,b,n,g){var d;h?(d=u.UTC.apply(0,arguments),d+=m(d)):d=(new u(a,c,k(e,1),k(b,0),k(n,0),k(g,0))).getTime();return d};F("Minutes Hours Day Date Month FullYear".split(" "),
|
127
|
+
function(a){u["hcGet"+a]=e+a});F("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(a){u["hcSet"+a]=n+a})}var G=a.color,F=a.each,m=a.getTZOffset,g=a.merge,k=a.pick,q=a.win;a.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),
|
128
|
+
shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0,VMLRadialGradientURL:"http://code.highcharts.com/5.0.12/gfx/vml-radial-gradient.png"},chart:{borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},
|
129
|
+
position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},
|
130
|
+
itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,
|
131
|
+
animation:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,backgroundColor:G("#f7f7f7").setOpacity(.85).get(),borderWidth:1,headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e',
|
132
|
+
shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};a.setOptions=function(q){a.defaultOptions=g(!0,a.defaultOptions,q);A();return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;A()})(K);
|
133
|
+
(function(a){var C=a.correctFloat,A=a.defined,G=a.destroyObjectProperties,F=a.isNumber,m=a.merge,g=a.pick,k=a.deg2rad;a.Tick=function(a,g,k,h){this.axis=a;this.pos=g;this.type=k||"";this.isNewLabel=this.isNew=!0;k||h||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,k=a.options,u=a.chart,h=a.categories,e=a.names,n=this.pos,d=k.labels,c=a.tickPositions,w=n===c[0],b=n===c[c.length-1],e=h?g(h[n],e[n],n):n,h=this.label,c=c.info,y;a.isDatetimeAxis&&c&&(y=k.dateTimeLabelFormats[c.higherRanks[n]||
|
134
|
+
c.unitName]);this.isFirst=w;this.isLast=b;k=a.labelFormatter.call({axis:a,chart:u,isFirst:w,isLast:b,dateTimeLabelFormat:y,value:a.isLog?C(a.lin2log(e)):e});A(h)?h&&h.attr({text:k}):(this.labelLength=(this.label=h=A(k)&&d.enabled?u.renderer.text(k,0,0,d.useHTML).css(m(d.style)).add(a.labelGroup):null)&&h.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var q=this.axis,m=a.x,h=q.chart.chartWidth,
|
135
|
+
e=q.chart.spacing,n=g(q.labelLeft,Math.min(q.pos,e[3])),e=g(q.labelRight,Math.max(q.pos+q.len,h-e[1])),d=this.label,c=this.rotation,w={left:0,center:.5,right:1}[q.labelAlign],b=d.getBBox().width,y=q.getSlotWidth(),D=y,H=1,l,B={};if(c)0>c&&m-w*b<n?l=Math.round(m/Math.cos(c*k)-n):0<c&&m+w*b>e&&(l=Math.round((h-m)/Math.cos(c*k)));else if(h=m+(1-w)*b,m-w*b<n?D=a.x+D*(1-w)-n:h>e&&(D=e-a.x+D*w,H=-1),D=Math.min(y,D),D<y&&"center"===q.labelAlign&&(a.x+=H*(y-D-w*(y-Math.min(b,D)))),b>D||q.autoRotation&&(d.styles||
|
136
|
+
{}).width)l=D;l&&(B.width=l,(q.options.labels.style||{}).textOverflow||(B.textOverflow="ellipsis"),d.css(B))},getPosition:function(a,g,k,h){var e=this.axis,n=e.chart,d=h&&n.oldChartHeight||n.chartHeight;return{x:a?e.translate(g+k,null,null,h)+e.transB:e.left+e.offset+(e.opposite?(h&&n.oldChartWidth||n.chartWidth)-e.right-e.left:0),y:a?d-e.bottom+e.offset-(e.opposite?e.height:0):d-e.translate(g+k,null,null,h)-e.transB}},getLabelPosition:function(a,g,m,h,e,n,d,c){var w=this.axis,b=w.transA,y=w.reversed,
|
137
|
+
D=w.staggerLines,q=w.tickRotCorr||{x:0,y:0},l=e.y;A(l)||(l=0===w.side?m.rotation?-8:-m.getBBox().height:2===w.side?q.y+8:Math.cos(m.rotation*k)*(q.y-m.getBBox(!1,0).height/2));a=a+e.x+q.x-(n&&h?n*b*(y?-1:1):0);g=g+l-(n&&!h?n*b*(y?1:-1):0);D&&(m=d/(c||1)%D,w.opposite&&(m=D-m-1),g+=w.labelOffset/D*m);return{x:a,y:Math.round(g)}},getMarkPath:function(a,g,k,h,e,n){return n.crispLine(["M",a,g,"L",a+(e?0:-k),g+(e?k:0)],h)},renderGridLine:function(a,g,k){var h=this.axis,e=h.options,n=this.gridLine,d={},
|
138
|
+
c=this.pos,w=this.type,b=h.tickmarkOffset,y=h.chart.renderer,D=w?w+"Grid":"grid",q=e[D+"LineWidth"],l=e[D+"LineColor"],e=e[D+"LineDashStyle"];n||(d.stroke=l,d["stroke-width"]=q,e&&(d.dashstyle=e),w||(d.zIndex=1),a&&(d.opacity=0),this.gridLine=n=y.path().attr(d).addClass("highcharts-"+(w?w+"-":"")+"grid-line").add(h.gridGroup));if(!a&&n&&(a=h.getPlotLinePath(c+b,n.strokeWidth()*k,a,!0)))n[this.isNew?"attr":"animate"]({d:a,opacity:g})},renderMark:function(a,k,m){var h=this.axis,e=h.options,n=h.chart.renderer,
|
139
|
+
d=this.type,c=d?d+"Tick":"tick",w=h.tickSize(c),b=this.mark,y=!b,D=a.x;a=a.y;var q=g(e[c+"Width"],!d&&h.isXAxis?1:0),e=e[c+"Color"];w&&(h.opposite&&(w[0]=-w[0]),y&&(this.mark=b=n.path().addClass("highcharts-"+(d?d+"-":"")+"tick").add(h.axisGroup),b.attr({stroke:e,"stroke-width":q})),b[y?"attr":"animate"]({d:this.getMarkPath(D,a,w[0],b.strokeWidth()*m,h.horiz,n),opacity:k}))},renderLabel:function(a,k,m,h){var e=this.axis,n=e.horiz,d=e.options,c=this.label,w=d.labels,b=w.step,y=e.tickmarkOffset,D=!0,
|
140
|
+
q=a.x;a=a.y;c&&F(q)&&(c.xy=a=this.getLabelPosition(q,a,c,n,w,y,h,b),this.isFirst&&!this.isLast&&!g(d.showFirstLabel,1)||this.isLast&&!this.isFirst&&!g(d.showLastLabel,1)?D=!1:!n||e.isRadial||w.step||w.rotation||k||0===m||this.handleOverflow(a),b&&h%b&&(D=!1),D&&F(a.y)?(a.opacity=m,c[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1):(c.attr("y",-9999),this.isNewLabel=!0),this.isNew=!1)},render:function(a,k,m){var h=this.axis,e=h.horiz,n=this.getPosition(e,this.pos,h.tickmarkOffset,k),d=n.x,
|
141
|
+
c=n.y,h=e&&d===h.pos+h.len||!e&&c===h.pos?-1:1;m=g(m,1);this.isActive=!0;this.renderGridLine(k,m,h);this.renderMark(n,m,h);this.renderLabel(n,k,m,a)},destroy:function(){G(this,this.axis)}}})(K);var S=function(a){var C=a.addEvent,A=a.animObject,G=a.arrayMax,F=a.arrayMin,m=a.color,g=a.correctFloat,k=a.defaultOptions,q=a.defined,v=a.deg2rad,u=a.destroyObjectProperties,h=a.each,e=a.extend,n=a.fireEvent,d=a.format,c=a.getMagnitude,w=a.grep,b=a.inArray,y=a.isArray,D=a.isNumber,H=a.isString,l=a.merge,B=
|
142
|
+
a.normalizeTickInterval,r=a.objectEach,z=a.pick,M=a.removeEvent,p=a.splat,E=a.syncTimeout,I=a.Tick,L=function(){this.init.apply(this,arguments)};a.extend(L.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,
|
143
|
+
startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,
|
144
|
+
formatter:function(){return a.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,t){var f=t.isX,c=this;c.chart=a;c.horiz=
|
145
|
+
a.inverted&&!c.isZAxis?!f:f;c.isXAxis=f;c.coll=c.coll||(f?"xAxis":"yAxis");c.opposite=t.opposite;c.side=t.side||(c.horiz?c.opposite?0:2:c.opposite?1:3);c.setOptions(t);var d=this.options,e=d.type;c.labelFormatter=d.labels.formatter||c.defaultLabelFormatter;c.userOptions=t;c.minPixelPadding=0;c.reversed=d.reversed;c.visible=!1!==d.visible;c.zoomEnabled=!1!==d.zoomEnabled;c.hasNames="category"===e||!0===d.categories;c.categories=d.categories||c.hasNames;c.names=c.names||[];c.plotLinesAndBandsGroups=
|
146
|
+
{};c.isLog="logarithmic"===e;c.isDatetimeAxis="datetime"===e;c.positiveValuesOnly=c.isLog&&!c.allowNegativeLog;c.isLinked=q(d.linkedTo);c.ticks={};c.labelEdge=[];c.minorTicks={};c.plotLinesAndBands=[];c.alternateBands={};c.len=0;c.minRange=c.userMinRange=d.minRange||d.maxZoom;c.range=d.range;c.offset=d.offset||0;c.stacks={};c.oldStacks={};c.stacksTouched=0;c.max=null;c.min=null;c.crosshair=z(d.crosshair,p(a.options.tooltip.crosshairs)[f?0:1],!1);t=c.options.events;-1===b(c,a.axes)&&(f?a.axes.splice(a.xAxis.length,
|
147
|
+
0,c):a.axes.push(c),a[c.coll].push(c));c.series=c.series||[];a.inverted&&!c.isZAxis&&f&&void 0===c.reversed&&(c.reversed=!0);r(t,function(a,f){C(c,f,a)});c.lin2log=d.linearToLogConverter||c.lin2log;c.isLog&&(c.val2lin=c.log2lin,c.lin2val=c.lin2log)},setOptions:function(a){this.options=l(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],l(k[this.coll],a))},
|
148
|
+
defaultLabelFormatter:function(){var f=this.axis,b=this.value,c=f.categories,p=this.dateTimeLabelFormat,e=k.lang,l=e.numericSymbols,e=e.numericSymbolMagnitude||1E3,r=l&&l.length,x,h=f.options.labels.format,f=f.isLog?Math.abs(b):f.tickInterval;if(h)x=d(h,this);else if(c)x=b;else if(p)x=a.dateFormat(p,b);else if(r&&1E3<=f)for(;r--&&void 0===x;)c=Math.pow(e,r+1),f>=c&&0===10*b%c&&null!==l[r]&&0!==b&&(x=a.numberFormat(b/c,-1)+l[r]);void 0===x&&(x=1E4<=Math.abs(b)?a.numberFormat(b,-1):a.numberFormat(b,
|
149
|
+
-1,void 0,""));return x},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();h(a.series,function(f){if(f.visible||!b.options.chart.ignoreHiddenSeries){var c=f.options,t=c.threshold,d;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=t&&(t=null);if(a.isXAxis)c=f.xData,c.length&&(f=F(c),D(f)||f instanceof Date||(c=w(c,function(a){return D(a)}),f=F(c)),a.dataMin=Math.min(z(a.dataMin,c[0]),
|
150
|
+
f),a.dataMax=Math.max(z(a.dataMax,c[0]),G(c)));else if(f.getExtremes(),d=f.dataMax,f=f.dataMin,q(f)&&q(d)&&(a.dataMin=Math.min(z(a.dataMin,f),f),a.dataMax=Math.max(z(a.dataMax,d),d)),q(t)&&(a.threshold=t),!c.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,b,c,d,p,e){var f=this.linkedParent||this,t=1,l=0,r=d?f.oldTransA:f.transA;d=d?f.oldMin:f.min;var h=f.minPixelPadding;p=(f.isOrdinal||f.isBroken||f.isLog&&p)&&f.lin2val;r||(r=f.transA);c&&(t*=-1,l=f.len);f.reversed&&
|
151
|
+
(t*=-1,l-=t*(f.sector||f.len));b?(a=(a*t+l-h)/r+d,p&&(a=f.lin2val(a))):(p&&(a=f.val2lin(a)),a=t*(a-d)*r+l+t*h+(D(e)?r*e:0));return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,c,d,p){var f=this.chart,t=this.left,e=this.top,l,r,h=c&&f.oldChartHeight||f.chartHeight,n=c&&f.oldChartWidth||f.chartWidth,w;l=this.transB;var g=function(a,f,b){if(a<
|
152
|
+
f||a>b)d?a=Math.min(Math.max(f,a),b):w=!0;return a};p=z(p,this.translate(a,null,null,c));a=c=Math.round(p+l);l=r=Math.round(h-p-l);D(p)?this.horiz?(l=e,r=h-this.bottom,a=c=g(a,t,t+this.width)):(a=t,c=n-this.right,l=r=g(l,e,e+this.height)):w=!0;return w&&!d?null:f.renderer.crispLine(["M",a,l,"L",c,r],b||1)},getLinearTickPositions:function(a,b,c){var f,t=g(Math.floor(b/a)*a);c=g(Math.ceil(c/a)*a);var d=[];if(this.single)return[b];for(b=t;b<=c;){d.push(b);b=g(b+a);if(b===f)break;f=b}return d},getMinorTickPositions:function(){var a=
|
153
|
+
this,b=a.options,c=a.tickPositions,d=a.minorTickInterval,p=[],e=a.pointRangePadding||0,l=a.min-e,e=a.max+e,x=e-l;if(x&&x/d<a.len/3)if(a.isLog)h(this.paddedTicks,function(b,f,c){f&&p.push.apply(p,a.getLogTickPositions(d,c[f-1],c[f],!0))});else if(a.isDatetimeAxis&&"auto"===b.minorTickInterval)p=p.concat(a.getTimeTicks(a.normalizeTimeTickInterval(d),l,e,b.startOfWeek));else for(b=l+(c[0]-l)%d;b<=e&&b!==p[0];b+=d)p.push(b);0!==p.length&&a.trimTicks(p);return p},adjustForMinRange:function(){var a=this.options,
|
154
|
+
b=this.min,c=this.max,d,p,e,l,x,r,n,w;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(q(a.min)||q(a.max)?this.minRange=null:(h(this.series,function(a){r=a.xData;for(l=n=a.xIncrement?1:r.length-1;0<l;l--)if(x=r[l]-r[l-1],void 0===e||x<e)e=x}),this.minRange=Math.min(5*e,this.dataMax-this.dataMin)));c-b<this.minRange&&(p=this.dataMax-this.dataMin>=this.minRange,w=this.minRange,d=(w-c+b)/2,d=[b-d,z(a.min,b-d)],p&&(d[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),b=G(d),c=[b+w,z(a.max,b+w)],
|
155
|
+
p&&(c[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),c=F(c),c-b<w&&(d[0]=c-w,d[1]=z(a.min,c-w),b=G(d)));this.min=b;this.max=c},getClosest:function(){var a;this.categories?a=1:h(this.series,function(b){var f=b.closestPointRange,c=b.visible||!b.chart.options.chart.ignoreHiddenSeries;!b.noSharedTooltip&&q(f)&&c&&(a=q(a)?Math.min(a,f):f)});return a},nameToX:function(a){var f=y(this.categories),c=f?this.categories:this.names,d=a.options.x,p;a.series.requireSorting=!1;q(d)||(d=!1===this.options.uniqueNames?
|
156
|
+
a.series.autoIncrement():b(a.name,c));-1===d?f||(p=c.length):p=d;void 0!==p&&(this.names[p]=a.name);return p},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=this.userMinRange,h(this.series||[],function(b){b.xIncrement=null;if(!b.points||b.isDirtyData)b.processData(),b.generatePoints();h(b.points,function(f,c){var t;f.options&&(t=a.nameToX(f),void 0!==t&&t!==f.x&&(f.x=t,b.xData[c]=t))})}))},setAxisTranslation:function(a){var b=this,f=b.max-b.min,c=b.axisPointRange||
|
157
|
+
0,d,p=0,e=0,l=b.linkedParent,r=!!b.categories,n=b.transA,w=b.isXAxis;if(w||r||c)d=b.getClosest(),l?(p=l.minPointOffset,e=l.pointRangePadding):h(b.series,function(a){var f=r?1:w?z(a.options.pointRange,d,0):b.axisPointRange||0;a=a.options.pointPlacement;c=Math.max(c,f);b.single||(p=Math.max(p,H(a)?0:f/2),e=Math.max(e,"on"===a?0:f))}),l=b.ordinalSlope&&d?b.ordinalSlope/d:1,b.minPointOffset=p*=l,b.pointRangePadding=e*=l,b.pointRange=Math.min(c,f),w&&(b.closestPointRange=d);a&&(b.oldTransA=n);b.translationSlope=
|
158
|
+
b.transA=n=b.options.staticScale||b.len/(f+e||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=n*p},minFromRange:function(){return this.max-this.range},setTickInterval:function(b){var f=this,d=f.chart,p=f.options,e=f.isLog,l=f.log2lin,r=f.isDatetimeAxis,x=f.isXAxis,w=f.isLinked,y=p.maxPadding,E=p.minPadding,k=p.tickInterval,I=p.tickPixelInterval,m=f.categories,H=f.threshold,u=f.softThreshold,L,v,M,A;r||m||w||this.getTickAmount();M=z(f.userMin,p.min);A=z(f.userMax,p.max);w?(f.linkedParent=d[f.coll][p.linkedTo],
|
159
|
+
d=f.linkedParent.getExtremes(),f.min=z(d.min,d.dataMin),f.max=z(d.max,d.dataMax),p.type!==f.linkedParent.options.type&&a.error(11,1)):(!u&&q(H)&&(f.dataMin>=H?(L=H,E=0):f.dataMax<=H&&(v=H,y=0)),f.min=z(M,L,f.dataMin),f.max=z(A,v,f.dataMax));e&&(f.positiveValuesOnly&&!b&&0>=Math.min(f.min,z(f.dataMin,f.min))&&a.error(10,1),f.min=g(l(f.min),15),f.max=g(l(f.max),15));f.range&&q(f.max)&&(f.userMin=f.min=M=Math.max(f.min,f.minFromRange()),f.userMax=A=f.max,f.range=null);n(f,"foundExtremes");f.beforePadding&&
|
160
|
+
f.beforePadding();f.adjustForMinRange();!(m||f.axisPointRange||f.usePercentage||w)&&q(f.min)&&q(f.max)&&(l=f.max-f.min)&&(!q(M)&&E&&(f.min-=l*E),!q(A)&&y&&(f.max+=l*y));D(p.softMin)&&(f.min=Math.min(f.min,p.softMin));D(p.softMax)&&(f.max=Math.max(f.max,p.softMax));D(p.floor)&&(f.min=Math.max(f.min,p.floor));D(p.ceiling)&&(f.max=Math.min(f.max,p.ceiling));u&&q(f.dataMin)&&(H=H||0,!q(M)&&f.min<H&&f.dataMin>=H?f.min=H:!q(A)&&f.max>H&&f.dataMax<=H&&(f.max=H));f.tickInterval=f.min===f.max||void 0===f.min||
|
161
|
+
void 0===f.max?1:w&&!k&&I===f.linkedParent.options.tickPixelInterval?k=f.linkedParent.tickInterval:z(k,this.tickAmount?(f.max-f.min)/Math.max(this.tickAmount-1,1):void 0,m?1:(f.max-f.min)*I/Math.max(f.len,I));x&&!b&&h(f.series,function(a){a.processData(f.min!==f.oldMin||f.max!==f.oldMax)});f.setAxisTranslation(!0);f.beforeSetTickPositions&&f.beforeSetTickPositions();f.postProcessTickInterval&&(f.tickInterval=f.postProcessTickInterval(f.tickInterval));f.pointRange&&!k&&(f.tickInterval=Math.max(f.pointRange,
|
162
|
+
f.tickInterval));b=z(p.minTickInterval,f.isDatetimeAxis&&f.closestPointRange);!k&&f.tickInterval<b&&(f.tickInterval=b);r||e||k||(f.tickInterval=B(f.tickInterval,null,c(f.tickInterval),z(p.allowDecimals,!(.5<f.tickInterval&&5>f.tickInterval&&1E3<f.max&&9999>f.max)),!!this.tickAmount));this.tickAmount||(f.tickInterval=f.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,b,c=a.tickPositions,d=a.tickPositioner,p=a.startOnTick,l=a.endOnTick;this.tickmarkOffset=this.categories&&
|
163
|
+
"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.single=this.min===this.max&&q(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=b=c&&c.slice();!b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,
|
164
|
+
!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,d&&(d=d.apply(this,[this.min,this.max])))&&(this.tickPositions=b=d);this.paddedTicks=b.slice(0);this.trimTicks(b,p,l);this.isLinked||(this.single&&(this.min-=.5,this.max+=.5),c||d||this.adjustTickAmount())},trimTicks:function(a,b,c){var f=a[0],d=a[a.length-1],p=this.minPointOffset||0;if(!this.isLinked){if(b&&
|
165
|
+
-Infinity!==f)this.min=f;else for(;this.min-p>a[0];)a.shift();if(c)this.max=d;else for(;this.max+p<a[a.length-1];)a.pop();0===a.length&&q(f)&&a.push((d+f)/2)}},alignToOthers:function(){var a={},b,c=this.options;!1===this.chart.options.chart.alignTicks||!1===c.alignTicks||this.isLog||h(this.chart[this.coll],function(f){var c=f.options,c=[f.horiz?c.left:c.top,c.width,c.height,c.pane].join();f.series.length&&(a[c]?b=!0:a[c]=1)});return b},getTickAmount:function(){var a=this.options,b=a.tickAmount,c=
|
166
|
+
a.tickPixelInterval;!q(a.tickInterval)&&this.len<c&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&(b=Math.ceil(this.len/c)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,c=this.tickAmount,d=this.finalTickAmt,p=b&&b.length;if(p<c){for(;b.length<c;)b.push(g(b[b.length-1]+a));this.transA*=(p-1)/(c-1);this.max=b[b.length-1]}else p>c&&(this.tickInterval*=2,this.setTickPositions());
|
167
|
+
if(q(d)){for(a=c=b.length;a--;)(3===d&&1===a%2||2>=d&&0<a&&a<c-1)&&b.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,b;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();b=this.len!==this.oldAxisLength;h(this.series,function(b){if(b.isDirtyData||b.isDirty||b.xAxis.isDirty)a=!0});b||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=
|
168
|
+
!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=b||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,b,c,d,p){var f=this,l=f.chart;c=z(c,!0);h(f.series,function(a){delete a.kdTree});p=e(p,{min:a,max:b});n(f,"setExtremes",p,function(){f.userMin=a;f.userMax=b;f.eventArgs=p;c&&l.redraw(d)})},zoom:function(a,b){var f=this.dataMin,c=this.dataMax,d=this.options,
|
169
|
+
p=Math.min(f,z(d.min,f)),d=Math.max(c,z(d.max,c));if(a!==this.min||b!==this.max)this.allowZoomOutside||(q(f)&&(a<p&&(a=p),a>d&&(a=d)),q(c)&&(b<p&&(b=p),b>d&&(b=d))),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsets||[0,0,0,0],d=this.horiz,p=z(b.width,a.plotWidth-c[3]+c[1]),l=z(b.height,a.plotHeight-c[0]+c[2]),e=z(b.top,a.plotTop+c[0]),b=z(b.left,a.plotLeft+c[3]),c=/%$/;c.test(l)&&(l=
|
170
|
+
Math.round(parseFloat(l)/100*a.plotHeight));c.test(e)&&(e=Math.round(parseFloat(e)/100*a.plotHeight+a.plotTop));this.left=b;this.top=e;this.width=p;this.height=l;this.bottom=a.chartHeight-l-e;this.right=a.chartWidth-p-b;this.len=Math.max(d?p:l,0);this.pos=d?b:e},getExtremes:function(){var a=this.isLog,b=this.lin2log;return{min:a?g(b(this.min)):this.min,max:a?g(b(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=
|
171
|
+
this.isLog,f=this.lin2log,c=b?f(this.min):this.min,b=b?f(this.max):this.max;null===a?a=c:c>a?a=c:b<a&&(a=b);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a=(z(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var b=this.options,f=b[a+"Length"],c=z(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(c&&f)return"inside"===b[a+"Position"]&&(f=-f),[f,c]},labelMetrics:function(){var a=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&
|
172
|
+
this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,c=this.tickInterval,d=c,p=this.len/(((this.categories?1:0)+this.max-this.min)/c),l,e=a.rotation,r=this.labelMetrics(),n,w=Number.MAX_VALUE,g,y=function(a){a/=p||1;a=1<a?Math.ceil(a):1;return a*c};b?(g=!a.staggerLines&&!a.step&&(q(e)?[e]:p<z(a.autoRotationLimit,80)&&a.autoRotation))&&h(g,function(a){var b;if(a===e||a&&-90<=a&&90>=a)n=y(Math.abs(r.h/Math.sin(v*a))),b=n+
|
173
|
+
Math.abs(a/360),b<w&&(w=b,l=a,d=n)}):a.step||(d=y(r.h));this.autoRotation=g;this.labelRotation=z(l,e);return d},getSlotWidth:function(){var a=this.chart,b=this.horiz,c=this.options.labels,d=Math.max(this.tickPositions.length-(this.categories?0:1),1),p=a.margin[3];return b&&2>(c.step||0)&&!c.rotation&&(this.staggerLines||1)*this.len/d||!b&&(p&&p-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,c=this.tickPositions,d=this.ticks,p=this.options.labels,e=this.horiz,
|
174
|
+
r=this.getSlotWidth(),x=Math.max(1,Math.round(r-2*(p.padding||5))),n={},w=this.labelMetrics(),g=p.style&&p.style.textOverflow,y,E=0,k,I;H(p.rotation)||(n.rotation=p.rotation||0);h(c,function(a){(a=d[a])&&a.labelLength>E&&(E=a.labelLength)});this.maxLabelLength=E;if(this.autoRotation)E>x&&E>w.h?n.rotation=this.labelRotation:this.labelRotation=0;else if(r&&(y={width:x+"px"},!g))for(y.textOverflow="clip",k=c.length;!e&&k--;)if(I=c[k],x=d[I].label)x.styles&&"ellipsis"===x.styles.textOverflow?x.css({textOverflow:"clip"}):
|
175
|
+
d[I].labelLength>r&&x.css({width:r+"px"}),x.getBBox().height>this.len/c.length-(w.h-w.f)&&(x.specCss={textOverflow:"ellipsis"});n.rotation&&(y={width:(E>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},g||(y.textOverflow="ellipsis"));if(this.labelAlign=p.align||this.autoLabelAlign(this.labelRotation))n.align=this.labelAlign;h(c,function(a){var b=(a=d[a])&&a.label;b&&(b.attr(n),y&&b.css(l(y,b.specCss)),delete b.specCss,a.rotation=n.rotation)});this.tickRotCorr=b.rotCorr(w.b,this.labelRotation||
|
176
|
+
0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||q(this.min)&&q(this.max)&&!!this.tickPositions},addTitle:function(a){var b=this.chart.renderer,f=this.horiz,c=this.opposite,d=this.options.title,p;this.axisTitle||((p=d.textAlign)||(p=(f?{low:"left",middle:"center",high:"right"}:{low:c?"right":"left",middle:"center",high:c?"left":"right"})[d.align]),this.axisTitle=b.text(d.text,0,0,d.useHTML).attr({zIndex:7,rotation:d.rotation||0,align:p}).addClass("highcharts-axis-title").css(d.style).add(this.axisGroup),
|
177
|
+
this.axisTitle.isNew=!0);this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var b=this.ticks;b[a]?b[a].addLabel():b[a]=new I(this,a)},getOffset:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,p=a.tickPositions,l=a.ticks,e=a.horiz,x=a.side,n=b.inverted&&!a.isZAxis?[1,0,3,2][x]:x,w,g,y=0,E,k=0,I=d.title,D=d.labels,m=0,B=b.axisOffset,b=b.clipOffset,H=[-1,1,1,-1][x],u=d.className,L=a.axisParent,v=this.tickSize("tick");w=a.hasData();a.showAxis=g=w||z(d.showEmpty,!0);a.staggerLines=
|
178
|
+
a.horiz&&D.staggerLines;a.axisGroup||(a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(u||"")).add(L),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(u||"")).add(L),a.labelGroup=c.g("axis-labels").attr({zIndex:D.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(u||"")).add(L));w||a.isLinked?(h(p,function(b,c){a.generateTick(b,c)}),a.renderUnsquish(),!1===D.reserveSpace||
|
179
|
+
0!==x&&2!==x&&{1:"left",3:"right"}[x]!==a.labelAlign&&"center"!==a.labelAlign||h(p,function(a){m=Math.max(l[a].getLabelSize(),m)}),a.staggerLines&&(m*=a.staggerLines,a.labelOffset=m*(a.opposite?-1:1))):r(l,function(a,b){a.destroy();delete l[b]});I&&I.text&&!1!==I.enabled&&(a.addTitle(g),g&&!1!==I.reserveSpace&&(a.titleOffset=y=a.axisTitle.getBBox()[e?"height":"width"],E=I.offset,k=q(E)?0:z(I.margin,e?5:10)));a.renderLine();a.offset=H*z(d.offset,B[x]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};c=0===x?
|
180
|
+
-a.labelMetrics().h:2===x?a.tickRotCorr.y:0;k=Math.abs(m)+k;m&&(k=k-c+H*(e?z(D.y,a.tickRotCorr.y+8*H):D.x));a.axisTitleMargin=z(E,k);B[x]=Math.max(B[x],a.axisTitleMargin+y+H*a.offset,k,w&&p.length&&v?v[0]+H*a.offset:0);p=2*Math.floor(a.axisLine.strokeWidth()/2);0<d.offset&&(p-=2*d.offset);b[n]=Math.max(b[n]||p,p)},getLinePath:function(a){var b=this.chart,c=this.opposite,f=this.offset,d=this.horiz,p=this.left+(c?this.width:0)+f,f=b.chartHeight-this.bottom-(c?this.height:0)+f;c&&(a*=-1);return b.renderer.crispLine(["M",
|
181
|
+
d?this.left:p,d?f:this.top,"L",d?b.chartWidth-this.right:p,d?f:b.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,p=this.options.title,l=a?b:c,e=this.opposite,r=this.offset,h=p.x||0,n=p.y||0,w=this.chart.renderer.fontMetrics(p.style&&
|
182
|
+
p.style.fontSize,this.axisTitle).f,d={low:l+(a?0:d),middle:l+d/2,high:l+(a?d:0)}[p.align],b=(a?c+this.height:b)+(a?1:-1)*(e?-1:1)*this.axisTitleMargin+(2===this.side?w:0);return{x:a?d+h:b+(e?this.width:0)+r+h,y:a?b+n-(e?this.height:0)+r:d+n}},renderMinorTick:function(a){var b=this.chart.hasRendered&&D(this.oldMin),c=this.minorTicks;c[a]||(c[a]=new I(this,a,"minor"));b&&c[a].isNew&&c[a].render(null,!0);c[a].render(null,!1,1)},renderTick:function(a,b){var c=this.isLinked,f=this.ticks,d=this.chart.hasRendered&&
|
183
|
+
D(this.oldMin);if(!c||a>=this.min&&a<=this.max)f[a]||(f[a]=new I(this,a)),d&&f[a].isNew&&f[a].render(b,!0,.1),f[a].render(b)},render:function(){var b=this,c=b.chart,d=b.options,p=b.isLog,l=b.lin2log,e=b.isLinked,n=b.tickPositions,x=b.axisTitle,w=b.ticks,g=b.minorTicks,y=b.alternateBands,k=d.stackLabels,m=d.alternateGridColor,q=b.tickmarkOffset,z=b.axisLine,B=b.showAxis,H=A(c.renderer.globalAnimation),u,L;b.labelEdge.length=0;b.overlap=!1;h([w,g,y],function(a){r(a,function(a){a.isActive=!1})});if(b.hasData()||
|
184
|
+
e)b.minorTickInterval&&!b.categories&&h(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),n.length&&(h(n,function(a,c){b.renderTick(a,c)}),q&&(0===b.min||b.single)&&(w[-1]||(w[-1]=new I(b,-1,null,!0)),w[-1].render(-1))),m&&h(n,function(f,d){L=void 0!==n[d+1]?n[d+1]+q:b.max-q;0===d%2&&f<b.max&&L<=b.max+(c.polar?-q:q)&&(y[f]||(y[f]=new a.PlotLineOrBand(b)),u=f+q,y[f].options={from:p?l(u):u,to:p?l(L):L,color:m},y[f].render(),y[f].isActive=!0)}),b._addedPlotLB||(h((d.plotLines||[]).concat(d.plotBands||
|
185
|
+
[]),function(a){b.addPlotBandOrLine(a)}),b._addedPlotLB=!0);h([w,g,y],function(a){var b,f=[],d=H.duration;r(a,function(a,b){a.isActive||(a.render(b,!1,0),a.isActive=!1,f.push(b))});E(function(){for(b=f.length;b--;)a[f[b]]&&!a[f[b]].isActive&&(a[f[b]].destroy(),delete a[f[b]])},a!==y&&c.hasRendered&&d?d:0)});z&&(z[z.isPlaced?"animate":"attr"]({d:this.getLinePath(z.strokeWidth())}),z.isPlaced=!0,z[B?"show":"hide"](!0));x&&B&&(d=b.getTitlePosition(),D(d.y)?(x[x.isNew?"attr":"animate"](d),x.isNew=!1):
|
186
|
+
(x.attr("y",-9999),x.isNew=!0));k&&k.enabled&&b.renderStackTotals();b.isDirty=!1},redraw:function(){this.visible&&(this.render(),h(this.plotLinesAndBands,function(a){a.render()}));h(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var c=this,f=c.stacks,d=c.plotLinesAndBands,p;a||M(c);r(f,function(a,b){u(a);f[b]=null});h([c.ticks,c.minorTicks,c.alternateBands],function(a){u(a)});if(d)for(a=d.length;a--;)d[a].destroy();h("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),
|
187
|
+
function(a){c[a]&&(c[a]=c[a].destroy())});for(p in c.plotLinesAndBandsGroups)c.plotLinesAndBandsGroups[p]=c.plotLinesAndBandsGroups[p].destroy();r(c,function(a,f){-1===b(f,c.keepProps)&&delete c[f]})},drawCrosshair:function(a,b){var c,f=this.crosshair,d=z(f.snap,!0),p,l=this.cross;a||(a=this.cross&&this.cross.e);this.crosshair&&!1!==(q(b)||!d)?(d?q(b)&&(p=this.isXAxis?b.plotX:this.len-b.plotY):p=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),q(p)&&(c=this.getPlotLinePath(b&&(this.isXAxis?
|
188
|
+
b.x:z(b.stackY,b.y)),null,null,null,p)||null),q(c)?(b=this.categories&&!this.isRadial,l||(this.cross=l=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(b?"category ":"thin ")+f.className).attr({zIndex:z(f.zIndex,2)}).add(),l.attr({stroke:f.color||(b?m("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":z(f.width,1)}),f.dashStyle&&l.attr({dashstyle:f.dashStyle})),l.show().attr({d:c}),b&&!f.width&&l.attr({"stroke-width":this.transA}),this.cross.e=a):this.hideCrosshair()):
|
189
|
+
this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}});return a.Axis=L}(K);(function(a){var C=a.Axis,A=a.Date,G=a.dateFormat,F=a.defaultOptions,m=a.defined,g=a.each,k=a.extend,q=a.getMagnitude,v=a.getTZOffset,u=a.normalizeTickInterval,h=a.pick,e=a.timeUnits;C.prototype.getTimeTicks=function(a,d,c,w){var b=[],n={},D=F.global.useUTC,q,l=new A(d-Math.max(v(d),v(c))),B=A.hcMakeTime,r=a.unitRange,z=a.count,u;if(m(d)){l[A.hcSetMilliseconds](r>=e.second?0:z*Math.floor(l.getMilliseconds()/
|
190
|
+
z));if(r>=e.second)l[A.hcSetSeconds](r>=e.minute?0:z*Math.floor(l.getSeconds()/z));if(r>=e.minute)l[A.hcSetMinutes](r>=e.hour?0:z*Math.floor(l[A.hcGetMinutes]()/z));if(r>=e.hour)l[A.hcSetHours](r>=e.day?0:z*Math.floor(l[A.hcGetHours]()/z));if(r>=e.day)l[A.hcSetDate](r>=e.month?1:z*Math.floor(l[A.hcGetDate]()/z));r>=e.month&&(l[A.hcSetMonth](r>=e.year?0:z*Math.floor(l[A.hcGetMonth]()/z)),q=l[A.hcGetFullYear]());if(r>=e.year)l[A.hcSetFullYear](q-q%z);if(r===e.week)l[A.hcSetDate](l[A.hcGetDate]()-l[A.hcGetDay]()+
|
191
|
+
h(w,1));q=l[A.hcGetFullYear]();w=l[A.hcGetMonth]();var p=l[A.hcGetDate](),E=l[A.hcGetHours]();if(A.hcTimezoneOffset||A.hcGetTimezoneOffset)u=(!D||!!A.hcGetTimezoneOffset)&&(c-d>4*e.month||v(d)!==v(c)),l=l.getTime(),l=new A(l+v(l));D=l.getTime();for(d=1;D<c;)b.push(D),D=r===e.year?B(q+d*z,0):r===e.month?B(q,w+d*z):!u||r!==e.day&&r!==e.week?u&&r===e.hour?B(q,w,p,E+d*z):D+r*z:B(q,w,p+d*z*(r===e.day?1:7)),d++;b.push(D);r<=e.hour&&1E4>b.length&&g(b,function(a){0===a%18E5&&"000000000"===G("%H%M%S%L",a)&&
|
192
|
+
(n[a]="day")})}b.info=k(a,{higherRanks:n,totalRange:r*z});return b};C.prototype.normalizeTimeTickInterval=function(a,d){var c=d||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];d=c[c.length-1];var h=e[d[0]],b=d[1],n;for(n=0;n<c.length&&!(d=c[n],h=e[d[0]],b=d[1],c[n+1]&&a<=(h*b[b.length-1]+e[c[n+1][0]])/2);n++);h===e.year&&a<5*h&&(b=[1,2,5]);a=u(a/h,b,
|
193
|
+
"year"===d[0]?Math.max(q(a/h),1):1);return{unitRange:h,count:a,unitName:d[0]}}})(K);(function(a){var C=a.Axis,A=a.getMagnitude,G=a.map,F=a.normalizeTickInterval,m=a.pick;C.prototype.getLogTickPositions=function(a,k,q,v){var g=this.options,h=this.len,e=this.lin2log,n=this.log2lin,d=[];v||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),d=this.getLinearTickPositions(a,k,q);else if(.08<=a)for(var h=Math.floor(k),c,w,b,y,D,g=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];h<q+1&&!D;h++)for(w=
|
194
|
+
g.length,c=0;c<w&&!D;c++)b=n(e(h)*g[c]),b>k&&(!v||y<=q)&&void 0!==y&&d.push(y),y>q&&(D=!0),y=b;else k=e(k),q=e(q),a=g[v?"minorTickInterval":"tickInterval"],a=m("auto"===a?null:a,this._minorAutoInterval,g.tickPixelInterval/(v?5:1)*(q-k)/((v?h/this.tickPositions.length:h)||1)),a=F(a,null,A(a)),d=G(this.getLinearTickPositions(a,k,q),n),v||(this._minorAutoInterval=a/5);v||(this.tickInterval=a);return d};C.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};C.prototype.lin2log=function(a){return Math.pow(10,
|
195
|
+
a)}})(K);(function(a,C){var A=a.arrayMax,G=a.arrayMin,F=a.defined,m=a.destroyObjectProperties,g=a.each,k=a.erase,q=a.merge,v=a.pick;a.PlotLineOrBand=function(a,h){this.axis=a;h&&(this.options=h,this.id=h.id)};a.PlotLineOrBand.prototype={render:function(){var g=this,h=g.axis,e=h.horiz,n=g.options,d=n.label,c=g.label,w=n.to,b=n.from,y=n.value,k=F(b)&&F(w),m=F(y),l=g.svgElem,B=!l,r=[],z=n.color,M=v(n.zIndex,0),p=n.events,r={"class":"highcharts-plot-"+(k?"band ":"line ")+(n.className||"")},E={},I=h.chart.renderer,
|
196
|
+
L=k?"bands":"lines",f=h.log2lin;h.isLog&&(b=f(b),w=f(w),y=f(y));m?(r={stroke:z,"stroke-width":n.width},n.dashStyle&&(r.dashstyle=n.dashStyle)):k&&(z&&(r.fill=z),n.borderWidth&&(r.stroke=n.borderColor,r["stroke-width"]=n.borderWidth));E.zIndex=M;L+="-"+M;(z=h.plotLinesAndBandsGroups[L])||(h.plotLinesAndBandsGroups[L]=z=I.g("plot-"+L).attr(E).add());B&&(g.svgElem=l=I.path().attr(r).add(z));if(m)r=h.getPlotLinePath(y,l.strokeWidth());else if(k)r=h.getPlotBandPath(b,w,n);else return;B&&r&&r.length?(l.attr({d:r}),
|
197
|
+
p&&a.objectEach(p,function(a,b){l.on(b,function(a){p[b].apply(g,[a])})})):l&&(r?(l.show(),l.animate({d:r})):(l.hide(),c&&(g.label=c=c.destroy())));d&&F(d.text)&&r&&r.length&&0<h.width&&0<h.height&&!r.flat?(d=q({align:e&&k&&"center",x:e?!k&&4:10,verticalAlign:!e&&k&&"middle",y:e?k?16:10:k?6:-4,rotation:e&&!k&&90},d),this.renderLabel(d,r,k,M)):c&&c.hide();return g},renderLabel:function(a,h,e,n){var d=this.label,c=this.axis.chart.renderer;d||(d={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+
|
198
|
+
(e?"band":"line")+"-label "+(a.className||"")},d.zIndex=n,this.label=d=c.text(a.text,0,0,a.useHTML).attr(d).add(),d.css(a.style));n=[h[1],h[4],e?h[6]:h[1]];h=[h[2],h[5],e?h[7]:h[2]];e=G(n);c=G(h);d.align(a,!1,{x:e,y:c,width:A(n)-e,height:A(h)-c});d.show()},destroy:function(){k(this.axis.plotLinesAndBands,this);delete this.axis;m(this)}};a.extend(C.prototype,{getPlotBandPath:function(a,h){var e=this.getPlotLinePath(h,null,null,!0),n=this.getPlotLinePath(a,null,null,!0),d=this.horiz,c=1;a=a<this.min&&
|
199
|
+
h<this.min||a>this.max&&h>this.max;n&&e?(a&&(n.flat=n.toString()===e.toString(),c=0),n.push(d&&e[4]===n[4]?e[4]+c:e[4],d||e[5]!==n[5]?e[5]:e[5]+c,d&&e[1]===n[1]?e[1]+c:e[1],d||e[2]!==n[2]?e[2]:e[2]+c)):n=null;return n},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(g,h){var e=(new a.PlotLineOrBand(this,g)).render(),n=this.userOptions;e&&(h&&(n[h]=n[h]||[],n[h].push(g)),this.plotLinesAndBands.push(e));
|
200
|
+
return e},removePlotBandOrLine:function(a){for(var h=this.plotLinesAndBands,e=this.options,n=this.userOptions,d=h.length;d--;)h[d].id===a&&h[d].destroy();g([e.plotLines||[],n.plotLines||[],e.plotBands||[],n.plotBands||[]],function(c){for(d=c.length;d--;)c[d].id===a&&k(c,c[d])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(K,S);(function(a){var C=a.dateFormat,A=a.each,G=a.extend,F=a.format,m=a.isNumber,g=a.map,k=a.merge,q=a.pick,
|
201
|
+
v=a.splat,u=a.syncTimeout,h=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype={init:function(a,h){this.chart=a;this.options=h;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=h.split&&!a.inverted;this.shared=h.shared||this.split},cleanSplit:function(a){A(this.chart.series,function(e){var d=e&&e.tt;d&&(!d.isActive||a?e.tt=d.destroy():d.isActive=!1)})},getLabel:function(){var a=this.chart.renderer,h=this.options;this.label||(this.split?this.label=
|
202
|
+
a.g("tooltip"):(this.label=a.label("",0,0,h.shape||"callout",null,null,h.useHTML,null,"tooltip").attr({padding:h.padding,r:h.borderRadius}),this.label.attr({fill:h.backgroundColor,"stroke-width":h.borderWidth}).css(h.style).shadow(h.shadow)),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();k(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,k(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&
|
203
|
+
(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,h,d,c){var e=this,b=e.now,n=!1!==e.options.animation&&!e.isHidden&&(1<Math.abs(a-b.x)||1<Math.abs(h-b.y)),g=e.followPointer||1<e.len;G(b,{x:n?(2*b.x+a)/3:a,y:n?(b.y+h)/2:h,anchorX:g?void 0:n?(2*b.anchorX+d)/3:d,anchorY:g?void 0:n?(b.anchorY+c)/2:c});e.getLabel().attr(b);n&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,
|
204
|
+
h,d,c)},32))},hide:function(a){var e=this;clearTimeout(this.hideTimer);a=q(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=u(function(){e.getLabel()[a?"fadeOut":"hide"]();e.isHidden=!0},a))},getAnchor:function(a,h){var d,c=this.chart,e=c.inverted,b=c.plotTop,n=c.plotLeft,k=0,m=0,l,q;a=v(a);d=a[0].tooltipPos;this.followPointer&&h&&(void 0===h.chartX&&(h=c.pointer.normalize(h)),d=[h.chartX-c.plotLeft,h.chartY-b]);d||(A(a,function(a){l=a.series.yAxis;q=a.series.xAxis;k+=a.plotX+(!e&&q?q.left-
|
205
|
+
n:0);m+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&l?l.top-b:0)}),k/=a.length,m/=a.length,d=[e?c.plotWidth-m:k,this.shared&&!e&&1<a.length&&h?h.chartY-b:e?c.plotHeight-k:m]);return g(d,Math.round)},getPosition:function(a,h,d){var c=this.chart,e=this.distance,b={},n=d.h||0,g,k=["y",c.chartHeight,h,d.plotY+c.plotTop,c.plotTop,c.plotTop+c.plotHeight],l=["x",c.chartWidth,a,d.plotX+c.plotLeft,c.plotLeft,c.plotLeft+c.plotWidth],m=!this.followPointer&&q(d.ttBelow,!c.inverted===!!d.negative),r=function(a,
|
206
|
+
c,d,f,p,l){var h=d<f-e,r=f+e+d<c,g=f-e-d;f+=e;if(m&&r)b[a]=f;else if(!m&&h)b[a]=g;else if(h)b[a]=Math.min(l-d,0>g-n?g:g-n);else if(r)b[a]=Math.max(p,f+n+d>c?f:f+n);else return!1},z=function(a,c,d,f){var p;f<e||f>c-e?p=!1:b[a]=f<d/2?1:f>c-d/2?c-d-2:f-d/2;return p},v=function(a){var b=k;k=l;l=b;g=a},p=function(){!1!==r.apply(0,k)?!1!==z.apply(0,l)||g||(v(!0),p()):g?b.x=b.y=0:(v(!0),p())};(c.inverted||1<this.len)&&v();p();return b},defaultFormatter:function(a){var e=this.points||v(this),d;d=[a.tooltipFooterHeaderFormatter(e[0])];
|
207
|
+
d=d.concat(a.bodyFormatter(e));d.push(a.tooltipFooterHeaderFormatter(e[0],!0));return d},refresh:function(a,h){var d,c=this.options,e,b=a,g,n={},k=[];d=c.formatter||this.defaultFormatter;var n=this.shared,l;clearTimeout(this.hideTimer);this.followPointer=v(b)[0].series.tooltipOptions.followPointer;g=this.getAnchor(b,h);h=g[0];e=g[1];!n||b.series&&b.series.noSharedTooltip?n=b.getLabelConfig():(A(b,function(a){a.setState("hover");k.push(a.getLabelConfig())}),n={x:b[0].category,y:b[0].y},n.points=k,
|
208
|
+
b=b[0]);this.len=k.length;n=d.call(n,this);l=b.series;this.distance=q(l.tooltipOptions.distance,16);!1===n?this.hide():(d=this.getLabel(),this.isHidden&&d.attr({opacity:1}).show(),this.split?this.renderSplit(n,a):(c.style.width||d.css({width:this.chart.spacingBox.width}),d.attr({text:n&&n.join?n.join(""):n}),d.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+q(b.colorIndex,l.colorIndex)),d.attr({stroke:c.borderColor||b.color||l.color||"#666666"}),this.updatePosition({plotX:h,plotY:e,
|
209
|
+
negative:b.negative,ttBelow:b.ttBelow,h:g[2]||0})),this.isHidden=!1)},renderSplit:function(e,h){var d=this,c=[],g=this.chart,b=g.renderer,n=!0,k=this.options,m,l=this.getLabel();A(e.slice(0,h.length+1),function(a,e){e=h[e-1]||{isHeader:!0,plotX:h[0].plotX};var r=e.series||d,w=r.tt,p=e.series||{},y="highcharts-color-"+q(e.colorIndex,p.colorIndex,"none");w||(r.tt=w=b.label(null,null,null,"callout").addClass("highcharts-tooltip-box "+y).attr({padding:k.padding,r:k.borderRadius,fill:k.backgroundColor,
|
210
|
+
stroke:e.color||p.color||"#333333","stroke-width":k.borderWidth}).add(l));w.isActive=!0;w.attr({text:a});w.css(k.style);a=w.getBBox();p=a.width+w.strokeWidth();e.isHeader?(m=a.height,p=Math.max(0,Math.min(e.plotX+g.plotLeft-p/2,g.chartWidth-p))):p=e.plotX+g.plotLeft-q(k.distance,16)-p;0>p&&(n=!1);a=(e.series&&e.series.yAxis&&e.series.yAxis.pos)+(e.plotY||0);a-=g.plotTop;c.push({target:e.isHeader?g.plotHeight+m:a,rank:e.isHeader?1:0,size:r.tt.getBBox().height+1,point:e,x:p,tt:w})});this.cleanSplit();
|
211
|
+
a.distribute(c,g.plotHeight+m);A(c,function(a){var b=a.point,c=b.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:n||b.isHeader?a.x:b.plotX+g.plotLeft+q(k.distance,16),y:a.pos+g.plotTop,anchorX:b.isHeader?b.plotX+g.plotLeft:b.plotX+c.xAxis.pos,anchorY:b.isHeader?a.pos+g.plotTop-15:b.plotY+c.yAxis.pos})})},updatePosition:function(a){var e=this.chart,d=this.getLabel(),d=(this.options.positioner||this.getPosition).call(this,d.width,d.height,a);this.move(Math.round(d.x),Math.round(d.y||
|
212
|
+
0),a.plotX+e.plotLeft,a.plotY+e.plotTop)},getDateFormat:function(a,g,d,c){var e=C("%m-%d %H:%M:%S.%L",g),b,n,k={millisecond:15,second:12,minute:9,hour:6,day:3},m="millisecond";for(n in h){if(a===h.week&&+C("%w",g)===d&&"00:00:00.000"===e.substr(6)){n="week";break}if(h[n]>a){n=m;break}if(k[n]&&e.substr(k[n])!=="01-01 00:00:00.000".substr(k[n]))break;"week"!==n&&(m=n)}n&&(b=c[n]);return b},getXDateFormat:function(a,h,d){h=h.dateTimeLabelFormats;var c=d&&d.closestPointRange;return(c?this.getDateFormat(c,
|
213
|
+
a.x,d.options.startOfWeek,h):h.day)||h.year},tooltipFooterHeaderFormatter:function(a,h){var d=h?"footer":"header";h=a.series;var c=h.tooltipOptions,e=c.xDateFormat,b=h.xAxis,g=b&&"datetime"===b.options.type&&m(a.key),d=c[d+"Format"];g&&!e&&(e=this.getXDateFormat(a,c,b));g&&e&&(d=d.replace("{point.key}","{point.key:"+e+"}"));return F(d,{point:a,series:h})},bodyFormatter:function(a){return g(a,function(a){var d=a.series.tooltipOptions;return(d.pointFormatter||a.point.tooltipFormatter).call(a.point,
|
214
|
+
d.pointFormat)})}}})(K);(function(a){var C=a.addEvent,A=a.attr,G=a.charts,F=a.color,m=a.css,g=a.defined,k=a.doc,q=a.each,v=a.extend,u=a.fireEvent,h=a.offset,e=a.pick,n=a.removeEvent,d=a.splat,c=a.Tooltip,w=a.win;a.Pointer=function(a,c){this.init(a,c)};a.Pointer.prototype={init:function(a,d){this.options=d;this.chart=a;this.runChartClick=d.chart.events&&!!d.chart.events.click;this.pinchDown=[];this.lastValidTouch={};c&&d.tooltip.enabled&&(a.tooltip=new c(a,d.tooltip),this.followTouchMove=e(d.tooltip.followTouchMove,
|
215
|
+
!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,c=b.options.chart,d=c.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(d=e(c.pinchType,d));this.zoomX=a=/x/.test(d);this.zoomY=d=/y/.test(d);this.zoomHor=a&&!b||d&&b;this.zoomVert=d&&!b||a&&b;this.hasZoom=a||d},normalize:function(a,c){var b,d;a=a||w.event;a.target||(a.target=a.srcElement);d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;c||(this.chartPosition=c=h(this.chart.container));void 0===d.pageX?(b=Math.max(a.x,
|
216
|
+
a.clientX-c.left),c=a.y):(b=d.pageX-c.left,c=d.pageY-c.top);return v(a,{chartX:Math.round(b),chartY:Math.round(c)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};q(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},getKDPoints:function(a,c,d){var b=[],l,h,r;q(a,function(a){l=a.noSharedTooltip&&c;h=!c&&a.directTouch;a.visible&&!h&&e(a.options.enableMouseTracking,!0)&&(r=a.searchPoint(d,!l&&0>a.options.findNearestPointBy.indexOf("y")))&&
|
217
|
+
r.series&&b.push(r)});b.sort(function(a,b){var d=a.distX-b.distX,l=a.dist-b.dist,e=(b.series.group&&b.series.group.zIndex)-(a.series.group&&a.series.group.zIndex);return 0!==d&&c?d:0!==l?l:0!==e?e:a.series.index>b.series.index?-1:1});if(c&&b[0]&&!b[0].series.noSharedTooltip)for(a=b.length;a--;)(b[a].x!==b[0].x||b[a].series.noSharedTooltip)&&b.splice(a,1);return b},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,c){var b=
|
218
|
+
a.series,d=b.xAxis,b=b.yAxis;if(d&&b)return c?{chartX:d.len+d.pos-a.clientX,chartY:b.len+b.pos-a.plotY}:{chartX:a.clientX+d.pos,chartY:a.plotY+b.pos}},getHoverData:function(b,c,d,e,l,h){var r=b,g=c,r=l?d:[g];e=!(!e||!b);c=g&&!g.stickyTracking;var n=function(a,b){return 0===b},p;e?n=function(a){return a===b}:c?n=function(a){return a.series===g}:r=a.grep(d,function(a){return a.stickyTracking});p=e&&!l?[b]:this.getKDPoints(r,l,h);g=(r=a.find(p,n))&&r.series;e||c||!l||(p=this.getKDPoints(d,l,h));p.sort(function(a,
|
219
|
+
b){return a.series.index-b.series.index});return{hoverPoint:r,hoverSeries:g,hoverPoints:p}},runPointActions:function(b,c){var d=this.chart,h=d.tooltip,l=h?h.shared:!1,g=c||d.hoverPoint,r=g&&g.series||d.hoverSeries;c=this.getHoverData(g,r,d.series,!!c||r&&r.directTouch&&this.isDirectTouch,l,b);var n,w,g=c.hoverPoint;n=(r=c.hoverSeries)&&r.tooltipOptions.followPointer;w=(l=l&&g&&!g.series.noSharedTooltip)?c.hoverPoints:g?[g]:[];if(g&&(g!==d.hoverPoint||h&&h.isHidden)){q(d.hoverPoints||[],function(b){-1===
|
220
|
+
a.inArray(b,w)&&b.setState()});q(w||[],function(a){a.setState("hover")});if(d.hoverSeries!==r)r.onMouseOver();d.hoverPoint&&d.hoverPoint.firePointEvent("mouseOut");g.firePointEvent("mouseOver");d.hoverPoints=w;d.hoverPoint=g;h&&h.refresh(l?w:g,b)}else n&&h&&!h.isHidden&&(r=h.getAnchor([{}],b),h.updatePosition({plotX:r[0],plotY:r[1]}));this.unDocMouseMove||(this.unDocMouseMove=C(k,"mousemove",function(b){var c=G[a.hoverChartIndex];if(c)c.pointer.onDocumentMouseMove(b)}));q(d.axes,function(c){e(c.crosshair.snap,
|
221
|
+
!0)?a.find(w,function(a){return a.series[c.coll]===c})?c.drawCrosshair(b,g):c.hideCrosshair():c.drawCrosshair(b)})},reset:function(a,c){var b=this.chart,e=b.hoverSeries,l=b.hoverPoint,h=b.hoverPoints,g=b.tooltip,n=g&&g.shared?h:l;a&&n&&q(d(n),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)g&&n&&(g.refresh(n),l&&(l.setState(l.state,!0),q(b.axes,function(a){a.crosshair&&a.drawCrosshair(null,l)})));else{if(l)l.onMouseOut();h&&q(h,function(a){a.setState()});if(e)e.onMouseOut();g&&g.hide(c);
|
222
|
+
this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());q(b.axes,function(a){a.hideCrosshair()});this.hoverX=b.hoverPoints=b.hoverPoint=null}},scaleGroups:function(a,c){var b=this.chart,d;q(b.series,function(e){d=a||e.getPlotBox();e.xAxis&&e.xAxis.zoomEnabled&&e.group&&(e.group.attr(d),e.markerGroup&&(e.markerGroup.attr(d),e.markerGroup.clip(c?b.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(d))});b.clipRect.attr(c||b.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=
|
223
|
+
a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,d=a.chartX,e=a.chartY,h=this.zoomHor,g=this.zoomVert,n=b.plotLeft,w=b.plotTop,p=b.plotWidth,k=b.plotHeight,m,q=this.selectionMarker,f=this.mouseDownX,t=this.mouseDownY,v=c.panKey&&a[c.panKey+"Key"];q&&q.touch||(d<n?d=n:d>n+p&&(d=n+p),e<w?e=w:e>w+k&&(e=w+k),this.hasDragged=Math.sqrt(Math.pow(f-d,2)+Math.pow(t-e,2)),10<this.hasDragged&&(m=b.isInsidePlot(f-
|
224
|
+
n,t-w),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&m&&!v&&!q&&(this.selectionMarker=q=b.renderer.rect(n,w,h?1:p,g?1:k,0).attr({fill:c.selectionMarkerFill||F("#335cad").setOpacity(.25).get(),"class":"highcharts-selection-marker",zIndex:7}).add()),q&&h&&(d-=f,q.attr({width:Math.abs(d),x:(0<d?0:d)+f})),q&&g&&(d=e-t,q.attr({height:Math.abs(d),y:(0<d?0:d)+t})),m&&!q&&c.panning&&b.pan(a,c.panning)))},drop:function(a){var b=this,c=this.chart,d=this.hasPinched;if(this.selectionMarker){var e={originalEvent:a,
|
225
|
+
xAxis:[],yAxis:[]},h=this.selectionMarker,r=h.attr?h.attr("x"):h.x,n=h.attr?h.attr("y"):h.y,w=h.attr?h.attr("width"):h.width,p=h.attr?h.attr("height"):h.height,k;if(this.hasDragged||d)q(c.axes,function(c){if(c.zoomEnabled&&g(c.min)&&(d||b[{xAxis:"zoomX",yAxis:"zoomY"}[c.coll]])){var l=c.horiz,f="touchend"===a.type?c.minPixelPadding:0,h=c.toValue((l?r:n)+f),l=c.toValue((l?r+w:n+p)-f);e[c.coll].push({axis:c,min:Math.min(h,l),max:Math.max(h,l)});k=!0}}),k&&u(c,"selection",e,function(a){c.zoom(v(a,d?
|
226
|
+
{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();d&&this.scaleGroups()}c&&(m(c.container,{cursor:c._cursor}),c.cancelClick=10<this.hasDragged,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a);this.zoomOption(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(b){G[a.hoverChartIndex]&&G[a.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(a){var b=this.chart,
|
227
|
+
c=this.chartPosition;a=this.normalize(a,c);!c||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var c=G[a.hoverChartIndex];c&&(b.relatedTarget||b.toElement)&&(c.pointer.reset(),c.pointer.chartPosition=null)},onContainerMouseMove:function(b){var c=this.chart;g(a.hoverChartIndex)&&G[a.hoverChartIndex]&&G[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex=c.index);b=this.normalize(b);b.returnValue=!1;
|
228
|
+
"mousedown"===c.mouseIsDown&&this.drag(b);!this.inClass(b.target,"highcharts-tracker")&&!c.isInsidePlot(b.chartX-c.plotLeft,b.chartY-c.plotTop)||c.openMenu||this.runPointActions(b)},inClass:function(a,c){for(var b;a;){if(b=A(a,"class")){if(-1!==b.indexOf(c))return!0;if(-1!==b.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;this.isDirectTouch=!1;if(!(!b||!a||b.stickyTracking||this.inClass(a,"highcharts-tooltip")||
|
229
|
+
this.inClass(a,"highcharts-series-"+b.index)&&this.inClass(a,"highcharts-tracker")))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop;a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(u(c.series,"click",v(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(v(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-e)&&u(b,"click",a)))},setDOMEvents:function(){var b=this,c=b.chart.container;c.onmousedown=
|
230
|
+
function(a){b.onContainerMouseDown(a)};c.onmousemove=function(a){b.onContainerMouseMove(a)};c.onclick=function(a){b.onContainerClick(a)};C(c,"mouseleave",b.onContainerMouseLeave);1===a.chartCount&&C(k,"mouseup",b.onDocumentMouseUp);a.hasTouch&&(c.ontouchstart=function(a){b.onContainerTouchStart(a)},c.ontouchmove=function(a){b.onContainerTouchMove(a)},1===a.chartCount&&C(k,"touchend",b.onDocumentTouchEnd))},destroy:function(){var b=this;b.unDocMouseMove&&b.unDocMouseMove();n(b.chart.container,"mouseleave",
|
231
|
+
b.onContainerMouseLeave);a.chartCount||(n(k,"mouseup",b.onDocumentMouseUp),n(k,"touchend",b.onDocumentTouchEnd));clearInterval(b.tooltipTimeout);a.objectEach(b,function(a,c){b[c]=null})}}})(K);(function(a){var C=a.charts,A=a.each,G=a.extend,F=a.map,m=a.noop,g=a.pick;G(a.Pointer.prototype,{pinchTranslate:function(a,g,m,u,h,e){this.zoomHor&&this.pinchTranslateDirection(!0,a,g,m,u,h,e);this.zoomVert&&this.pinchTranslateDirection(!1,a,g,m,u,h,e)},pinchTranslateDirection:function(a,g,m,u,h,e,n,d){var c=
|
232
|
+
this.chart,w=a?"x":"y",b=a?"X":"Y",k="chart"+b,q=a?"width":"height",v=c["plot"+(a?"Left":"Top")],l,B,r=d||1,z=c.inverted,M=c.bounds[a?"h":"v"],p=1===g.length,E=g[0][k],I=m[0][k],L=!p&&g[1][k],f=!p&&m[1][k],t;m=function(){!p&&20<Math.abs(E-L)&&(r=d||Math.abs(I-f)/Math.abs(E-L));B=(v-I)/r+E;l=c["plot"+(a?"Width":"Height")]/r};m();g=B;g<M.min?(g=M.min,t=!0):g+l>M.max&&(g=M.max-l,t=!0);t?(I-=.8*(I-n[w][0]),p||(f-=.8*(f-n[w][1])),m()):n[w]=[I,f];z||(e[w]=B-v,e[q]=l);e=z?1/r:r;h[q]=l;h[w]=g;u[z?a?"scaleY":
|
233
|
+
"scaleX":"scale"+b]=r;u["translate"+b]=e*v+(I-e*E)},pinch:function(a){var k=this,v=k.chart,u=k.pinchDown,h=a.touches,e=h.length,n=k.lastValidTouch,d=k.hasZoom,c=k.selectionMarker,w={},b=1===e&&(k.inClass(a.target,"highcharts-tracker")&&v.runTrackerClick||k.runChartClick),y={};1<e&&(k.initiated=!0);d&&k.initiated&&!b&&a.preventDefault();F(h,function(a){return k.normalize(a)});"touchstart"===a.type?(A(h,function(a,b){u[b]={chartX:a.chartX,chartY:a.chartY}}),n.x=[u[0].chartX,u[1]&&u[1].chartX],n.y=[u[0].chartY,
|
234
|
+
u[1]&&u[1].chartY],A(v.axes,function(a){if(a.zoomEnabled){var b=v.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,d=a.toPixels(g(a.options.min,a.dataMin)),e=a.toPixels(g(a.options.max,a.dataMax)),h=Math.max(d,e);b.min=Math.min(a.pos,Math.min(d,e)-c);b.max=Math.max(a.pos+a.len,h+c)}}),k.res=!0):k.followTouchMove&&1===e?this.runPointActions(k.normalize(a)):u.length&&(c||(k.selectionMarker=c=G({destroy:m,touch:!0},v.plotBox)),k.pinchTranslate(u,h,w,c,y,n),k.hasPinched=d,k.scaleGroups(w,y),k.res&&(k.res=
|
235
|
+
!1,this.reset(!1,0)))},touch:function(k,m){var q=this.chart,u,h;if(q.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});a.hoverChartIndex=q.index;1===k.touches.length?(k=this.normalize(k),(h=q.isInsidePlot(k.chartX-q.plotLeft,k.chartY-q.plotTop))&&!q.openMenu?(m&&this.runPointActions(k),"touchmove"===k.type&&(m=this.pinchDown,u=m[0]?4<=Math.sqrt(Math.pow(m[0].chartX-k.chartX,2)+Math.pow(m[0].chartY-k.chartY,2)):!1),g(u,!0)&&this.pinch(k)):m&&this.reset()):2===k.touches.length&&
|
236
|
+
this.pinch(k)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(g){C[a.hoverChartIndex]&&C[a.hoverChartIndex].pointer.drop(g)}})})(K);(function(a){var C=a.addEvent,A=a.charts,G=a.css,F=a.doc,m=a.extend,g=a.noop,k=a.Pointer,q=a.removeEvent,v=a.win,u=a.wrap;if(!a.hasTouch&&(v.PointerEvent||v.MSPointerEvent)){var h={},e=!!v.PointerEvent,n=function(){var c=[];c.item=function(a){return this[a]};a.objectEach(h,
|
237
|
+
function(a){c.push({pageX:a.pageX,pageY:a.pageY,target:a.target})});return c},d=function(c,d,b,e){"touch"!==c.pointerType&&c.pointerType!==c.MSPOINTER_TYPE_TOUCH||!A[a.hoverChartIndex]||(e(c),e=A[a.hoverChartIndex].pointer,e[d]({type:b,target:c.currentTarget,preventDefault:g,touches:n()}))};m(k.prototype,{onContainerPointerDown:function(a){d(a,"onContainerTouchStart","touchstart",function(a){h[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){d(a,
|
238
|
+
"onContainerTouchMove","touchmove",function(a){h[a.pointerId]={pageX:a.pageX,pageY:a.pageY};h[a.pointerId].target||(h[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){d(a,"onDocumentTouchEnd","touchend",function(a){delete h[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,e?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,e?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(F,e?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});
|
239
|
+
u(k.prototype,"init",function(a,d,b){a.call(this,d,b);this.hasZoom&&G(d.container,{"-ms-touch-action":"none","touch-action":"none"})});u(k.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(C)});u(k.prototype,"destroy",function(a){this.batchMSEvents(q);a.call(this)})}})(K);(function(a){var C=a.addEvent,A=a.css,G=a.discardElement,F=a.defined,m=a.each,g=a.isFirefox,k=a.marginNames,q=a.merge,v=a.pick,u=a.setAnimation,h=a.stableSort,e=a.win,n=a.wrap;
|
240
|
+
a.Legend=function(a,c){this.init(a,c)};a.Legend.prototype={init:function(a,c){this.chart=a;this.setOptions(c);c.enabled&&(this.render(),C(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(a){var c=v(a.padding,8);this.options=a;this.itemStyle=a.itemStyle;this.itemHiddenStyle=q(this.itemStyle,a.itemHiddenStyle);this.itemMarginTop=a.itemMarginTop||0;this.padding=c;this.initialItemY=c-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=v(a.symbolWidth,16);this.pages=
|
241
|
+
[]},update:function(a,c){var d=this.chart;this.setOptions(q(!0,this.options,a));this.destroy();d.isDirtyLegend=d.isDirtyBox=!0;v(c,!0)&&d.redraw()},colorizeItem:function(d,c){d.legendGroup[c?"removeClass":"addClass"]("highcharts-legend-item-hidden");var e=this.options,b=d.legendItem,h=d.legendLine,g=d.legendSymbol,n=this.itemHiddenStyle.color,e=c?e.itemStyle.color:n,l=c?d.color||n:n,k=d.options&&d.options.marker,r={fill:l};b&&b.css({fill:e,color:e});h&&h.attr({stroke:l});g&&(k&&g.isMarker&&(r=d.pointAttribs(),
|
242
|
+
c||a.objectEach(r,function(a,b){r[b]=n})),g.attr(r))},positionItem:function(a){var c=this.options,d=c.symbolPadding,c=!c.rtl,b=a._legendItemPos,e=b[0],b=b[1],h=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(c?e:this.legendWidth-e-2*d-4,b);h&&(h.x=e,h.y=b)},destroyItem:function(a){var c=a.checkbox;m(["legendItem","legendLine","legendSymbol","legendGroup"],function(c){a[c]&&(a[c]=a[c].destroy())});c&&G(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}m(this.getAllItems(),
|
243
|
+
function(c){m(["legendItem","legendGroup"],a,c)});m("clipRect up down pager nav box title group".split(" "),a,this);this.display=null},positionCheckboxes:function(a){var c=this.group&&this.group.alignAttr,d,b=this.clipHeight||this.legendHeight,e=this.titleHeight;c&&(d=c.translateY,m(this.allItems,function(h){var g=h.checkbox,l;g&&(l=d+e+g.y+(a||0)+3,A(g,{left:c.translateX+h.checkboxOffset+g.x-20+"px",top:l+"px",display:l>d-6&&l<d+b-6?"":"none"}))}))},renderTitle:function(){var a=this.options,c=this.padding,
|
244
|
+
e=a.title,b=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,c-3,c-4,null,null,null,a.useHTML,null,"legend-title").attr({zIndex:1}).css(e.style).add(this.group)),a=this.title.getBBox(),b=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:b}));this.titleHeight=b},setText:function(d){var c=this.options;d.legendItem.attr({text:c.labelFormat?a.format(c.labelFormat,d):c.labelFormatter.call(d)})},renderItem:function(a){var c=this.chart,d=c.renderer,b=this.options,e=
|
245
|
+
"horizontal"===b.layout,h=this.symbolWidth,g=b.symbolPadding,l=this.itemStyle,n=this.itemHiddenStyle,r=this.padding,k=e?v(b.itemDistance,20):0,m=!b.rtl,p=b.width,E=b.itemMarginBottom||0,I=this.itemMarginTop,u=a.legendItem,f=!a.series,t=!f&&a.series.drawLegendSymbol?a.series:a,A=t.options,J=this.createCheckboxForItem&&A&&A.showCheckbox,A=h+g+k+(J?20:0),N=b.useHTML,C=a.options.className;u||(a.legendGroup=d.g("legend-item").addClass("highcharts-"+t.type+"-series highcharts-color-"+a.colorIndex+(C?" "+
|
246
|
+
C:"")+(f?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=u=d.text("",m?h+g:-g,this.baseline||0,N).css(q(a.visible?l:n)).attr({align:m?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(h=l.fontSize,this.fontMetrics=d.fontMetrics(h,u),this.baseline=this.fontMetrics.f+3+I,u.attr("y",this.baseline)),this.symbolHeight=b.symbolHeight||this.fontMetrics.f,t.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,u,N),J&&this.createCheckboxForItem(a));
|
247
|
+
this.colorizeItem(a,a.visible);l.width||u.css({width:(b.itemWidth||c.spacingBox.width)-A});this.setText(a);d=u.getBBox();l=a.checkboxOffset=b.itemWidth||a.legendItemWidth||d.width+A;this.itemHeight=d=Math.round(a.legendItemHeight||d.height||this.symbolHeight);e&&this.itemX-r+l>(p||c.spacingBox.width-2*r-b.x)&&(this.itemX=r,this.itemY+=I+this.lastLineHeight+E,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,l);this.lastItemY=I+this.itemY+E;this.lastLineHeight=Math.max(d,this.lastLineHeight);
|
248
|
+
a._legendItemPos=[this.itemX,this.itemY];e?this.itemX+=l:(this.itemY+=I+d+E,this.lastLineHeight=d);this.offsetWidth=p||Math.max((e?this.itemX-r-k:l)+r,this.offsetWidth)},getAllItems:function(){var a=[];m(this.chart.series,function(c){var d=c&&c.options;c&&v(d.showInLegend,F(d.linkedTo)?!1:void 0,!0)&&(a=a.concat(c.legendItems||("point"===d.legendType?c.data:c)))});return a},adjustMargins:function(a,c){var d=this.chart,b=this.options,e=b.align.charAt(0)+b.verticalAlign.charAt(0)+b.layout.charAt(0);
|
249
|
+
b.floating||m([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(h,g){h.test(e)&&!F(a[g])&&(d[k[g]]=Math.max(d[k[g]],d.legend[(g+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][g]*b[g%2?"x":"y"]+v(b.margin,12)+c[g]))})},render:function(){var a=this,c=a.chart,e=c.renderer,b=a.group,g,n,k,l,B=a.box,r=a.options,z=a.padding;a.itemX=z;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;b||(a.group=b=e.g("legend").attr({zIndex:7}).add(),a.contentGroup=e.g().attr({zIndex:1}).add(b),a.scrollGroup=
|
250
|
+
e.g().add(a.contentGroup));a.renderTitle();g=a.getAllItems();h(g,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});r.reversed&&g.reverse();a.allItems=g;a.display=n=!!g.length;a.lastLineHeight=0;m(g,function(b){a.renderItem(b)});k=(r.width||a.offsetWidth)+z;l=a.lastItemY+a.lastLineHeight+a.titleHeight;l=a.handleOverflow(l);l+=z;B||(a.box=B=e.rect().addClass("highcharts-legend-box").attr({r:r.borderRadius}).add(b),B.isNew=!0);B.attr({stroke:r.borderColor,
|
251
|
+
"stroke-width":r.borderWidth||0,fill:r.backgroundColor||"none"}).shadow(r.shadow);0<k&&0<l&&(B[B.isNew?"attr":"animate"](B.crisp({x:0,y:0,width:k,height:l},B.strokeWidth())),B.isNew=!1);B[n?"show":"hide"]();a.legendWidth=k;a.legendHeight=l;m(g,function(b){a.positionItem(b)});n&&b.align(q(r,{width:k,height:l}),!0,"spacingBox");c.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var c=this,d=this.chart,b=d.renderer,e=this.options,h=e.y,g=this.padding,d=d.spacingBox.height+("top"===e.verticalAlign?
|
252
|
+
-h:h)-g,h=e.maxHeight,l,n=this.clipRect,r=e.navigation,k=v(r.animation,!0),q=r.arrowSize||12,p=this.nav,E=this.pages,I,u=this.allItems,f=function(a){"number"===typeof a?n.attr({height:a}):n&&(c.clipRect=n.destroy(),c.contentGroup.clip());c.contentGroup.div&&(c.contentGroup.div.style.clip=a?"rect("+g+"px,9999px,"+(g+a)+"px,0)":"auto")};"horizontal"!==e.layout||"middle"===e.verticalAlign||e.floating||(d/=2);h&&(d=Math.min(d,h));E.length=0;a>d&&!1!==r.enabled?(this.clipHeight=l=Math.max(d-20-this.titleHeight-
|
253
|
+
g,0),this.currentPage=v(this.currentPage,1),this.fullHeight=a,m(u,function(a,b){var c=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var f=E.length;if(!f||c-E[f-1]>l&&(I||c)!==E[f-1])E.push(I||c),f++;b===u.length-1&&c+a-E[f-1]>l&&E.push(c);c!==I&&(I=c)}),n||(n=c.clipRect=b.clipRect(0,g,9999,0),c.contentGroup.clip(n)),f(l),p||(this.nav=p=b.g().attr({zIndex:1}).add(this.group),this.up=b.symbol("triangle",0,0,q,q).on("click",function(){c.scroll(-1,k)}).add(p),this.pager=b.text("",15,
|
254
|
+
10).addClass("highcharts-legend-navigation").css(r.style).add(p),this.down=b.symbol("triangle-down",0,0,q,q).on("click",function(){c.scroll(1,k)}).add(p)),c.scroll(0),a=d):p&&(f(),this.nav=p.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,c){var d=this.pages,b=d.length;a=this.currentPage+a;var e=this.clipHeight,h=this.options.navigation,g=this.pager,l=this.padding;a>b&&(a=b);0<a&&(void 0!==c&&u(c,this.chart),this.nav.attr({translateX:l,translateY:e+this.padding+
|
255
|
+
7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),g.attr({text:a+"/"+b}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===b?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),this.up.attr({fill:1===a?h.inactiveColor:h.activeColor}).css({cursor:1===a?"default":"pointer"}),this.down.attr({fill:a===b?h.inactiveColor:h.activeColor}).css({cursor:a===b?"default":"pointer"}),c=-d[a-1]+this.initialItemY,
|
256
|
+
this.scrollGroup.animate({translateY:c}),this.currentPage=a,this.positionCheckboxes(c))}};a.LegendSymbolMixin={drawRectangle:function(a,c){var d=a.symbolHeight,b=a.options.squareSymbol;c.legendSymbol=this.chart.renderer.rect(b?(a.symbolWidth-d)/2:0,a.baseline-d+1,b?d:a.symbolWidth,d,v(a.options.symbolRadius,d/2)).addClass("highcharts-point").attr({zIndex:3}).add(c.legendGroup)},drawLineMarker:function(a){var c=this.options,d=c.marker,b=a.symbolWidth,e=a.symbolHeight,h=e/2,g=this.chart.renderer,l=
|
257
|
+
this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);var n;n={"stroke-width":c.lineWidth||0};c.dashStyle&&(n.dashstyle=c.dashStyle);this.legendLine=g.path(["M",0,a,"L",b,a]).addClass("highcharts-graph").attr(n).add(l);d&&!1!==d.enabled&&(c=Math.min(v(d.radius,h),h),0===this.symbol.indexOf("url")&&(d=q(d,{width:e,height:e}),c=0),this.legendSymbol=d=g.symbol(this.symbol,b/2-c,a-c,2*c,2*c,d).addClass("highcharts-point").add(l),d.isMarker=!0)}};(/Trident\/7\.0/.test(e.navigator.userAgent)||g)&&
|
258
|
+
n(a.Legend.prototype,"positionItem",function(a,c){var d=this,b=function(){c._legendItemPos&&a.call(d,c)};b();setTimeout(b)})})(K);(function(a){var C=a.addEvent,A=a.animate,G=a.animObject,F=a.attr,m=a.doc,g=a.Axis,k=a.createElement,q=a.defaultOptions,v=a.discardElement,u=a.charts,h=a.css,e=a.defined,n=a.each,d=a.extend,c=a.find,w=a.fireEvent,b=a.getStyle,y=a.grep,D=a.isNumber,H=a.isObject,l=a.isString,B=a.Legend,r=a.marginNames,z=a.merge,M=a.objectEach,p=a.Pointer,E=a.pick,I=a.pInt,L=a.removeEvent,
|
259
|
+
f=a.seriesTypes,t=a.splat,R=a.svg,J=a.syncTimeout,N=a.win,O=a.Renderer,P=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,b,c){return new P(a,b,c)};d(P.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(l(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(b,c){var f,d,e=b.series,p=b.plotOptions||{};b.series=null;f=z(q,b);for(d in f.plotOptions)f.plotOptions[d].tooltip=p[d]&&z(p[d].tooltip)||void 0;f.tooltip.userOptions=
|
260
|
+
b.chart&&b.chart.forExport&&b.tooltip.userOptions||b.tooltip;f.series=b.series=e;this.userOptions=b;b=f.chart;d=b.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.callback=c;this.isResizing=0;this.options=f;this.axes=[];this.series=[];this.hasCartesianSeries=b.showAxes;var h=this;h.index=u.length;u.push(h);a.chartCount++;d&&M(d,function(a,b){C(h,b,a)});h.xAxis=[];h.yAxis=[];h.pointCount=h.colorCounter=h.symbolCounter=0;h.firstRender()},initSeries:function(b){var c=this.options.chart;
|
261
|
+
(c=f[b.type||c.type||c.defaultSeriesType])||a.error(17,!0);c=new c;c.init(this,b);return c},orderSeries:function(a){var b=this.series;for(a=a||0;a<b.length;a++)b[a]&&(b[a].index=a,b[a].name=b[a].name||"Series "+(b[a].index+1))},isInsidePlot:function(a,b,c){var f=c?b:a;a=c?a:b;return 0<=f&&f<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(b){var c=this.axes,f=this.series,e=this.pointer,p=this.legend,h=this.isDirtyLegend,l,g,r=this.hasCartesianSeries,t=this.isDirtyBox,x,k=this.renderer,m=
|
262
|
+
k.isHidden(),E=[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(b,this);m&&this.temporaryDisplay();this.layOutTitles();for(b=f.length;b--;)if(x=f[b],x.options.stacking&&(l=!0,x.isDirty)){g=!0;break}if(g)for(b=f.length;b--;)x=f[b],x.options.stacking&&(x.isDirty=!0);n(f,function(a){a.isDirty&&"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),h=!0);a.isDirtyData&&w(a,"updatedData")});h&&p.options.enabled&&(p.render(),this.isDirtyLegend=!1);l&&this.getStacks();r&&n(c,function(a){a.updateNames();
|
263
|
+
a.setScale()});this.getMargins();r&&(n(c,function(a){a.isDirty&&(t=!0)}),n(c,function(a){var b=a.min+","+a.max;a.extKey!==b&&(a.extKey=b,E.push(function(){w(a,"afterSetExtremes",d(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(t||l)&&a.redraw()}));t&&this.drawChartBox();w(this,"predraw");n(f,function(a){(t||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});e&&e.reset(!0);k.draw();w(this,"redraw");w(this,"render");m&&this.temporaryDisplay(!0);n(E,function(a){a.call()})},get:function(a){function b(b){return b.id===
|
264
|
+
a||b.options&&b.options.id===a}var f,d=this.series,e;f=c(this.axes,b)||c(this.series,b);for(e=0;!f&&e<d.length;e++)f=c(d[e].points||[],b);return f},getAxes:function(){var a=this,b=this.options,c=b.xAxis=t(b.xAxis||{}),b=b.yAxis=t(b.yAxis||{});n(c,function(a,b){a.index=b;a.isX=!0});n(b,function(a,b){a.index=b});c=c.concat(b);n(c,function(b){new g(a,b)})},getSelectedPoints:function(){var a=[];n(this.series,function(b){a=a.concat(y(b.data||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return y(this.series,
|
265
|
+
function(a){return a.selected})},setTitle:function(a,b,c){var f=this,d=f.options,e;e=d.title=z({style:{color:"#333333",fontSize:d.isStock?"16px":"18px"}},d.title,a);d=d.subtitle=z({style:{color:"#666666"}},d.subtitle,b);n([["title",a,e],["subtitle",b,d]],function(a,b){var c=a[0],d=f[c],e=a[1];a=a[2];d&&e&&(f[c]=d=d.destroy());a&&a.text&&!d&&(f[c]=f.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+c,zIndex:a.zIndex||4}).add(),f[c].update=function(a){f.setTitle(!b&&a,b&&
|
266
|
+
a)},f[c].css(a.style))});f.layOutTitles(c)},layOutTitles:function(a){var b=0,c,f=this.renderer,e=this.spacingBox;n(["title","subtitle"],function(a){var c=this[a],p=this.options[a];a="title"===a?-3:p.verticalAlign?0:b+2;var h;c&&(h=p.style.fontSize,h=f.fontMetrics(h,c).b,c.css({width:(p.width||e.width+p.widthAdjust)+"px"}).align(d({y:a+h},p),!1,"spacingBox"),p.floating||p.verticalAlign||(b=Math.ceil(b+c.getBBox(p.useHTML).height)))},this);c=this.titleOffset!==b;this.titleOffset=b;!this.isDirtyBox&&
|
267
|
+
c&&(this.isDirtyBox=c,this.hasRendered&&E(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var c=this.options.chart,f=c.width,c=c.height,d=this.renderTo;e(f)||(this.containerWidth=b(d,"width"));e(c)||(this.containerHeight=b(d,"height"));this.chartWidth=Math.max(0,f||this.containerWidth||600);this.chartHeight=Math.max(0,a.relativeLength(c,this.chartWidth)||this.containerHeight||400)},temporaryDisplay:function(c){var f=this.renderTo;if(c)for(;f&&f.style;)f.hcOrigStyle&&(a.css(f,f.hcOrigStyle),
|
268
|
+
delete f.hcOrigStyle),f=f.parentNode;else for(;f&&f.style;)"none"===b(f,"display",!1)&&(f.hcOrigStyle={display:f.style.display,height:f.style.height,overflow:f.style.overflow},c={display:"block",overflow:"hidden"},f!==this.renderTo&&(c.height=0),a.css(f,c),f.style.setProperty&&f.style.setProperty("display","block","important")),f=f.parentNode},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var b,c=this.options,f=c.chart,e,p;b=this.renderTo;
|
269
|
+
var h=a.uniqueKey(),g;b||(this.renderTo=b=f.renderTo);l(b)&&(this.renderTo=b=m.getElementById(b));b||a.error(13,!0);e=I(F(b,"data-highcharts-chart"));D(e)&&u[e]&&u[e].hasRendered&&u[e].destroy();F(b,"data-highcharts-chart",this.index);b.innerHTML="";f.skipClone||b.offsetWidth||this.temporaryDisplay();this.getChartSize();e=this.chartWidth;p=this.chartHeight;g=d({position:"relative",overflow:"hidden",width:e+"px",height:p+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},
|
270
|
+
f.style);this.container=b=k("div",{id:h},g,b);this._cursor=b.style.cursor;this.renderer=new (a[f.renderer]||O)(b,e,p,null,f.forExport,c.exporting&&c.exporting.allowHTML);this.setClassName(f.className);this.renderer.setStyle(f.style);this.renderer.chartIndex=this.index},getMargins:function(a){var b=this.spacing,c=this.margin,f=this.titleOffset;this.resetMargins();f&&!e(c[0])&&(this.plotTop=Math.max(this.plotTop,f+this.options.title.margin+b[0]));this.legend.display&&this.legend.adjustMargins(c,b);
|
271
|
+
this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||0)+this.extraMargin.value);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],c=a.margin;a.hasCartesianSeries&&n(a.axes,function(a){a.visible&&a.getOffset()});n(r,function(f,d){e(c[d])||(a[f]+=b[d])});a.setChartSize()},reflow:function(a){var c=this,f=c.options.chart,d=c.renderTo,p=e(f.width),h=f.width||b(d,"width"),f=f.height||b(d,
|
272
|
+
"height"),d=a?a.target:N;if(!p&&!c.isPrinting&&h&&f&&(d===N||d===m)){if(h!==c.containerWidth||f!==c.containerHeight)clearTimeout(c.reflowTimeout),c.reflowTimeout=J(function(){c.container&&c.setSize(void 0,void 0,!1)},a?100:0);c.containerWidth=h;c.containerHeight=f}},initReflow:function(){var a=this,b;b=C(N,"resize",function(b){a.reflow(b)});C(a,"destroy",b)},setSize:function(b,c,f){var d=this,e=d.renderer;d.isResizing+=1;a.setAnimation(f,d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;
|
273
|
+
void 0!==b&&(d.options.chart.width=b);void 0!==c&&(d.options.chart.height=c);d.getChartSize();b=e.globalAnimation;(b?A:h)(d.container,{width:d.chartWidth+"px",height:d.chartHeight+"px"},b);d.setChartSize(!0);e.setSize(d.chartWidth,d.chartHeight,f);n(d.axes,function(a){a.isDirty=!0;a.setScale()});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.layOutTitles();d.getMargins();d.redraw(f);d.oldChartHeight=null;w(d,"resize");J(function(){d&&w(d,"endResize",null,function(){--d.isResizing})},G(b).duration)},setChartSize:function(a){function b(a){a=
|
274
|
+
l[a]||0;return Math.max(m||a,a)/2}var c=this.inverted,f=this.renderer,d=this.chartWidth,e=this.chartHeight,p=this.options.chart,h=this.spacing,l=this.clipOffset,g,r,t,k,m;this.plotLeft=g=Math.round(this.plotLeft);this.plotTop=r=Math.round(this.plotTop);this.plotWidth=t=Math.max(0,Math.round(d-g-this.marginRight));this.plotHeight=k=Math.max(0,Math.round(e-r-this.marginBottom));this.plotSizeX=c?k:t;this.plotSizeY=c?t:k;this.plotBorderWidth=p.plotBorderWidth||0;this.spacingBox=f.spacingBox={x:h[3],y:h[0],
|
275
|
+
width:d-h[3]-h[1],height:e-h[0]-h[2]};this.plotBox=f.plotBox={x:g,y:r,width:t,height:k};m=2*Math.floor(this.plotBorderWidth/2);c=Math.ceil(b(3));f=Math.ceil(b(0));this.clipBox={x:c,y:f,width:Math.floor(this.plotSizeX-b(1)-c),height:Math.max(0,Math.floor(this.plotSizeY-b(2)-f))};a||n(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this,b=a.options.chart;n(["margin","spacing"],function(c){var f=b[c],d=H(f)?f:[f,f,f,f];n(["Top","Right","Bottom","Left"],function(f,
|
276
|
+
e){a[c][e]=E(b[c+f],d[e])})});n(r,function(b,c){a[b]=E(a.margin[c],a.spacing[c])});a.axisOffset=[0,0,0,0];a.clipOffset=[]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,f=this.chartHeight,d=this.chartBackground,e=this.plotBackground,p=this.plotBorder,h,l=this.plotBGImage,g=a.backgroundColor,n=a.plotBackgroundColor,r=a.plotBackgroundImage,t,k=this.plotLeft,m=this.plotTop,E=this.plotWidth,w=this.plotHeight,q=this.plotBox,I=this.clipRect,z=this.clipBox,y="animate";
|
277
|
+
d||(this.chartBackground=d=b.rect().addClass("highcharts-background").add(),y="attr");h=a.borderWidth||0;t=h+(a.shadow?8:0);g={fill:g||"none"};if(h||d["stroke-width"])g.stroke=a.borderColor,g["stroke-width"]=h;d.attr(g).shadow(a.shadow);d[y]({x:t/2,y:t/2,width:c-t-h%2,height:f-t-h%2,r:a.borderRadius});y="animate";e||(y="attr",this.plotBackground=e=b.rect().addClass("highcharts-plot-background").add());e[y](q);e.attr({fill:n||"none"}).shadow(a.plotShadow);r&&(l?l.animate(q):this.plotBGImage=b.image(r,
|
278
|
+
k,m,E,w).add());I?I.animate({width:z.width,height:z.height}):this.clipRect=b.clipRect(z);y="animate";p||(y="attr",this.plotBorder=p=b.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());p.attr({stroke:a.plotBorderColor,"stroke-width":a.plotBorderWidth||0,fill:"none"});p[y](p.crisp({x:k,y:m,width:E,height:w},-p.strokeWidth()));this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,p;n(["inverted","angular","polar"],function(h){c=f[b.type||b.defaultSeriesType];
|
279
|
+
p=b[h]||c&&c.prototype[h];for(e=d&&d.length;!p&&e--;)(c=f[d[e].type])&&c.prototype[h]&&(p=!0);a[h]=p})},linkSeries:function(){var a=this,b=a.series;n(b,function(a){a.linkedSeries.length=0});n(b,function(b){var c=b.options.linkedTo;l(c)&&(c=":previous"===c?a.series[b.index-1]:a.get(c))&&c.linkedParent!==b&&(c.linkedSeries.push(b),b.linkedParent=c,b.visible=E(b.options.visible,c.options.visible,b.visible))})},renderSeries:function(){n(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=
|
280
|
+
this,b=a.options.labels;b.items&&n(b.items,function(c){var f=d(b.style,c.style),e=I(f.left)+a.plotLeft,p=I(f.top)+a.plotTop+12;delete f.left;delete f.top;a.renderer.text(c.html,e,p).attr({zIndex:2}).css(f).add()})},render:function(){var a=this.axes,b=this.renderer,c=this.options,f,d,e;this.setTitle();this.legend=new B(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();c=this.plotWidth;f=this.plotHeight-=21;n(a,function(a){a.setScale()});this.getAxisMargins();d=
|
281
|
+
1.1<c/this.plotWidth;e=1.05<f/this.plotHeight;if(d||e)n(a,function(a){(a.horiz&&d||!a.horiz&&e)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&n(a,function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=b.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0},addCredits:function(a){var b=this;a=z(!0,this.options.credits,a);a.enabled&&!this.credits&&
|
282
|
+
(this.credits=this.renderer.text(a.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){a.href&&(N.location.href=a.href)}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position),this.credits.update=function(a){b.credits=b.credits.destroy();b.addCredits(a)})},destroy:function(){var b=this,c=b.axes,f=b.series,d=b.container,e,p=d&&d.parentNode;w(b,"destroy");b.renderer.forExport?a.erase(u,b):u[b.index]=void 0;a.chartCount--;b.renderTo.removeAttribute("data-highcharts-chart");
|
283
|
+
L(b);for(e=c.length;e--;)c[e]=c[e].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(e=f.length;e--;)f[e]=f[e].destroy();n("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),function(a){var c=b[a];c&&c.destroy&&(b[a]=c.destroy())});d&&(d.innerHTML="",L(d),p&&v(d));M(b,function(a,c){delete b[c]})},isReadyToRender:function(){var a=this;return R||N!=N.top||
|
284
|
+
"complete"===m.readyState?!0:(m.attachEvent("onreadystatechange",function(){m.detachEvent("onreadystatechange",a.firstRender);"complete"===m.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,b=a.options;if(a.isReadyToRender()){a.getContainer();w(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();n(b.series||[],function(b){a.initSeries(b)});a.linkSeries();w(a,"beforeRender");p&&(a.pointer=new p(a,b));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();
|
285
|
+
a.temporaryDisplay(!0)}},onload:function(){n([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);w(this,"load");w(this,"render");e(this.index)&&!1!==this.options.chart.reflow&&this.initReflow();this.onload=null}})})(K);(function(a){var C,A=a.each,G=a.extend,F=a.erase,m=a.fireEvent,g=a.format,k=a.isArray,q=a.isNumber,v=a.pick,u=a.removeEvent;a.Point=C=function(){};a.Point.prototype={init:function(a,e,g){this.series=a;this.color=a.color;this.applyOptions(e,
|
286
|
+
g);a.options.colorByPoint?(e=a.options.colors||a.chart.options.colors,this.color=this.color||e[a.colorCounter],e=e.length,g=a.colorCounter,a.colorCounter++,a.colorCounter===e&&(a.colorCounter=0)):g=a.colorIndex;this.colorIndex=v(this.colorIndex,g);a.chart.pointCount++;return this},applyOptions:function(a,e){var h=this.series,d=h.options.pointValKey||h.pointValKey;a=C.prototype.optionsToObject.call(this,a);G(this,a);this.options=this.options?G(this.options,a):a;a.group&&delete this.group;d&&(this.y=
|
287
|
+
this[d]);this.isNull=v(this.isValid&&!this.isValid(),null===this.x||!q(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===e&&h.xAxis&&h.xAxis.hasNames&&(this.x=h.xAxis.nameToX(this));void 0===this.x&&h&&(this.x=void 0===e?h.autoIncrement(this):e);return this},optionsToObject:function(a){var e={},h=this.series,d=h.options.keys,c=d||h.pointArrayMap||["y"],g=c.length,b=0,m=0;if(q(a)||null===a)e[c[0]]=a;else if(k(a))for(!d&&a.length>g&&(h=typeof a[0],"string"===h?e.name=a[0]:"number"===
|
288
|
+
h&&(e.x=a[0]),b++);m<g;)d&&void 0===a[b]||(e[c[m]]=a[b]),b++,m++;else"object"===typeof a&&(e=a,a.dataLabels&&(h._hasPointLabels=!0),a.marker&&(h._hasPointMarkers=!0));return e},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?
|
289
|
+
" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var a=this.series,e=a.zones,a=a.zoneAxis||"y",g=0,d;for(d=e[g];this[a]>=d.value;)d=e[++g];d&&d.color&&!this.options.color&&(this.color=d.color);return d},destroy:function(){var a=this.series.chart,e=a.hoverPoints,g;a.pointCount--;e&&(this.setState(),F(e,this),e.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)u(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);
|
290
|
+
for(g in this)this[g]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],e,g=6;g--;)e=a[g],this[e]&&(this[e]=this[e].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var e=this.series,h=e.tooltipOptions,d=v(h.valueDecimals,""),
|
291
|
+
c=h.valuePrefix||"",k=h.valueSuffix||"";A(e.pointArrayMap||["y"],function(b){b="{point."+b;if(c||k)a=a.replace(b+"}",c+b+"}"+k);a=a.replace(b+"}",b+":,."+d+"f}")});return g(a,{point:this,series:this.series})},firePointEvent:function(a,e,g){var d=this,c=this.series.options;(c.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents();"click"===a&&c.allowPointSelect&&(g=function(a){d.select&&d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});m(this,a,e,g)},visible:!0}})(K);
|
292
|
+
(function(a){var C=a.addEvent,A=a.animObject,G=a.arrayMax,F=a.arrayMin,m=a.correctFloat,g=a.Date,k=a.defaultOptions,q=a.defaultPlotOptions,v=a.defined,u=a.each,h=a.erase,e=a.extend,n=a.fireEvent,d=a.grep,c=a.isArray,w=a.isNumber,b=a.isString,y=a.merge,D=a.objectEach,H=a.pick,l=a.removeEvent,B=a.splat,r=a.SVGElement,z=a.syncTimeout,M=a.win;a.Series=a.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",radius:4,
|
293
|
+
states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{},
|
294
|
+
halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var c=this,d,f=a.series,p;c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();e(c,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});d=b.events;D(d,function(a,b){C(c,b,a)});if(d&&
|
295
|
+
d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();u(c.parallelArrays,function(a){c[a+"Data"]=[]});c.setData(b.data,!1);c.isCartesian&&(a.hasCartesianSeries=!0);f.length&&(p=f[f.length-1]);c._i=H(p&&p._i,-1)+1;a.orderSeries(this.insert(f))},insert:function(a){var b=this.options.index,c;if(w(b)){for(c=a.length;c--;)if(b>=H(a[c].options.index,a[c]._i)){a.splice(c+1,0,this);break}-1===c&&a.unshift(this);c+=1}else a.push(this);return H(c,
|
296
|
+
a.length-1)},bindAxes:function(){var b=this,c=b.options,d=b.chart,e;u(b.axisTypes||[],function(f){u(d[f],function(a){e=a.options;if(c[f]===e.index||void 0!==c[f]&&c[f]===e.id||void 0===c[f]&&0===e.index)b.insert(a.series),b[f]=a,a.isDirty=!0});b[f]||b.optionalAxis===f||a.error(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments,f=w(b)?function(f){var d="y"===f&&c.toYData?c.toYData(a):a[f];c[f+"Data"][b]=d}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,
|
297
|
+
2))};u(c.parallelArrays,f)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,d=a.pointIntervalUnit,b=H(b,a.pointStart,0);this.pointInterval=c=H(this.pointInterval,a.pointInterval,1);d&&(a=new g(b),"day"===d?a=+a[g.hcSetDate](a[g.hcGetDate]()+c):"month"===d?a=+a[g.hcSetMonth](a[g.hcGetMonth]()+c):"year"===d&&(a=+a[g.hcSetFullYear](a[g.hcGetFullYear]()+c)),c=a-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,c=b.options,d=c.plotOptions,f=(b.userOptions||{}).plotOptions||
|
298
|
+
{},e=d[this.type];this.userOptions=a;b=y(e,d.series,a);this.tooltipOptions=y(k.tooltip,k.plotOptions.series&&k.plotOptions.series.tooltip,k.plotOptions[this.type].tooltip,c.tooltip.userOptions,d.series&&d.series.tooltip,d[this.type].tooltip,a.tooltip);this.stickyTracking=H(a.stickyTracking,f[this.type]&&f[this.type].stickyTracking,f.series&&f.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:b.stickyTracking);null===e.marker&&delete b.marker;this.zoneAxis=b.zoneAxis;a=this.zones=
|
299
|
+
(b.zones||[]).slice();!b.negativeColor&&!b.negativeFillColor||b.zones||a.push({value:b[this.zoneAxis+"Threshold"]||b.threshold||0,className:"highcharts-negative",color:b.negativeColor,fillColor:b.negativeFillColor});a.length&&v(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});return b},getCyclic:function(a,b,c){var d,f=this.chart,e=this.userOptions,p=a+"Index",h=a+"Counter",l=c?c.length:H(f.options.chart[a+"Count"],f[a+"Count"]);b||(d=H(e[p],e["_"+p]),v(d)||(f.series.length||
|
300
|
+
(f[h]=0),e["_"+p]=d=f[h]%l,f[h]+=1),c&&(b=c[d]));void 0!==d&&(this[p]=d);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||q[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(d,e,h,l){var f=this,p=f.points,g=p&&p.length||0,r,n=f.options,k=f.chart,m=null,q=f.xAxis,
|
301
|
+
E=n.turboThreshold,z=this.xData,y=this.yData,I=(r=f.pointArrayMap)&&r.length;d=d||[];r=d.length;e=H(e,!0);if(!1!==l&&r&&g===r&&!f.cropped&&!f.hasGroupedData&&f.visible)u(d,function(a,b){p[b].update&&a!==n.data[b]&&p[b].update(a,!1,null,!1)});else{f.xIncrement=null;f.colorCounter=0;u(this.parallelArrays,function(a){f[a+"Data"].length=0});if(E&&r>E){for(h=0;null===m&&h<r;)m=d[h],h++;if(w(m))for(h=0;h<r;h++)z[h]=this.autoIncrement(),y[h]=d[h];else if(c(m))if(I)for(h=0;h<r;h++)m=d[h],z[h]=m[0],y[h]=m.slice(1,
|
302
|
+
I+1);else for(h=0;h<r;h++)m=d[h],z[h]=m[0],y[h]=m[1];else a.error(12)}else for(h=0;h<r;h++)void 0!==d[h]&&(m={series:f},f.pointClass.prototype.applyOptions.apply(m,[d[h]]),f.updateParallelArrays(m,h));b(y[0])&&a.error(14,!0);f.data=[];f.options.data=f.userOptions.data=d;for(h=g;h--;)p[h]&&p[h].destroy&&p[h].destroy();q&&(q.minRange=q.userMinRange);f.isDirty=k.isDirtyBox=!0;f.isDirtyData=!!p;h=!1}"point"===n.legendType&&(this.processData(),this.generatePoints());e&&k.redraw(h)},processData:function(b){var c=
|
303
|
+
this.xData,d=this.yData,e=c.length,f;f=0;var h,p,l=this.xAxis,g,r=this.options;g=r.cropThreshold;var n=this.getExtremesFromAll||r.getExtremesFromAll,k=this.isCartesian,r=l&&l.val2lin,m=l&&l.isLog,q,w;if(k&&!this.isDirty&&!l.isDirty&&!this.yAxis.isDirty&&!b)return!1;l&&(b=l.getExtremes(),q=b.min,w=b.max);if(k&&this.sorted&&!n&&(!g||e>g||this.forceCrop))if(c[e-1]<q||c[0]>w)c=[],d=[];else if(c[0]<q||c[e-1]>w)f=this.cropData(this.xData,this.yData,q,w),c=f.xData,d=f.yData,f=f.start,h=!0;for(g=c.length||
|
304
|
+
1;--g;)e=m?r(c[g])-r(c[g-1]):c[g]-c[g-1],0<e&&(void 0===p||e<p)?p=e:0>e&&this.requireSorting&&a.error(15);this.cropped=h;this.cropStart=f;this.processedXData=c;this.processedYData=d;this.closestPointRange=p},cropData:function(a,b,c,d){var f=a.length,e=0,h=f,p=H(this.cropShoulder,1),l;for(l=0;l<f;l++)if(a[l]>=c){e=Math.max(0,l-p);break}for(c=l;c<f;c++)if(a[c]>d){h=c+p;break}return{xData:a.slice(e,h),yData:b.slice(e,h),start:e,end:h}},generatePoints:function(){var a=this.options,b=a.data,c=this.data,
|
305
|
+
d,f=this.processedXData,e=this.processedYData,h=this.pointClass,l=f.length,g=this.cropStart||0,r,n=this.hasGroupedData,a=a.keys,k,m=[],q;c||n||(c=[],c.length=b.length,c=this.data=c);a&&n&&(this.options.keys=!1);for(q=0;q<l;q++)r=g+q,n?(k=(new h).init(this,[f[q]].concat(B(e[q]))),k.dataGroup=this.groupMap[q]):(k=c[r])||void 0===b[r]||(c[r]=k=(new h).init(this,b[r],f[q])),k&&(k.index=r,m[q]=k);this.options.keys=a;if(c&&(l!==(d=c.length)||n))for(q=0;q<d;q++)q!==g||n||(q+=l),c[q]&&(c[q].destroyElements(),
|
306
|
+
c[q].plotX=void 0);this.data=c;this.points=m},getExtremes:function(a){var b=this.yAxis,d=this.processedXData,e,f=[],h=0;e=this.xAxis.getExtremes();var p=e.min,l=e.max,g,r,n,k;a=a||this.stackedYData||this.processedYData||[];e=a.length;for(k=0;k<e;k++)if(r=d[k],n=a[k],g=(w(n,!0)||c(n))&&(!b.positiveValuesOnly||n.length||0<n),r=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(d[k]||r)>=p&&(d[k]||r)<=l,g&&r)if(g=n.length)for(;g--;)null!==n[g]&&(f[h++]=n[g]);else f[h++]=n;this.dataMin=
|
307
|
+
F(f);this.dataMax=G(f)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,f=this.yAxis,e=this.points,h=e.length,l=!!this.modifyValue,g=a.pointPlacement,r="between"===g||w(g),n=a.threshold,k=a.startFromThreshold?n:0,q,z,y,B,u=Number.MAX_VALUE;"between"===g&&(g=.5);w(g)&&(g*=H(a.pointRange||c.pointRange));for(a=0;a<h;a++){var D=e[a],M=D.x,A=D.y;z=D.low;var C=b&&f.stacks[(this.negStacks&&A<(k?0:n)?"-":"")+this.stackKey],
|
308
|
+
F;f.positiveValuesOnly&&null!==A&&0>=A&&(D.isNull=!0);D.plotX=q=m(Math.min(Math.max(-1E5,c.translate(M,0,0,0,1,g,"flags"===this.type)),1E5));b&&this.visible&&!D.isNull&&C&&C[M]&&(B=this.getStackIndicator(B,M,this.index),F=C[M],A=F.points[B.key],z=A[0],A=A[1],z===k&&B.key===C[M].base&&(z=H(n,f.min)),f.positiveValuesOnly&&0>=z&&(z=null),D.total=D.stackTotal=F.total,D.percentage=F.total&&D.y/F.total*100,D.stackY=A,F.setOffset(this.pointXOffset||0,this.barW||0));D.yBottom=v(z)?f.translate(z,0,1,0,1):
|
309
|
+
null;l&&(A=this.modifyValue(A,D));D.plotY=z="number"===typeof A&&Infinity!==A?Math.min(Math.max(-1E5,f.translate(A,0,1,0,1)),1E5):void 0;D.isInside=void 0!==z&&0<=z&&z<=f.len&&0<=q&&q<=c.len;D.clientX=r?m(c.translate(M,0,0,0,1,g)):q;D.negative=D.y<(n||0);D.category=d&&void 0!==d[D.x]?d[D.x]:D.x;D.isNull||(void 0!==y&&(u=Math.min(u,Math.abs(q-y))),y=q);D.zone=this.zones.length&&D.getZone()}this.closestPointRangePx=u},getValidPoints:function(a,b){var c=this.chart;return d(a||this.points||[],function(a){return b&&
|
310
|
+
!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,d=b.renderer,f=b.inverted,e=this.clipBox,h=e||b.clipBox,l=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,h.height,c.xAxis,c.yAxis].join(),g=b[l],p=b[l+"m"];g||(a&&(h.width=0,b[l+"m"]=p=d.clipRect(-99,f?-b.plotLeft:-b.plotTop,99,f?b.chartWidth:b.chartHeight)),b[l]=g=d.clipRect(h),g.count={length:0});a&&!g.count[this.index]&&(g.count[this.index]=!0,g.count.length+=1);!1!==c.clip&&
|
311
|
+
(this.group.clip(a||e?g:b.clipRect),this.markerGroup.clip(p),this.sharedClipKey=l);a||(g.count[this.index]&&(delete g.count[this.index],--g.count.length),0===g.count.length&&l&&b[l]&&(e||(b[l]=b[l].destroy()),b[l+"m"]&&(b[l+"m"]=b[l+"m"].destroy())))},animate:function(a){var b=this.chart,c=A(this.options.animation),d;a?this.setClip(c):(d=this.sharedClipKey,(a=b[d])&&a.animate({width:b.plotSizeX},c),b[d+"m"]&&b[d+"m"].animate({width:b.plotSizeX+99},c),this.animate=null)},afterAnimate:function(){this.setClip();
|
312
|
+
n(this,"afterAnimate")},drawPoints:function(){var a=this.points,b=this.chart,c,d,f,e,h=this.options.marker,l,g,r,n,k=this[this.specialGroup]||this.markerGroup,m=H(h.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*h.radius);if(!1!==h.enabled||this._hasPointMarkers)for(d=0;d<a.length;d++)f=a[d],c=f.plotY,e=f.graphic,l=f.marker||{},g=!!f.marker,r=m&&void 0===l.enabled||l.enabled,n=f.isInside,r&&w(c)&&null!==f.y?(c=H(l.symbol,this.symbol),f.hasImage=0===c.indexOf("url"),r=this.markerAttribs(f,
|
313
|
+
f.selected&&"select"),e?e[n?"show":"hide"](!0).animate(r):n&&(0<r.width||f.hasImage)&&(f.graphic=e=b.renderer.symbol(c,r.x,r.y,r.width,r.height,g?l:h).add(k)),e&&e.attr(this.pointAttribs(f,f.selected&&"select")),e&&e.addClass(f.getClassName(),!0)):e&&(f.graphic=e.destroy())},markerAttribs:function(a,b){var c=this.options.marker,d=a.marker||{},f=H(d.radius,c.radius);b&&(c=c.states[b],b=d.states&&d.states[b],f=H(b&&b.radius,c&&c.radius,f+(c&&c.radiusPlus||0)));a.hasImage&&(f=0);a={x:Math.floor(a.plotX)-
|
314
|
+
f,y:a.plotY-f};f&&(a.width=a.height=2*f);return a},pointAttribs:function(a,b){var c=this.options.marker,d=a&&a.options,f=d&&d.marker||{},e=this.color,h=d&&d.color,l=a&&a.color,d=H(f.lineWidth,c.lineWidth);a=a&&a.zone&&a.zone.color;e=h||a||l||e;a=f.fillColor||c.fillColor||e;e=f.lineColor||c.lineColor||e;b&&(c=c.states[b],b=f.states&&f.states[b]||{},d=H(b.lineWidth,c.lineWidth,d+H(b.lineWidthPlus,c.lineWidthPlus,0)),a=b.fillColor||c.fillColor||a,e=b.lineColor||c.lineColor||e);return{stroke:e,"stroke-width":d,
|
315
|
+
fill:a}},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit\/533/.test(M.navigator.userAgent),d,f,e=a.data||[],g,k;n(a,"destroy");l(a);u(a.axisTypes||[],function(b){(k=a[b])&&k.series&&(h(k.series,a),k.isDirty=k.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(f=e.length;f--;)(g=e[f])&&g.destroy&&g.destroy();a.points=null;clearTimeout(a.animationTimeout);D(a,function(a,b){a instanceof r&&!a.survive&&(d=c&&"group"===b?"hide":"destroy",a[d]())});b.hoverSeries===a&&(b.hoverSeries=
|
316
|
+
null);h(b.series,a);b.orderSeries();D(a,function(b,c){delete a[c]})},getGraphPath:function(a,b,c){var d=this,f=d.options,e=f.step,h,l=[],g=[],p;a=a||d.points;(h=a.reversed)&&a.reverse();(e={right:1,center:2}[e]||e&&3)&&h&&(e=4-e);!f.connectNulls||b||c||(a=this.getValidPoints(a));u(a,function(h,r){var n=h.plotX,k=h.plotY,m=a[r-1];(h.leftCliff||m&&m.rightCliff)&&!c&&(p=!0);h.isNull&&!v(b)&&0<r?p=!f.connectNulls:h.isNull&&!b?p=!0:(0===r||p?r=["M",h.plotX,h.plotY]:d.getPointSpline?r=d.getPointSpline(a,
|
317
|
+
h,r):e?(r=1===e?["L",m.plotX,k]:2===e?["L",(m.plotX+n)/2,m.plotY,"L",(m.plotX+n)/2,k]:["L",n,m.plotY],r.push("L",n,k)):r=["L",n,k],g.push(h.x),e&&g.push(h.x),l.push.apply(l,r),p=!1)});l.xMap=g;return d.graphPath=l},drawGraph:function(){var a=this,b=this.options,c=(this.gappedPath||this.getGraphPath).call(this),d=[["graph","highcharts-graph",b.lineColor||this.color,b.dashStyle]];u(this.zones,function(c,e){d.push(["zone-graph-"+e,"highcharts-graph highcharts-zone-graph-"+e+" "+(c.className||""),c.color||
|
318
|
+
a.color,c.dashStyle||b.dashStyle])});u(d,function(f,d){var e=f[0],h=a[e];h?(h.endX=c.xMap,h.animate({d:c})):c.length&&(a[e]=a.chart.renderer.path(c).addClass(f[1]).attr({zIndex:1}).add(a.group),h={stroke:f[2],"stroke-width":b.lineWidth,fill:a.fillGraph&&a.color||"none"},f[3]?h.dashstyle=f[3]:"square"!==b.linecap&&(h["stroke-linecap"]=h["stroke-linejoin"]="round"),h=a[e].attr(h).shadow(2>d&&b.shadow));h&&(h.startX=c.xMap,h.isArea=c.isArea)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,
|
319
|
+
d=this.zones,f,e,h=this.clips||[],l,g=this.graph,r=this.area,n=Math.max(b.chartWidth,b.chartHeight),k=this[(this.zoneAxis||"y")+"Axis"],m,q,w=b.inverted,z,y,B,v,D=!1;d.length&&(g||r)&&k&&void 0!==k.min&&(q=k.reversed,z=k.horiz,g&&g.hide(),r&&r.hide(),m=k.getExtremes(),u(d,function(d,p){f=q?z?b.plotWidth:0:z?0:k.toPixels(m.min);f=Math.min(Math.max(H(e,f),0),n);e=Math.min(Math.max(Math.round(k.toPixels(H(d.value,m.max),!0)),0),n);D&&(f=e=k.toPixels(m.max));y=Math.abs(f-e);B=Math.min(f,e);v=Math.max(f,
|
320
|
+
e);k.isXAxis?(l={x:w?v:B,y:0,width:y,height:n},z||(l.x=b.plotHeight-l.x)):(l={x:0,y:w?v:B,width:n,height:y},z&&(l.y=b.plotWidth-l.y));w&&c.isVML&&(l=k.isXAxis?{x:0,y:q?B:v,height:l.width,width:b.chartWidth}:{x:l.y-b.plotLeft-b.spacingBox.x,y:0,width:l.height,height:b.chartHeight});h[p]?h[p].animate(l):(h[p]=c.clipRect(l),g&&a["zone-graph-"+p].clip(h[p]),r&&a["zone-area-"+p].clip(h[p]));D=d.value>m.max}),this.clips=h)},invertGroups:function(a){function b(){u(["group","markerGroup"],function(b){c[b]&&
|
321
|
+
(d.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(a))})}var c=this,d=c.chart,f;c.xAxis&&(f=C(d,"resize",b),C(c,"destroy",f),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,d,f){var e=this[a],h=!e;h&&(this[a]=e=this.chart.renderer.g().attr({zIndex:d||.1}).add(f));e.addClass("highcharts-"+b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||""),
|
322
|
+
!0);e.attr({visibility:c})[h?"attr":"animate"](this.getPlotBox());return e},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,d=a.options,f=!!a.animate&&b.renderer.isSVG&&A(d.animation).duration,e=a.visible?"inherit":"hidden",h=d.zIndex,l=a.hasRendered,g=b.seriesGroup,r=b.inverted;c=a.plotGroup("group","series",e,h,g);a.markerGroup=
|
323
|
+
a.plotGroup("markerGroup","markers",e,h,g);f&&a.animate(!0);c.inverted=a.isCartesian?r:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(r);!1===d.clip||a.sharedClipKey||l||c.clip(b.clipRect);f&&a.animate();l||(a.animationTimeout=z(function(){a.afterAnimate()},f));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,
|
324
|
+
c=this.group,d=this.xAxis,f=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:H(d&&d.left,a.plotLeft),translateY:H(f&&f.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,d=this.yAxis,f=this.chart.inverted;return this.searchKDTree({clientX:f?c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:f?d.len-a.chartX+d.pos:a.chartY-d.pos},b)},buildKDTree:function(){function a(c,
|
325
|
+
f,d){var e,h;if(h=c&&c.length)return e=b.kdAxisArray[f%d],c.sort(function(a,b){return a[e]-b[e]}),h=Math.floor(h/2),{point:c[h],left:a(c.slice(0,h),f+1,d),right:a(c.slice(h+1),f+1,d)}}this.buildingKdTree=!0;var b=this,c=-1<b.options.findNearestPointBy.indexOf("y")?2:1;delete b.kdTree;z(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),c,c);b.buildingKdTree=!1},b.options.kdNow?0:1)},searchKDTree:function(a,b){function c(a,b,l,g){var r=b.point,p=d.kdAxisArray[l%g],n,k,m=r;k=v(a[f])&&v(r[f])?
|
326
|
+
Math.pow(a[f]-r[f],2):null;n=v(a[e])&&v(r[e])?Math.pow(a[e]-r[e],2):null;n=(k||0)+(n||0);r.dist=v(n)?Math.sqrt(n):Number.MAX_VALUE;r.distX=v(k)?Math.sqrt(k):Number.MAX_VALUE;p=a[p]-r[p];n=0>p?"left":"right";k=0>p?"right":"left";b[n]&&(n=c(a,b[n],l+1,g),m=n[h]<m[h]?n:r);b[k]&&Math.sqrt(p*p)<m[h]&&(a=c(a,b[k],l+1,g),m=a[h]<m[h]?a:m);return m}var d=this,f=this.kdAxisArray[0],e=this.kdAxisArray[1],h=b?"distX":"dist";b=-1<d.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||
|
327
|
+
this.buildKDTree();if(this.kdTree)return c(a,this.kdTree,b,b)}})})(K);(function(a){function C(a,e,g,d,c){var h=a.chart.inverted;this.axis=a;this.isNegative=g;this.options=e;this.x=d;this.total=null;this.points={};this.stack=c;this.rightCliff=this.leftCliff=0;this.alignOptions={align:e.align||(h?g?"left":"right":"center"),verticalAlign:e.verticalAlign||(h?"middle":g?"bottom":"top"),y:u(e.y,h?4:g?14:-6),x:u(e.x,h?g?-6:6:0)};this.textAlign=e.textAlign||(h?g?"right":"left":"center")}var A=a.Axis,G=a.Chart,
|
328
|
+
F=a.correctFloat,m=a.defined,g=a.destroyObjectProperties,k=a.each,q=a.format,v=a.objectEach,u=a.pick;a=a.Series;C.prototype={destroy:function(){g(this,this.axis)},render:function(a){var e=this.options,h=e.format,h=h?q(h,this):e.formatter.call(this);this.label?this.label.attr({text:h,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(h,null,null,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,e){var h=this.axis,d=
|
329
|
+
h.chart,c=d.inverted,g=h.reversed,g=this.isNegative&&!g||!this.isNegative&&g,b=h.translate(h.usePercentage?100:this.total,0,0,0,1),h=h.translate(0),h=Math.abs(b-h);a=d.xAxis[0].translate(this.x)+a;var k=d.plotHeight,c={x:c?g?b:b-h:a,y:c?k-a-e:g?k-b-h:k-b,width:c?h:e,height:c?e:h};if(e=this.label)e.align(this.alignOptions,null,c),c=e.alignAttr,e[!1===this.options.crop||d.isInsidePlot(c.x,c.y)?"show":"hide"](!0)}};G.prototype.getStacks=function(){var a=this;k(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&
|
330
|
+
(a.oldStacks=a.stacks)});k(a.series,function(e){!e.options.stacking||!0!==e.visible&&!1!==a.options.chart.ignoreHiddenSeries||(e.stackKey=e.type+u(e.options.stack,""))})};A.prototype.buildStacks=function(){var a=this.series,e,g=u(this.options.reversedStacks,!0),d=a.length,c;if(!this.isXAxis){this.usePercentage=!1;for(c=d;c--;)a[g?c:d-c-1].setStackedPoints();for(c=d;c--;)e=a[g?c:d-c-1],e.setStackCliffs&&e.setStackCliffs();if(this.usePercentage)for(c=0;c<d;c++)a[c].setPercentStacks()}};A.prototype.renderStackTotals=
|
331
|
+
function(){var a=this.chart,e=a.renderer,g=this.stacks,d=this.stackTotalGroup;d||(this.stackTotalGroup=d=e.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());d.translate(a.plotLeft,a.plotTop);v(g,function(a){v(a,function(a){a.render(d)})})};A.prototype.resetStacks=function(){var a=this,e=a.stacks;a.isXAxis||v(e,function(e){v(e,function(d,c){d.touched<a.stacksTouched?(d.destroy(),delete e[c]):(d.total=null,d.cum=null)})})};A.prototype.cleanStacks=function(){var a;this.isXAxis||(this.oldStacks&&
|
332
|
+
(a=this.stacks=this.oldStacks),v(a,function(a){v(a,function(a){a.cum=a.total})}))};a.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a=this.processedXData,e=this.processedYData,g=[],d=e.length,c=this.options,k=c.threshold,b=c.startFromThreshold?k:0,q=c.stack,c=c.stacking,v=this.stackKey,H="-"+v,l=this.negStacks,B=this.yAxis,r=B.stacks,z=B.oldStacks,M,p,E,I,A,f,t;B.stacksTouched+=1;for(A=0;A<d;A++)f=a[A],t=e[A],
|
333
|
+
M=this.getStackIndicator(M,f,this.index),I=M.key,E=(p=l&&t<(b?0:k))?H:v,r[E]||(r[E]={}),r[E][f]||(z[E]&&z[E][f]?(r[E][f]=z[E][f],r[E][f].total=null):r[E][f]=new C(B,B.options.stackLabels,p,f,q)),E=r[E][f],null!==t&&(E.points[I]=E.points[this.index]=[u(E.cum,b)],m(E.cum)||(E.base=I),E.touched=B.stacksTouched,0<M.index&&!1===this.singleStacks&&(E.points[I][0]=E.points[this.index+","+f+",0"][0])),"percent"===c?(p=p?v:H,l&&r[p]&&r[p][f]?(p=r[p][f],E.total=p.total=Math.max(p.total,E.total)+Math.abs(t)||
|
334
|
+
0):E.total=F(E.total+(Math.abs(t)||0))):E.total=F(E.total+(t||0)),E.cum=u(E.cum,b)+(t||0),null!==t&&(E.points[I].push(E.cum),g[A]=E.cum);"percent"===c&&(B.usePercentage=!0);this.stackedYData=g;B.oldStacks={}}};a.prototype.setPercentStacks=function(){var a=this,e=a.stackKey,g=a.yAxis.stacks,d=a.processedXData,c;k([e,"-"+e],function(e){for(var b=d.length,h,k;b--;)if(h=d[b],c=a.getStackIndicator(c,h,a.index,e),h=(k=g[e]&&g[e][h])&&k.points[c.key])k=k.total?100/k.total:0,h[0]=F(h[0]*k),h[1]=F(h[1]*k),
|
335
|
+
a.stackedYData[b]=h[1]})};a.prototype.getStackIndicator=function(a,e,g,d){!m(a)||a.x!==e||d&&a.key!==d?a={x:e,index:0,key:d}:a.index++;a.key=[g,e,a.index].join();return a}})(K);(function(a){var C=a.addEvent,A=a.animate,G=a.Axis,F=a.createElement,m=a.css,g=a.defined,k=a.each,q=a.erase,v=a.extend,u=a.fireEvent,h=a.inArray,e=a.isNumber,n=a.isObject,d=a.isArray,c=a.merge,w=a.objectEach,b=a.pick,y=a.Point,D=a.Series,H=a.seriesTypes,l=a.setAnimation,B=a.splat;v(a.Chart.prototype,{addSeries:function(a,c,
|
336
|
+
d){var e,h=this;a&&(c=b(c,!0),u(h,"addSeries",{options:a},function(){e=h.initSeries(a);h.isDirtyLegend=!0;h.linkSeries();c&&h.redraw(d)}));return e},addAxis:function(a,d,e,h){var g=d?"xAxis":"yAxis",l=this.options;a=c(a,{index:this[g].length,isX:d});new G(this,a);l[g]=B(l[g]||{});l[g].push(a);b(e,!0)&&this.redraw(h)},showLoading:function(a){var b=this,c=b.options,d=b.loadingDiv,e=c.loading,h=function(){d&&m(d,{left:b.plotLeft+"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};
|
337
|
+
d||(b.loadingDiv=d=F("div",{className:"highcharts-loading highcharts-loading-hidden"},null,b.container),b.loadingSpan=F("span",{className:"highcharts-loading-inner"},null,d),C(b,"redraw",h));d.className="highcharts-loading";b.loadingSpan.innerHTML=a||c.lang.loading;m(d,v(e.style,{zIndex:10}));m(b.loadingSpan,e.labelStyle);b.loadingShown||(m(d,{opacity:0,display:""}),A(d,{opacity:e.style.opacity||.5},{duration:e.showDuration||0}));b.loadingShown=!0;h()},hideLoading:function(){var a=this.options,b=
|
338
|
+
this.loadingDiv;b&&(b.className="highcharts-loading highcharts-loading-hidden",A(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){m(b,{display:"none"})}}));this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions tooltip".split(" "),
|
339
|
+
update:function(a,d){var l=this,r={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},n=a.chart,m,q;if(n){c(!0,l.options.chart,n);"className"in n&&l.setClassName(n.className);if("inverted"in n||"polar"in n)l.propFromSeries(),m=!0;"alignTicks"in n&&(m=!0);w(n,function(a,b){-1!==h("chart."+b,l.propsRequireUpdateSeries)&&(q=!0);-1!==h(b,l.propsRequireDirtyBox)&&(l.isDirtyBox=!0)});"style"in n&&l.renderer.setStyle(n.style)}a.colors&&(this.options.colors=a.colors);a.plotOptions&&c(!0,this.options.plotOptions,
|
340
|
+
a.plotOptions);w(a,function(a,b){if(l[b]&&"function"===typeof l[b].update)l[b].update(a,!1);else if("function"===typeof l[r[b]])l[r[b]](a);"chart"!==b&&-1!==h(b,l.propsRequireUpdateSeries)&&(q=!0)});k("xAxis yAxis zAxis series colorAxis pane".split(" "),function(b){a[b]&&k(B(a[b]),function(a,c){(c=g(a.id)&&l.get(a.id)||l[b][c])&&c.coll===b&&c.update(a,!1)})});m&&k(l.axes,function(a){a.update({},!1)});q&&k(l.series,function(a){a.update({},!1)});a.loading&&c(!0,l.options.loading,a.loading);m=n&&n.width;
|
341
|
+
n=n&&n.height;e(m)&&m!==l.chartWidth||e(n)&&n!==l.chartHeight?l.setSize(m,n):b(d,!0)&&l.redraw()},setSubtitle:function(a){this.setTitle(void 0,a)}});v(y.prototype,{update:function(a,c,d,e){function h(){l.applyOptions(a);null===l.y&&f&&(l.graphic=f.destroy());n(a,!0)&&(f&&f.element&&a&&a.marker&&a.marker.symbol&&(l.graphic=f.destroy()),a&&a.dataLabels&&l.dataLabel&&(l.dataLabel=l.dataLabel.destroy()));r=l.index;g.updateParallelArrays(l,r);p.data[r]=n(p.data[r],!0)||n(a,!0)?l.options:a;g.isDirty=g.isDirtyData=
|
342
|
+
!0;!g.fixedBox&&g.hasCartesianSeries&&(k.isDirtyBox=!0);"point"===p.legendType&&(k.isDirtyLegend=!0);c&&k.redraw(d)}var l=this,g=l.series,f=l.graphic,r,k=g.chart,p=g.options;c=b(c,!0);!1===e?h():l.firePointEvent("update",{options:a},h)},remove:function(a,b){this.series.removePoint(h(this,this.series.data),a,b)}});v(D.prototype,{addPoint:function(a,c,d,e){var h=this.options,l=this.data,g=this.chart,f=this.xAxis,f=f&&f.hasNames&&f.names,r=h.data,k,p,n=this.xData,m,q;c=b(c,!0);k={series:this};this.pointClass.prototype.applyOptions.apply(k,
|
343
|
+
[a]);q=k.x;m=n.length;if(this.requireSorting&&q<n[m-1])for(p=!0;m&&n[m-1]>q;)m--;this.updateParallelArrays(k,"splice",m,0,0);this.updateParallelArrays(k,m);f&&k.name&&(f[q]=k.name);r.splice(m,0,a);p&&(this.data.splice(m,0,null),this.processData());"point"===h.legendType&&this.generatePoints();d&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(k,"shift"),r.shift()));this.isDirtyData=this.isDirty=!0;c&&g.redraw(e)},removePoint:function(a,c,d){var e=this,h=e.data,g=h[a],k=e.points,
|
344
|
+
f=e.chart,r=function(){k&&k.length===h.length&&k.splice(a,1);h.splice(a,1);e.options.data.splice(a,1);e.updateParallelArrays(g||{series:e},"splice",a,1);g&&g.destroy();e.isDirty=!0;e.isDirtyData=!0;c&&f.redraw()};l(d,f);c=b(c,!0);g?g.firePointEvent("remove",null,r):r()},remove:function(a,c,d){function e(){h.destroy();l.isDirtyLegend=l.isDirtyBox=!0;l.linkSeries();b(a,!0)&&l.redraw(c)}var h=this,l=h.chart;!1!==d?u(h,"remove",null,e):e()},update:function(a,d){var e=this,h=e.chart,l=e.userOptions,g=
|
345
|
+
e.oldType||e.type,r=a.type||l.type||h.options.chart.type,f=H[g].prototype,n=["group","markerGroup","dataLabelsGroup"],m;if(Object.keys&&"data"===Object.keys(a).toString())return this.setData(a.data,d);if(r&&r!==g||void 0!==a.zIndex)n.length=0;k(n,function(a){n[a]=e[a];delete e[a]});a=c(l,{animation:!1,index:e.index,pointStart:e.xData[0]},{data:e.options.data},a);e.remove(!1,null,!1);for(m in f)e[m]=void 0;v(e,H[r||g].prototype);k(n,function(a){e[a]=n[a]});e.init(h,a);e.oldType=g;h.linkSeries();b(d,
|
346
|
+
!0)&&h.redraw(!1)}});v(G.prototype,{update:function(a,d){var e=this.chart;a=e.options[this.coll][this.options.index]=c(this.userOptions,a);this.destroy(!0);this.init(e,v(a,{events:void 0}));e.isDirtyBox=!0;b(d,!0)&&e.redraw()},remove:function(a){for(var c=this.chart,e=this.coll,h=this.series,l=h.length;l--;)h[l]&&h[l].remove(!1);q(c.axes,this);q(c[e],this);d(c.options[e])?c.options[e].splice(this.options.index,1):delete c.options[e];k(c[e],function(a,b){a.options.index=b});this.destroy();c.isDirtyBox=
|
347
|
+
!0;b(a,!0)&&c.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(K);(function(a){var C=a.color,A=a.each,G=a.map,F=a.pick,m=a.Series,g=a.seriesType;g("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var g=[],m=[],v=this.xAxis,u=this.yAxis,h=u.stacks[this.stackKey],e={},n=this.points,d=this.index,c=u.series,w=c.length,b,y=F(u.options.reversedStacks,!0)?1:-1,D;if(this.options.stacking){for(D=
|
348
|
+
0;D<n.length;D++)e[n[D].x]=n[D];a.objectEach(h,function(a,b){null!==a.total&&m.push(b)});m.sort(function(a,b){return a-b});b=G(c,function(){return this.visible});A(m,function(a,c){var l=0,k,n;if(e[a]&&!e[a].isNull)g.push(e[a]),A([-1,1],function(l){var g=1===l?"rightNull":"leftNull",r=0,q=h[m[c+l]];if(q)for(D=d;0<=D&&D<w;)k=q.points[D],k||(D===d?e[a][g]=!0:b[D]&&(n=h[a].points[D])&&(r-=n[1]-n[0])),D+=y;e[a][1===l?"rightCliff":"leftCliff"]=r});else{for(D=d;0<=D&&D<w;){if(k=h[a].points[D]){l=k[1];break}D+=
|
349
|
+
y}l=u.translate(l,0,1,0,1);g.push({isNull:!0,plotX:v.translate(a,0,0,0,1),x:a,plotY:l,yBottom:l})}})}return g},getGraphPath:function(a){var g=m.prototype.getGraphPath,k=this.options,u=k.stacking,h=this.yAxis,e,n,d=[],c=[],w=this.index,b,y=h.stacks[this.stackKey],D=k.threshold,A=h.getThreshold(k.threshold),l,k=k.connectNulls||"percent"===u,B=function(e,l,g){var k=a[e];e=u&&y[k.x].points[w];var n=k[g+"Null"]||0;g=k[g+"Cliff"]||0;var r,m,k=!0;g||n?(r=(n?e[0]:e[1])+g,m=e[0]+g,k=!!n):!u&&a[l]&&a[l].isNull&&
|
350
|
+
(r=m=D);void 0!==r&&(c.push({plotX:b,plotY:null===r?A:h.getThreshold(r),isNull:k,isCliff:!0}),d.push({plotX:b,plotY:null===m?A:h.getThreshold(m),doCurve:!1}))};a=a||this.points;u&&(a=this.getStackPoints());for(e=0;e<a.length;e++)if(n=a[e].isNull,b=F(a[e].rectPlotX,a[e].plotX),l=F(a[e].yBottom,A),!n||k)k||B(e,e-1,"left"),n&&!u&&k||(c.push(a[e]),d.push({x:e,plotX:b,plotY:l})),k||B(e,e+1,"right");e=g.call(this,c,!0,!0);d.reversed=!0;n=g.call(this,d,!0,!0);n.length&&(n[0]="L");n=e.concat(n);g=g.call(this,
|
351
|
+
c,!1,k);n.xMap=e.xMap;this.areaPath=n;return g},drawGraph:function(){this.areaPath=[];m.prototype.drawGraph.apply(this);var a=this,g=this.areaPath,v=this.options,u=[["area","highcharts-area",this.color,v.fillColor]];A(this.zones,function(h,e){u.push(["zone-area-"+e,"highcharts-area highcharts-zone-area-"+e+" "+h.className,h.color||a.color,h.fillColor||v.fillColor])});A(u,function(h){var e=h[0],k=a[e];k?(k.endX=g.xMap,k.animate({d:g})):(k=a[e]=a.chart.renderer.path(g).addClass(h[1]).attr({fill:F(h[3],
|
352
|
+
C(h[2]).setOpacity(F(v.fillOpacity,.75)).get()),zIndex:0}).add(a.group),k.isArea=!0);k.startX=g.xMap;k.shiftUnit=v.step?2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);(function(a){var C=a.pick;a=a.seriesType;a("spline","line",{},{getPointSpline:function(a,G,F){var m=G.plotX,g=G.plotY,k=a[F-1];F=a[F+1];var q,v,u,h;if(k&&!k.isNull&&!1!==k.doCurve&&!G.isCliff&&F&&!F.isNull&&!1!==F.doCurve&&!G.isCliff){a=k.plotY;u=F.plotX;F=F.plotY;var e=0;q=(1.5*m+k.plotX)/2.5;v=(1.5*g+a)/2.5;u=(1.5*
|
353
|
+
m+u)/2.5;h=(1.5*g+F)/2.5;u!==q&&(e=(h-v)*(u-m)/(u-q)+g-h);v+=e;h+=e;v>a&&v>g?(v=Math.max(a,g),h=2*g-v):v<a&&v<g&&(v=Math.min(a,g),h=2*g-v);h>F&&h>g?(h=Math.max(F,g),v=2*g-h):h<F&&h<g&&(h=Math.min(F,g),v=2*g-h);G.rightContX=u;G.rightContY=h}G=["C",C(k.rightContX,k.plotX),C(k.rightContY,k.plotY),C(q,m),C(v,g),m,g];k.rightContX=k.rightContY=null;return G}})})(K);(function(a){var C=a.seriesTypes.area.prototype,A=a.seriesType;A("areaspline","spline",a.defaultPlotOptions.area,{getStackPoints:C.getStackPoints,
|
354
|
+
getGraphPath:C.getGraphPath,setStackCliffs:C.setStackCliffs,drawGraph:C.drawGraph,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);(function(a){var C=a.animObject,A=a.color,G=a.each,F=a.extend,m=a.isNumber,g=a.merge,k=a.pick,q=a.Series,v=a.seriesType,u=a.svg;v("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1,shadow:!1},select:{color:"#cccccc",borderColor:"#000000",shadow:!1}},
|
355
|
+
dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){q.prototype.init.apply(this,arguments);var a=this,e=a.chart;e.hasRendered&&G(e.series,function(e){e.type===a.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var a=this,e=a.options,g=a.xAxis,d=a.yAxis,c=g.reversed,m,b={},q=0;!1===e.grouping?
|
356
|
+
q=1:G(a.chart.series,function(c){var e=c.options,g=c.yAxis,h;c.type!==a.type||!c.visible&&a.chart.options.chart.ignoreHiddenSeries||d.len!==g.len||d.pos!==g.pos||(e.stacking?(m=c.stackKey,void 0===b[m]&&(b[m]=q++),h=b[m]):!1!==e.grouping&&(h=q++),c.columnIndex=h)});var u=Math.min(Math.abs(g.transA)*(g.ordinalSlope||e.pointRange||g.closestPointRange||g.tickInterval||1),g.len),v=u*e.groupPadding,l=(u-2*v)/(q||1),e=Math.min(e.maxPointWidth||g.len,k(e.pointWidth,l*(1-2*e.pointPadding)));a.columnMetrics=
|
357
|
+
{width:e,offset:(l-e)/2+(v+((a.columnIndex||0)+(c?1:0))*l-u/2)*(c?-1:1)};return a.columnMetrics},crispCol:function(a,e,g,d){var c=this.chart,h=this.borderWidth,b=-(h%2?.5:0),h=h%2?.5:1;c.inverted&&c.renderer.isVML&&(h+=1);this.options.crisp&&(g=Math.round(a+g)+b,a=Math.round(a)+b,g-=a);d=Math.round(e+d)+h;b=.5>=Math.abs(e)&&.5<d;e=Math.round(e)+h;d-=e;b&&d&&(--e,d+=1);return{x:a,y:e,width:g,height:d}},translate:function(){var a=this,e=a.chart,g=a.options,d=a.dense=2>a.closestPointRange*a.xAxis.transA,
|
358
|
+
d=a.borderWidth=k(g.borderWidth,d?0:1),c=a.yAxis,m=a.translatedThreshold=c.getThreshold(g.threshold),b=k(g.minPointLength,5),y=a.getColumnMetrics(),u=y.width,v=a.barW=Math.max(u,1+2*d),l=a.pointXOffset=y.offset;e.inverted&&(m-=.5);g.pointPadding&&(v=Math.ceil(v));q.prototype.translate.apply(a);G(a.points,function(d){var g=k(d.yBottom,m),h=999+Math.abs(g),h=Math.min(Math.max(-h,d.plotY),c.len+h),n=d.plotX+l,p=v,q=Math.min(h,g),w,y=Math.max(h,g)-q;Math.abs(y)<b&&b&&(y=b,w=!c.reversed&&!d.negative||
|
359
|
+
c.reversed&&d.negative,q=Math.abs(q-m)>b?g-b:m-(w?b:0));d.barX=n;d.pointWidth=u;d.tooltipPos=e.inverted?[c.len+c.pos-e.plotLeft-h,a.xAxis.len-n-p/2,y]:[n+p/2,h+c.pos-e.plotTop,y];d.shapeType="rect";d.shapeArgs=a.crispCol.apply(a,d.isNull?[n,m,p,0]:[n,q,p,y])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(a,e){var h=this.options,d,c=this.pointAttrToOptions||{};
|
360
|
+
d=c.stroke||"borderColor";var k=c["stroke-width"]||"borderWidth",b=a&&a.color||this.color,m=a[d]||h[d]||this.color||b,q=a[k]||h[k]||this[k]||0,c=h.dashStyle;a&&this.zones.length&&(b=a.getZone(),b=a.options.color||b&&b.color||this.color);e&&(a=g(h.states[e],a.options.states&&a.options.states[e]||{}),e=a.brightness,b=a.color||void 0!==e&&A(b).brighten(a.brightness).get()||b,m=a[d]||m,q=a[k]||q,c=a.dashStyle||c);d={fill:b,stroke:m,"stroke-width":q};h.borderRadius&&(d.r=h.borderRadius);c&&(d.dashstyle=
|
361
|
+
c);return d},drawPoints:function(){var a=this,e=this.chart,k=a.options,d=e.renderer,c=k.animationLimit||250,q;G(a.points,function(b){var h=b.graphic;if(m(b.plotY)&&null!==b.y){q=b.shapeArgs;if(h)h[e.pointCount<c?"animate":"attr"](g(q));else b.graphic=h=d[b.shapeType](q).add(b.group||a.group);h.attr(a.pointAttribs(b,b.selected&&"select")).shadow(k.shadow,null,k.stacking&&!k.borderRadius);h.addClass(b.getClassName(),!0)}else h&&(b.graphic=h.destroy())})},animate:function(a){var e=this,g=this.yAxis,
|
362
|
+
d=e.options,c=this.chart.inverted,h={};u&&(a?(h.scaleY=.001,a=Math.min(g.pos+g.len,Math.max(g.pos,g.toPixels(d.threshold))),c?h.translateX=a-g.len:h.translateY=a,e.group.attr(h)):(h[c?"translateX":"translateY"]=g.pos,e.group.animate(h,F(C(e.options.animation),{step:function(a,c){e.group.attr({scaleY:Math.max(.001,c.pos)})}})),e.animate=null))},remove:function(){var a=this,e=a.chart;e.hasRendered&&G(e.series,function(e){e.type===a.type&&(e.isDirty=!0)});q.prototype.remove.apply(a,arguments)}})})(K);
|
363
|
+
(function(a){a=a.seriesType;a("bar","column",null,{inverted:!0})})(K);(function(a){var C=a.Series;a=a.seriesType;a("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cspan style\x3d"font-size: 0.85em"\x3e {series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,
|
364
|
+
trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&C.prototype.drawGraph.call(this)}})})(K);(function(a){var C=a.pick,A=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,F=this.chart,m=2*(a.slicedOffset||0),g=F.plotWidth-2*m,F=F.plotHeight-2*m,k=a.center,k=[C(k[0],"50%"),C(k[1],"50%"),a.size||"100%",a.innerSize||0],q=Math.min(g,F),v,u;for(v=0;4>v;++v)u=k[v],a=2>v||2===v&&/%$/.test(u),k[v]=A(u,[g,
|
365
|
+
F,q,k[2]][v])+(a?m:0);k[3]>k[2]&&(k[3]=k[2]);return k}}})(K);(function(a){var C=a.addEvent,A=a.defined,G=a.each,F=a.extend,m=a.inArray,g=a.noop,k=a.pick,q=a.Point,v=a.Series,u=a.seriesType,h=a.setAnimation;u("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},
|
366
|
+
borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1,shadow:!1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var e=this,d=e.points,c=e.startAngleRad;a||(G(d,function(a){var b=a.graphic,d=a.shapeArgs;b&&(b.attr({r:a.startR||e.center[3]/2,start:c,end:c}),b.animate({r:d.r,start:d.start,end:d.end},e.options.animation))}),e.animate=null)},
|
367
|
+
updateTotals:function(){var a,g=0,d=this.points,c=d.length,h,b=this.options.ignoreHiddenPoint;for(a=0;a<c;a++)h=d[a],g+=b&&!h.visible?0:h.isNull?0:h.y;this.total=g;for(a=0;a<c;a++)h=d[a],h.percentage=0<g&&(h.visible||!b)?h.y/g*100:0,h.total=g},generatePoints:function(){v.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var e=0,d=this.options,c=d.slicedOffset,g=c+(d.borderWidth||0),b,h,m,q=d.startAngle||0,l=this.startAngleRad=Math.PI/180*(q-90),q=
|
368
|
+
(this.endAngleRad=Math.PI/180*(k(d.endAngle,q+360)-90))-l,u=this.points,r,z=d.dataLabels.distance,d=d.ignoreHiddenPoint,v,p=u.length,E;a||(this.center=a=this.getCenter());this.getX=function(b,c,d){m=Math.asin(Math.min((b-a[1])/(a[2]/2+d.labelDistance),1));return a[0]+(c?-1:1)*Math.cos(m)*(a[2]/2+d.labelDistance)};for(v=0;v<p;v++){E=u[v];E.labelDistance=k(E.options.dataLabels&&E.options.dataLabels.distance,z);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,E.labelDistance);b=l+e*q;if(!d||E.visible)e+=
|
369
|
+
E.percentage/100;h=l+e*q;E.shapeType="arc";E.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1E3*b)/1E3,end:Math.round(1E3*h)/1E3};m=(h+b)/2;m>1.5*Math.PI?m-=2*Math.PI:m<-Math.PI/2&&(m+=2*Math.PI);E.slicedTranslation={translateX:Math.round(Math.cos(m)*c),translateY:Math.round(Math.sin(m)*c)};h=Math.cos(m)*a[2]/2;r=Math.sin(m)*a[2]/2;E.tooltipPos=[a[0]+.7*h,a[1]+.7*r];E.half=m<-Math.PI/2||m>Math.PI/2?1:0;E.angle=m;b=Math.min(g,E.labelDistance/5);E.labelPos=[a[0]+h+Math.cos(m)*E.labelDistance,
|
370
|
+
a[1]+r+Math.sin(m)*E.labelDistance,a[0]+h+Math.cos(m)*b,a[1]+r+Math.sin(m)*b,a[0]+h,a[1]+r,0>E.labelDistance?"center":E.half?"right":"left",m]}},drawGraph:null,drawPoints:function(){var a=this,g=a.chart.renderer,d,c,h,b,k=a.options.shadow;k&&!a.shadowGroup&&(a.shadowGroup=g.g("shadow").add(a.group));G(a.points,function(e){if(!e.isNull){c=e.graphic;b=e.shapeArgs;d=e.getTranslate();var m=e.shadowGroup;k&&!m&&(m=e.shadowGroup=g.g("shadow").add(a.shadowGroup));m&&m.attr(d);h=a.pointAttribs(e,e.selected&&
|
371
|
+
"select");c?c.setRadialReference(a.center).attr(h).animate(F(b,d)):(e.graphic=c=g[e.shapeType](b).setRadialReference(a.center).attr(d).add(a.group),e.visible||c.attr({visibility:"hidden"}),c.attr(h).attr({"stroke-linejoin":"round"}).shadow(k,m));c.addClass(e.getClassName())}})},searchPoint:g,sortByAngle:function(a,g){a.sort(function(a,c){return void 0!==a.angle&&(c.angle-a.angle)*g})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:g},{init:function(){q.prototype.init.apply(this,
|
372
|
+
arguments);var a=this,g;a.name=k(a.name,"Slice");g=function(d){a.slice("select"===d.type)};C(a,"select",g);C(a,"unselect",g);return a},isValid:function(){return a.isNumber(this.y,!0)&&0<=this.y},setVisible:function(a,g){var d=this,c=d.series,e=c.chart,b=c.options.ignoreHiddenPoint;g=k(g,b);a!==d.visible&&(d.visible=d.options.visible=a=void 0===a?!d.visible:a,c.options.data[m(d,c.data)]=d.options,G(["graphic","dataLabel","connector","shadowGroup"],function(b){if(d[b])d[b][a?"show":"hide"](!0)}),d.legendItem&&
|
373
|
+
e.legend.colorizeItem(d,a),a||"hover"!==d.state||d.setState(""),b&&(c.isDirty=!0),g&&e.redraw())},slice:function(a,g,d){var c=this.series;h(d,c.chart);k(g,!0);this.sliced=this.options.sliced=A(a)?a:!this.sliced;c.options.data[m(this,c.data)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var e=this.shapeArgs;return this.sliced||
|
374
|
+
!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+a,e.r+a,{innerR:this.shapeArgs.r,start:e.start,end:e.end})}})})(K);(function(a){var C=a.addEvent,A=a.arrayMax,G=a.defined,F=a.each,m=a.extend,g=a.format,k=a.map,q=a.merge,v=a.noop,u=a.pick,h=a.relativeLength,e=a.Series,n=a.seriesTypes,d=a.stableSort;a.distribute=function(a,e){function b(a,b){return a.target-b.target}var c,g=!0,h=a,l=[],m;m=0;for(c=a.length;c--;)m+=a[c].size;if(m>e){d(a,function(a,b){return(b.rank||0)-(a.rank||0)});
|
375
|
+
for(m=c=0;m<=e;)m+=a[c].size,c++;l=a.splice(c-1,a.length)}d(a,b);for(a=k(a,function(a){return{size:a.size,targets:[a.target]}});g;){for(c=a.length;c--;)g=a[c],m=(Math.min.apply(0,g.targets)+Math.max.apply(0,g.targets))/2,g.pos=Math.min(Math.max(0,m-g.size/2),e-g.size);c=a.length;for(g=!1;c--;)0<c&&a[c-1].pos+a[c-1].size>a[c].pos&&(a[c-1].size+=a[c].size,a[c-1].targets=a[c-1].targets.concat(a[c].targets),a[c-1].pos+a[c-1].size>e&&(a[c-1].pos=e-a[c-1].size),a.splice(c,1),g=!0)}c=0;F(a,function(a){var b=
|
376
|
+
0;F(a.targets,function(){h[c].pos=a.pos+b;b+=h[c].size;c++})});h.push.apply(h,l);d(h,b)};e.prototype.drawDataLabels=function(){var c=this,d=c.options,b=d.dataLabels,e=c.points,h,k,l=c.hasRendered||0,m,r,n=u(b.defer,!!d.animation),v=c.chart.renderer;if(b.enabled||c._hasPointLabels)c.dlProcessOptions&&c.dlProcessOptions(b),r=c.plotGroup("dataLabelsGroup","data-labels",n&&!l?"hidden":"visible",b.zIndex||6),n&&(r.attr({opacity:+l}),l||C(c,"afterAnimate",function(){c.visible&&r.show(!0);r[d.animation?
|
377
|
+
"animate":"attr"]({opacity:1},{duration:200})})),k=b,F(e,function(e){var l,p=e.dataLabel,n,f,t=e.connector,w=!p,z;h=e.dlOptions||e.options&&e.options.dataLabels;if(l=u(h&&h.enabled,k.enabled)&&null!==e.y)b=q(k,h),n=e.getLabelConfig(),m=b.format?g(b.format,n):b.formatter.call(n,b),z=b.style,n=b.rotation,z.color=u(b.color,z.color,c.color,"#000000"),"contrast"===z.color&&(e.contrastColor=v.getContrast(e.color||c.color),z.color=b.inside||0>u(e.labelDistance,b.distance)||d.stacking?e.contrastColor:"#000000"),
|
378
|
+
d.cursor&&(z.cursor=d.cursor),f={fill:b.backgroundColor,stroke:b.borderColor,"stroke-width":b.borderWidth,r:b.borderRadius||0,rotation:n,padding:b.padding,zIndex:1},a.objectEach(f,function(a,b){void 0===a&&delete f[b]});!p||l&&G(m)?l&&G(m)&&(p?f.text=m:(p=e.dataLabel=v[n?"text":"label"](m,0,-9999,b.shape,null,null,b.useHTML,null,"data-label"),p.addClass("highcharts-data-label-color-"+e.colorIndex+" "+(b.className||"")+(b.useHTML?"highcharts-tracker":""))),p.attr(f),p.css(z).shadow(b.shadow),p.added||
|
379
|
+
p.add(r),c.alignDataLabel(e,p,b,null,w)):(e.dataLabel=p=p.destroy(),t&&(e.connector=t.destroy()))})};e.prototype.alignDataLabel=function(a,d,b,e,g){var c=this.chart,h=c.inverted,k=u(a.plotX,-9999),r=u(a.plotY,-9999),n=d.getBBox(),q,p=b.rotation,w=b.align,v=this.visible&&(a.series.forceDL||c.isInsidePlot(k,Math.round(r),h)||e&&c.isInsidePlot(k,h?e.x+1:e.y+e.height-1,h)),y="justify"===u(b.overflow,"justify");if(v&&(q=b.style.fontSize,q=c.renderer.fontMetrics(q,d).b,e=m({x:h?c.plotWidth-r:k,y:Math.round(h?
|
380
|
+
c.plotHeight-k:r),width:0,height:0},e),m(b,{width:n.width,height:n.height}),p?(y=!1,k=c.renderer.rotCorr(q,p),k={x:e.x+b.x+e.width/2+k.x,y:e.y+b.y+{top:0,middle:.5,bottom:1}[b.verticalAlign]*e.height},d[g?"attr":"animate"](k).attr({align:w}),r=(p+720)%360,r=180<r&&360>r,"left"===w?k.y-=r?n.height:0:"center"===w?(k.x-=n.width/2,k.y-=n.height/2):"right"===w&&(k.x-=n.width,k.y-=r?0:n.height)):(d.align(b,null,e),k=d.alignAttr),y?a.isLabelJustified=this.justifyDataLabel(d,b,k,n,e,g):u(b.crop,!0)&&(v=c.isInsidePlot(k.x,
|
381
|
+
k.y)&&c.isInsidePlot(k.x+n.width,k.y+n.height)),b.shape&&!p))d[g?"attr":"animate"]({anchorX:h?c.plotWidth-a.plotY:a.plotX,anchorY:h?c.plotHeight-a.plotX:a.plotY});v||(d.attr({y:-9999}),d.placed=!1)};e.prototype.justifyDataLabel=function(a,d,b,e,g,h){var c=this.chart,k=d.align,m=d.verticalAlign,n,q,p=a.box?0:a.padding||0;n=b.x+p;0>n&&("right"===k?d.align="left":d.x=-n,q=!0);n=b.x+e.width-p;n>c.plotWidth&&("left"===k?d.align="right":d.x=c.plotWidth-n,q=!0);n=b.y+p;0>n&&("bottom"===m?d.verticalAlign=
|
382
|
+
"top":d.y=-n,q=!0);n=b.y+e.height-p;n>c.plotHeight&&("top"===m?d.verticalAlign="bottom":d.y=c.plotHeight-n,q=!0);q&&(a.placed=!h,a.align(d,null,g));return q};n.pie&&(n.pie.prototype.drawDataLabels=function(){var c=this,d=c.data,b,g=c.chart,h=c.options.dataLabels,k=u(h.connectorPadding,10),l=u(h.connectorWidth,1),m=g.plotWidth,r=g.plotHeight,n,q=c.center,p=q[2]/2,v=q[1],C,L,f,t,K=[[],[]],J,N,O,P,x=[0,0,0,0];c.visible&&(h.enabled||c._hasPointLabels)&&(F(d,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&
|
383
|
+
(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),e.prototype.drawDataLabels.apply(c),F(d,function(a){a.dataLabel&&a.visible&&(K[a.half].push(a),a.dataLabel._pos=null)}),F(K,function(d,e){var l,n,u=d.length,w=[],z;if(u)for(c.sortByAngle(d,e-.5),0<c.maxLabelDistance&&(l=Math.max(0,v-p-c.maxLabelDistance),n=Math.min(v+p+c.maxLabelDistance,g.plotHeight),F(d,function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,v-p-a.labelDistance),a.bottom=
|
384
|
+
Math.min(v+p+a.labelDistance,g.plotHeight),z=a.dataLabel.getBBox().height||21,a.positionsIndex=w.push({target:a.labelPos[1]-a.top+z/2,size:z,rank:a.y})-1)}),a.distribute(w,n+z-l)),P=0;P<u;P++)b=d[P],n=b.positionsIndex,f=b.labelPos,C=b.dataLabel,O=!1===b.visible?"hidden":"inherit",l=f[1],w&&G(w[n])?void 0===w[n].pos?O="hidden":(t=w[n].size,N=b.top+w[n].pos):N=l,delete b.positionIndex,J=h.justify?q[0]+(e?-1:1)*(p+b.labelDistance):c.getX(N<b.top+2||N>b.bottom-2?l:N,e,b),C._attr={visibility:O,align:f[6]},
|
385
|
+
C._pos={x:J+h.x+({left:k,right:-k}[f[6]]||0),y:N+h.y-10},f.x=J,f.y=N,L=C.getBBox().width,l=null,J-L<k?(l=Math.round(L-J+k),x[3]=Math.max(l,x[3])):J+L>m-k&&(l=Math.round(J+L-m+k),x[1]=Math.max(l,x[1])),0>N-t/2?x[0]=Math.max(Math.round(-N+t/2),x[0]):N+t/2>r&&(x[2]=Math.max(Math.round(N+t/2-r),x[2])),C.sideOverflow=l}),0===A(x)||this.verifyDataLabelOverflow(x))&&(this.placeDataLabels(),l&&F(this.points,function(a){var b;n=a.connector;if((C=a.dataLabel)&&C._pos&&a.visible&&0<a.labelDistance){O=C._attr.visibility;
|
386
|
+
if(b=!n)a.connector=n=g.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex).add(c.dataLabelsGroup),n.attr({"stroke-width":l,stroke:h.connectorColor||a.color||"#666666"});n[b?"attr":"animate"]({d:c.connectorPath(a.labelPos)});n.attr("visibility",O)}else n&&(a.connector=n.destroy())}))},n.pie.prototype.connectorPath=function(a){var c=a.x,b=a.y;return u(this.options.dataLabels.softConnector,!0)?["M",c+("left"===a[6]?5:-5),b,"C",c,b,2*a[2]-a[4],2*a[3]-a[5],a[2],
|
387
|
+
a[3],"L",a[4],a[5]]:["M",c+("left"===a[6]?5:-5),b,"L",a[2],a[3],"L",a[4],a[5]]},n.pie.prototype.placeDataLabels=function(){F(this.points,function(a){var c=a.dataLabel;c&&a.visible&&((a=c._pos)?(c.sideOverflow&&(c._attr.width=c.getBBox().width-c.sideOverflow,c.css({width:c._attr.width+"px",textOverflow:"ellipsis"}),c.shortened=!0),c.attr(c._attr),c[c.moved?"animate":"attr"](a),c.moved=!0):c&&c.attr({y:-9999}))},this)},n.pie.prototype.alignDataLabel=v,n.pie.prototype.verifyDataLabelOverflow=function(a){var c=
|
388
|
+
this.center,b=this.options,d=b.center,e=b.minSize||80,g,l=null!==b.size;l||(null!==d[0]?g=Math.max(c[2]-Math.max(a[1],a[3]),e):(g=Math.max(c[2]-a[1]-a[3],e),c[0]+=(a[3]-a[1])/2),null!==d[1]?g=Math.max(Math.min(g,c[2]-Math.max(a[0],a[2])),e):(g=Math.max(Math.min(g,c[2]-a[0]-a[2]),e),c[1]+=(a[0]-a[2])/2),g<c[2]?(c[2]=g,c[3]=Math.min(h(b.innerSize||0,g),g),this.translate(c),this.drawDataLabels&&this.drawDataLabels()):l=!0);return l});n.column&&(n.column.prototype.alignDataLabel=function(a,d,b,g,h){var c=
|
389
|
+
this.chart.inverted,l=a.series,k=a.dlBox||a.shapeArgs,m=u(a.below,a.plotY>u(this.translatedThreshold,l.yAxis.len)),n=u(b.inside,!!this.options.stacking);k&&(g=q(k),0>g.y&&(g.height+=g.y,g.y=0),k=g.y+g.height-l.yAxis.len,0<k&&(g.height-=k),c&&(g={x:l.yAxis.len-g.y-g.height,y:l.xAxis.len-g.x-g.width,width:g.height,height:g.width}),n||(c?(g.x+=m?0:g.width,g.width=0):(g.y+=m?g.height:0,g.height=0)));b.align=u(b.align,!c||n?"center":m?"right":"left");b.verticalAlign=u(b.verticalAlign,c||n?"middle":m?"top":
|
390
|
+
"bottom");e.prototype.alignDataLabel.call(this,a,d,b,g,h);a.isLabelJustified&&a.contrastColor&&a.dataLabel.css({color:a.contrastColor})})})(K);(function(a){var C=a.Chart,A=a.each,G=a.pick,F=a.addEvent;C.prototype.callbacks.push(function(a){function g(){var g=[];A(a.series||[],function(a){var k=a.options.dataLabels,m=a.dataLabelCollections||["dataLabel"];(k.enabled||a._hasPointLabels)&&!k.allowOverlap&&a.visible&&A(m,function(h){A(a.points,function(a){a[h]&&(a[h].labelrank=G(a.labelrank,a.shapeArgs&&
|
391
|
+
a.shapeArgs.height),g.push(a[h]))})})});a.hideOverlappingLabels(g)}g();F(a,"redraw",g)});C.prototype.hideOverlappingLabels=function(a){var g=a.length,k,m,v,u,h,e,n,d,c,w=function(a,c,d,e,g,h,k,m){return!(g>a+d||g+k<a||h>c+e||h+m<c)};for(m=0;m<g;m++)if(k=a[m])k.oldOpacity=k.opacity,k.newOpacity=1;a.sort(function(a,c){return(c.labelrank||0)-(a.labelrank||0)});for(m=0;m<g;m++)for(v=a[m],k=m+1;k<g;++k)if(u=a[k],v&&u&&v!==u&&v.placed&&u.placed&&0!==v.newOpacity&&0!==u.newOpacity&&(h=v.alignAttr,e=u.alignAttr,
|
392
|
+
n=v.parentGroup,d=u.parentGroup,c=2*(v.box?0:v.padding),h=w(h.x+n.translateX,h.y+n.translateY,v.width-c,v.height-c,e.x+d.translateX,e.y+d.translateY,u.width-c,u.height-c)))(v.labelrank<u.labelrank?v:u).newOpacity=0;A(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==c&&a.placed&&(c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)),a.isOld=!0)})}})(K);(function(a){var C=a.addEvent,A=a.Chart,G=a.createElement,F=a.css,m=a.defaultOptions,g=
|
393
|
+
a.defaultPlotOptions,k=a.each,q=a.extend,v=a.fireEvent,u=a.hasTouch,h=a.inArray,e=a.isObject,n=a.Legend,d=a.merge,c=a.pick,w=a.Point,b=a.Series,y=a.seriesTypes,D=a.svg,H;H=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart.pointer,c=function(a){var c=b.getPointFromEvent(a);void 0!==c&&(b.isDirectTouch=!0,c.onMouseOver(a))};k(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.div?a.dataLabel.div.point=a:a.dataLabel.element.point=a)});a._hasTracking||
|
394
|
+
(k(a.trackerGroups,function(d){if(a[d]){a[d].addClass("highcharts-tracker").on("mouseover",c).on("mouseout",function(a){b.onTrackerMouseOut(a)});if(u)a[d].on("touchstart",c);a.options.cursor&&a[d].css(F).css({cursor:a.options.cursor})}}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,g=a.chart,h=g.pointer,m=g.renderer,n=g.options.tooltip.snap,f=a.tracker,q,v=function(){if(g.hoverSeries!==a)a.onMouseOver()},w=
|
395
|
+
"rgba(192,192,192,"+(D?.0001:.002)+")";if(e&&!c)for(q=e+1;q--;)"M"===d[q]&&d.splice(q+1,0,d[q+1]-n,d[q+2],"L"),(q&&"M"===d[q]||q===e)&&d.splice(q,0,"L",d[q-2]+n,d[q-1]);f?f.attr({d:d}):a.graph&&(a.tracker=m.path(d).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:w,fill:c?w:"none","stroke-width":a.graph.strokeWidth()+(c?0:2*n),zIndex:2}).add(a.group),k([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",v).on("mouseout",function(a){h.onTrackerMouseOut(a)});
|
396
|
+
b.cursor&&a.css({cursor:b.cursor});if(u)a.on("touchstart",v)}))}};y.column&&(y.column.prototype.drawTracker=H.drawTrackerPoint);y.pie&&(y.pie.prototype.drawTracker=H.drawTrackerPoint);y.scatter&&(y.scatter.prototype.drawTracker=H.drawTrackerPoint);q(n.prototype,{setItemEvents:function(a,b,c){var e=this,g=e.chart.renderer.boxWrapper,h="highcharts-legend-"+(a.series?"point":"series")+"-active";(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");g.addClass(h);b.css(e.options.itemHoverStyle)}).on("mouseout",
|
397
|
+
function(){b.css(d(a.visible?e.itemStyle:e.itemHiddenStyle));g.removeClass(h);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible()};b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):v(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=G("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);C(a.checkbox,"click",function(b){v(a.series||a,"checkboxClick",
|
398
|
+
{checked:b.target.checked,item:a},function(){a.select()})})}});m.legend.itemStyle.cursor="pointer";q(A.prototype,{showResetZoom:function(){var a=this,b=m.lang,c=a.options.chart.resetZoomButton,d=c.theme,e=d.states,g="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,title:b.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(c.position,!1,g)},zoomOut:function(){var a=this;
|
399
|
+
v(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,d=this.pointer,g=!1,h;!a||a.resetSelection?k(this.axes,function(a){b=a.zoom()}):k(a.xAxis.concat(a.yAxis),function(a){var c=a.axis;d[c.isXAxis?"zoomX":"zoomY"]&&(b=c.zoom(a.min,a.max),c.displayBtn&&(g=!0))});h=this.resetZoomButton;g&&!h?this.showResetZoom():!g&&e(h)&&(this.resetZoomButton=h.destroy());b&&this.redraw(c(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,
|
400
|
+
e;d&&k(d,function(a){a.setState()});k("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,g=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",h=c[d],f=(b.pointRange||0)/2,l=b.getExtremes(),k=b.toValue(h-g,!0)+f,f=b.toValue(h+b.len-g,!0)-f,m=f<k,h=m?f:k,k=m?k:f,f=Math.min(l.dataMin,b.toValue(b.toPixels(l.min)-b.minPixelPadding)),m=Math.max(l.dataMax,b.toValue(b.toPixels(l.max)+b.minPixelPadding)),n;n=f-h;0<n&&(k+=n,h=f);n=k-m;0<n&&(k=m,h-=n);b.series.length&&h!==l.min&&k!==l.max&&
|
401
|
+
(b.setExtremes(h,k,!1,!1,{trigger:"pan"}),e=!0);c[d]=g});e&&c.redraw(!1);F(c.container,{cursor:"move"})}});q(w.prototype,{select:function(a,b){var d=this,e=d.series,g=e.chart;a=c(a,!d.selected);d.firePointEvent(a?"select":"unselect",{accumulate:b},function(){d.selected=d.options.selected=a;e.options.data[h(d,e.data)]=d.options;d.setState(a&&"select");b||k(g.getSelectedPoints(),function(a){a.selected&&a!==d&&(a.selected=a.options.selected=!1,e.options.data[h(a,e.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},
|
402
|
+
onMouseOver:function(a){var b=this.series.chart,c=b.pointer;a=a?c.normalize(a):c.getChartCoordinatesFromPoint(this,b.inverted);c.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart;this.firePointEvent("mouseOut");k(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var b=this,c=d(b.series.options.point,b.options).events;b.events=c;a.objectEach(c,function(a,c){C(b,c,a)});this.hasImportedEvents=!0}},setState:function(a,
|
403
|
+
b){var d=Math.floor(this.plotX),e=this.plotY,h=this.series,l=h.options.states[a]||{},k=g[h.type].marker&&h.options.marker,m=k&&!1===k.enabled,n=k&&k.states&&k.states[a]||{},f=!1===n.enabled,t=h.stateMarkerGraphic,u=this.marker||{},v=h.chart,w=h.halo,y,B=k&&h.markerAttribs;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===l.enabled||a&&(f||m&&!1===n.enabled)||a&&u.states&&u.states[a]&&!1===u.states[a].enabled)){B&&(y=h.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+
|
404
|
+
this.state),a&&this.graphic.addClass("highcharts-point-"+a),this.graphic.attr(h.pointAttribs(this,a)),y&&this.graphic.animate(y,c(v.options.chart.animation,n.animation,k.animation)),t&&t.hide();else{if(a&&n){k=u.symbol||h.symbol;t&&t.currentSymbol!==k&&(t=t.destroy());if(t)t[b?"animate":"attr"]({x:y.x,y:y.y});else k&&(h.stateMarkerGraphic=t=v.renderer.symbol(k,y.x,y.y,y.width,y.height).add(h.markerGroup),t.currentSymbol=k);t&&t.attr(h.pointAttribs(this,a))}t&&(t[a&&v.isInsidePlot(d,e,v.inverted)?
|
405
|
+
"show":"hide"](),t.element.point=this)}(d=l.halo)&&d.size?(w||(h.halo=w=v.renderer.path().add((this.graphic||t).parentGroup)),w[b?"animate":"attr"]({d:this.haloPath(d.size)}),w.attr({"class":"highcharts-halo highcharts-color-"+c(this.colorIndex,h.colorIndex)}),w.point=this,w.attr(q({fill:this.color||h.color,"fill-opacity":d.opacity,zIndex:-1},d.attributes))):w&&w.point&&w.point.haloPath&&w.animate({d:w.point.haloPath(0)});this.state=a}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-
|
406
|
+
a,this.plotY-a,2*a,2*a)}});q(b.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&v(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&v(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this,
|
407
|
+
d=b.options,e=b.graph,g=d.states,h=d.lineWidth,d=0;a=a||"";if(b.state!==a&&(k([b.group,b.markerGroup,b.dataLabelsGroup],function(c){c&&(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a,!g[a]||!1!==g[a].enabled)&&(a&&(h=g[a].lineWidth||h+(g[a].lineWidthPlus||0)),e&&!e.dashstyle))for(h={"stroke-width":h},e.animate(h,c(b.chart.options.chart.animation,g[a]&&g[a].animation));b["zone-graph-"+d];)b["zone-graph-"+d].attr(h),d+=1},setVisible:function(a,
|
408
|
+
b){var c=this,d=c.chart,e=c.legendItem,g,h=d.options.chart.ignoreHiddenSeries,l=c.visible;g=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!l:a)?"show":"hide";k(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][g]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&k(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});k(c.linkedSeries,function(b){b.setVisible(a,
|
409
|
+
!1)});h&&(d.isDirtyBox=!0);!1!==b&&d.redraw();v(c,g)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=void 0===a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);v(this,a?"select":"unselect")},drawTracker:H.drawTrackerGraph})})(K);(function(a){var C=a.Chart,A=a.each,G=a.inArray,F=a.isArray,m=a.isObject,g=a.pick,k=a.splat;C.prototype.setResponsive=function(g){var k=this.options.responsive,m=[],h=this.currentResponsive;k&&k.rules&&
|
410
|
+
A(k.rules,function(e){void 0===e._id&&(e._id=a.uniqueKey());this.matchResponsiveRule(e,m,g)},this);var e=a.merge.apply(0,a.map(m,function(e){return a.find(k.rules,function(a){return a._id===e}).chartOptions})),m=m.toString()||void 0;m!==(h&&h.ruleIds)&&(h&&this.update(h.undoOptions,g),m?(this.currentResponsive={ruleIds:m,mergedOptions:e,undoOptions:this.currentOptions(e)},this.update(e,g)):this.currentResponsive=void 0)};C.prototype.matchResponsiveRule=function(a,k){var m=a.condition;(m.callback||
|
411
|
+
function(){return this.chartWidth<=g(m.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=g(m.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=g(m.minWidth,0)&&this.chartHeight>=g(m.minHeight,0)}).call(this)&&k.push(a._id)};C.prototype.currentOptions=function(g){function q(g,e,n,d){var c;a.objectEach(g,function(a,b){if(!d&&-1<G(b,["series","xAxis","yAxis"]))for(g[b]=k(g[b]),n[b]=[],c=0;c<g[b].length;c++)e[b][c]&&(n[b][c]={},q(a[c],e[b][c],n[b][c],d+1));else m(a)?(n[b]=F(a)?[]:{},q(a,e[b]||{},n[b],d+1)):n[b]=
|
412
|
+
e[b]||null})}var u={};q(g,this.options,u,0);return u}})(K);return K});
|
413
|
+
|
414
|
+
/* END highcharts.js*/
|
415
|
+
|
416
|
+
/* BEGIN highcharts-3d.js */
|
417
|
+
|
418
|
+
/*
|
419
|
+
Highcharts JS v5.0.12 (2017-05-24)
|
420
|
+
|
421
|
+
3D features for Highcharts JS
|
422
|
+
|
423
|
+
@license: www.highcharts.com/license
|
424
|
+
*/
|
425
|
+
(function(A){"object"===typeof module&&module.exports?module.exports=A:A(Highcharts)})(function(A){(function(d){var w=d.deg2rad,r=d.pick;d.perspective=function(t,x,y){var m=x.options.chart.options3d,u=y?x.inverted:!1,h=x.plotWidth/2,v=x.plotHeight/2,g=m.depth/2,c=r(m.depth,1)*r(m.viewDistance,0),b=x.scale3d||1,e=w*m.beta*(u?-1:1),m=w*m.alpha*(u?-1:1),a=Math.cos(m),f=Math.cos(-e),k=Math.sin(m),p=Math.sin(-e);y||(h+=x.plotLeft,v+=x.plotTop);return d.map(t,function(e){var d,l;l=(u?e.y:e.x)-h;var n=(u?
|
426
|
+
e.x:e.y)-v,F=(e.z||0)-g;d=f*l-p*F;e=-k*p*l+a*n-f*k*F;l=a*p*l+k*n+a*f*F;n=0<c&&c<Number.POSITIVE_INFINITY?c/(l+g+c):1;d=d*n*b+h;e=e*n*b+v;return{x:u?e:d,y:u?d:e,z:l*b+g}})};d.pointCameraDistance=function(d,x){var t=x.options.chart.options3d,m=x.plotWidth/2;x=x.plotHeight/2;t=r(t.depth,1)*r(t.viewDistance,0)+t.depth;return Math.sqrt(Math.pow(m-d.plotX,2)+Math.pow(x-d.plotY,2)+Math.pow(t-d.plotZ,2))};d.shapeArea=function(d){var t=0,r,m;for(r=0;r<d.length;r++)m=(r+1)%d.length,t+=d[r].x*d[m].y-d[m].x*
|
427
|
+
d[r].y;return t/2};d.shapeArea3d=function(r,x,w){return d.shapeArea(d.perspective(r,x,w))}})(A);(function(d){function w(a,b,e,d,c,f,k,g){var B=[],n=f-c;return f>c&&f-c>Math.PI/2+.0001?(B=B.concat(w(a,b,e,d,c,c+Math.PI/2,k,g)),B=B.concat(w(a,b,e,d,c+Math.PI/2,f,k,g))):f<c&&c-f>Math.PI/2+.0001?(B=B.concat(w(a,b,e,d,c,c-Math.PI/2,k,g)),B=B.concat(w(a,b,e,d,c-Math.PI/2,f,k,g))):["C",a+e*Math.cos(c)-e*l*n*Math.sin(c)+k,b+d*Math.sin(c)+d*l*n*Math.cos(c)+g,a+e*Math.cos(f)+e*l*n*Math.sin(f)+k,b+d*Math.sin(f)-
|
428
|
+
d*l*n*Math.cos(f)+g,a+e*Math.cos(f)+k,b+d*Math.sin(f)+g]}var r=Math.cos,t=Math.PI,x=Math.sin,y=d.animObject,m=d.charts,u=d.color,h=d.defined,v=d.deg2rad,g=d.each,c=d.extend,b=d.inArray,e=d.map,a=d.merge,f=d.perspective,k=d.pick,p=d.SVGElement,z=d.SVGRenderer,q=d.wrap,l=4*(Math.sqrt(2)-1)/3/(t/2);z.prototype.toLinePath=function(a,b){var e=[];g(a,function(a){e.push("L",a.x,a.y)});a.length&&(e[0]="M",b&&e.push("Z"));return e};z.prototype.toLineSegments=function(a){var b=[],e=!0;g(a,function(a){b.push(e?
|
429
|
+
"M":"L",a.x,a.y);e=!e});return b};z.prototype.face3d=function(a){var b=this,e=this.createElement("path");e.vertexes=[];e.insidePlotArea=!1;e.enabled=!0;q(e,"attr",function(a,e){if("object"===typeof e&&(h(e.enabled)||h(e.vertexes)||h(e.insidePlotArea))){this.enabled=k(e.enabled,this.enabled);this.vertexes=k(e.vertexes,this.vertexes);this.insidePlotArea=k(e.insidePlotArea,this.insidePlotArea);delete e.enabled;delete e.vertexes;delete e.insidePlotArea;var c=f(this.vertexes,m[b.chartIndex],this.insidePlotArea),
|
430
|
+
B=b.toLinePath(c,!0),c=d.shapeArea(c),c=this.enabled&&0<c?"visible":"hidden";e.d=B;e.visibility=c}return a.apply(this,[].slice.call(arguments,1))});q(e,"animate",function(a,e){if("object"===typeof e&&(h(e.enabled)||h(e.vertexes)||h(e.insidePlotArea))){this.enabled=k(e.enabled,this.enabled);this.vertexes=k(e.vertexes,this.vertexes);this.insidePlotArea=k(e.insidePlotArea,this.insidePlotArea);delete e.enabled;delete e.vertexes;delete e.insidePlotArea;var c=f(this.vertexes,m[b.chartIndex],this.insidePlotArea),
|
431
|
+
B=b.toLinePath(c,!0),c=d.shapeArea(c),c=this.enabled&&0<c?"visible":"hidden";e.d=B;this.attr("visibility",c)}return a.apply(this,[].slice.call(arguments,1))});return e.attr(a)};z.prototype.polyhedron=function(a){var b=this,e=this.g(),c=e.destroy;e.attr({"stroke-linejoin":"round"});e.faces=[];e.destroy=function(){for(var a=0;a<e.faces.length;a++)e.faces[a].destroy();return c.call(this)};q(e,"attr",function(a,c,d,f,k){if("object"===typeof c&&h(c.faces)){for(;e.faces.length>c.faces.length;)e.faces.pop().destroy();
|
432
|
+
for(;e.faces.length<c.faces.length;)e.faces.push(b.face3d().add(e));for(var g=0;g<c.faces.length;g++)e.faces[g].attr(c.faces[g],null,f,k);delete c.faces}return a.apply(this,[].slice.call(arguments,1))});q(e,"animate",function(a,c,d,f){if(c&&c.faces){for(;e.faces.length>c.faces.length;)e.faces.pop().destroy();for(;e.faces.length<c.faces.length;)e.faces.push(b.face3d().add(e));for(var k=0;k<c.faces.length;k++)e.faces[k].animate(c.faces[k],d,f);delete c.faces}return a.apply(this,[].slice.call(arguments,
|
433
|
+
1))});return e.attr(a)};z.prototype.cuboid=function(a){var e=this.g(),b=e.destroy;a=this.cuboidPath(a);e.attr({"stroke-linejoin":"round"});e.front=this.path(a[0]).attr({"class":"highcharts-3d-front"}).add(e);e.top=this.path(a[1]).attr({"class":"highcharts-3d-top"}).add(e);e.side=this.path(a[2]).attr({"class":"highcharts-3d-side"}).add(e);e.fillSetter=function(a){this.front.attr({fill:a});this.top.attr({fill:u(a).brighten(.1).get()});this.side.attr({fill:u(a).brighten(-.1).get()});this.color=a;return this};
|
434
|
+
e.opacitySetter=function(a){this.front.attr({opacity:a});this.top.attr({opacity:a});this.side.attr({opacity:a});return this};e.attr=function(a,e){if("string"===typeof a&&"undefined"!==typeof e){var b=a;a={};a[b]=e}if(a.shapeArgs||h(a.x))a=this.renderer.cuboidPath(a.shapeArgs||a),this.front.attr({d:a[0]}),this.top.attr({d:a[1]}),this.side.attr({d:a[2]});else return d.SVGElement.prototype.attr.call(this,a);return this};e.animate=function(a,e,b){h(a.x)&&h(a.y)?(a=this.renderer.cuboidPath(a),this.front.animate({d:a[0]},
|
435
|
+
e,b),this.top.animate({d:a[1]},e,b),this.side.animate({d:a[2]},e,b),this.attr({zIndex:-a[3]})):a.opacity?(this.front.animate(a,e,b),this.top.animate(a,e,b),this.side.animate(a,e,b)):p.prototype.animate.call(this,a,e,b);return this};e.destroy=function(){this.front.destroy();this.top.destroy();this.side.destroy();return b.call(this)};e.attr({zIndex:-a[3]});return e};d.SVGRenderer.prototype.cuboidPath=function(a){function b(a){return r[a]}var c=a.x,k=a.y,g=a.z,n=a.height,v=a.width,l=a.depth,p=m[this.chartIndex],
|
436
|
+
q,z,u=p.options.chart.options3d.alpha,h=0,r=[{x:c,y:k,z:g},{x:c+v,y:k,z:g},{x:c+v,y:k+n,z:g},{x:c,y:k+n,z:g},{x:c,y:k+n,z:g+l},{x:c+v,y:k+n,z:g+l},{x:c+v,y:k,z:g+l},{x:c,y:k,z:g+l}],r=f(r,p,a.insidePlotArea);z=function(a,c){var f=[[],-1];a=e(a,b);c=e(c,b);0>d.shapeArea(a)?f=[a,0]:0>d.shapeArea(c)&&(f=[c,1]);return f};q=z([3,2,1,0],[7,6,5,4]);a=q[0];v=q[1];q=z([1,6,7,0],[4,5,2,3]);n=q[0];l=q[1];q=z([1,2,5,6],[0,7,4,3]);z=q[0];q=q[1];1===q?h+=1E4*(1E3-c):q||(h+=1E4*c);h+=10*(!l||0<=u&&180>=u||360>u&&
|
437
|
+
357.5<u?p.plotHeight-k:10+k);1===v?h+=100*g:v||(h+=100*(1E3-g));h=-Math.round(h);return[this.toLinePath(a,!0),this.toLinePath(n,!0),this.toLinePath(z,!0),h]};d.SVGRenderer.prototype.arc3d=function(e){function d(e){var c=!1,f={};e=a(e);for(var d in e)-1!==b(d,l)&&(f[d]=e[d],delete e[d],c=!0);return c?f:!1}var f=this.g(),n=f.renderer,l="x y r innerR start end".split(" ");e=a(e);e.alpha*=v;e.beta*=v;f.top=n.path();f.side1=n.path();f.side2=n.path();f.inn=n.path();f.out=n.path();f.onAdd=function(){var a=
|
438
|
+
f.parentGroup,e=f.attr("class");f.top.add(f);g(["out","inn","side1","side2"],function(b){f[b].addClass(e+" highcharts-3d-side").add(a)})};f.setPaths=function(a){var e=f.renderer.arc3dPath(a),b=100*e.zTop;f.attribs=a;f.top.attr({d:e.top,zIndex:e.zTop});f.inn.attr({d:e.inn,zIndex:e.zInn});f.out.attr({d:e.out,zIndex:e.zOut});f.side1.attr({d:e.side1,zIndex:e.zSide1});f.side2.attr({d:e.side2,zIndex:e.zSide2});f.zIndex=b;f.attr({zIndex:b});a.center&&(f.top.setRadialReference(a.center),delete a.center)};
|
439
|
+
f.setPaths(e);f.fillSetter=function(a){var e=u(a).brighten(-.1).get();this.fill=a;this.side1.attr({fill:e});this.side2.attr({fill:e});this.inn.attr({fill:e});this.out.attr({fill:e});this.top.attr({fill:a});return this};g(["opacity","translateX","translateY","visibility"],function(a){f[a+"Setter"]=function(a,e){f[e]=a;g(["out","inn","side1","side2","top"],function(b){f[b].attr(e,a)})}});q(f,"attr",function(a,e){var b;"object"===typeof e&&(b=d(e))&&(c(f.attribs,b),f.setPaths(f.attribs));return a.apply(this,
|
440
|
+
[].slice.call(arguments,1))});q(f,"animate",function(e,b,c,f){var g,n=this.attribs,v;delete b.center;delete b.z;delete b.depth;delete b.alpha;delete b.beta;v=y(k(c,this.renderer.globalAnimation));v.duration&&(g=d(b),b.dummy=1,g&&(v.step=function(e,b){function c(a){return n[a]+(k(g[a],n[a])-n[a])*b.pos}"dummy"===b.prop&&b.elem.setPaths(a(n,{x:c("x"),y:c("y"),r:c("r"),innerR:c("innerR"),start:c("start"),end:c("end")}))}),c=v);return e.call(this,b,c,f)});f.destroy=function(){this.top.destroy();this.out.destroy();
|
441
|
+
this.inn.destroy();this.side1.destroy();this.side2.destroy();p.prototype.destroy.call(this)};f.hide=function(){this.top.hide();this.out.hide();this.inn.hide();this.side1.hide();this.side2.hide()};f.show=function(){this.top.show();this.out.show();this.inn.show();this.side1.show();this.side2.show()};return f};z.prototype.arc3dPath=function(a){function e(a){a%=2*Math.PI;a>Math.PI&&(a=2*Math.PI-a);return a}var b=a.x,c=a.y,f=a.start,d=a.end-.00001,k=a.r,g=a.innerR,v=a.depth,l=a.alpha,p=a.beta,n=Math.cos(f),
|
442
|
+
q=Math.sin(f);a=Math.cos(d);var h=Math.sin(d),z=k*Math.cos(p),k=k*Math.cos(l),m=g*Math.cos(p),u=g*Math.cos(l),g=v*Math.sin(p),y=v*Math.sin(l),v=["M",b+z*n,c+k*q],v=v.concat(w(b,c,z,k,f,d,0,0)),v=v.concat(["L",b+m*a,c+u*h]),v=v.concat(w(b,c,m,u,d,f,0,0)),v=v.concat(["Z"]),A=0<p?Math.PI/2:0,p=0<l?0:Math.PI/2,A=f>-A?f:d>-A?-A:f,C=d<t-p?d:f<t-p?t-p:d,D=2*t-p,l=["M",b+z*r(A),c+k*x(A)],l=l.concat(w(b,c,z,k,A,C,0,0));d>D&&f<D?(l=l.concat(["L",b+z*r(C)+g,c+k*x(C)+y]),l=l.concat(w(b,c,z,k,C,D,g,y)),l=l.concat(["L",
|
443
|
+
b+z*r(D),c+k*x(D)]),l=l.concat(w(b,c,z,k,D,d,0,0)),l=l.concat(["L",b+z*r(d)+g,c+k*x(d)+y]),l=l.concat(w(b,c,z,k,d,D,g,y)),l=l.concat(["L",b+z*r(D),c+k*x(D)]),l=l.concat(w(b,c,z,k,D,C,0,0))):d>t-p&&f<t-p&&(l=l.concat(["L",b+z*Math.cos(C)+g,c+k*Math.sin(C)+y]),l=l.concat(w(b,c,z,k,C,d,g,y)),l=l.concat(["L",b+z*Math.cos(d),c+k*Math.sin(d)]),l=l.concat(w(b,c,z,k,d,C,0,0)));l=l.concat(["L",b+z*Math.cos(C)+g,c+k*Math.sin(C)+y]);l=l.concat(w(b,c,z,k,C,A,g,y));l=l.concat(["Z"]);p=["M",b+m*n,c+u*q];p=p.concat(w(b,
|
444
|
+
c,m,u,f,d,0,0));p=p.concat(["L",b+m*Math.cos(d)+g,c+u*Math.sin(d)+y]);p=p.concat(w(b,c,m,u,d,f,g,y));p=p.concat(["Z"]);n=["M",b+z*n,c+k*q,"L",b+z*n+g,c+k*q+y,"L",b+m*n+g,c+u*q+y,"L",b+m*n,c+u*q,"Z"];b=["M",b+z*a,c+k*h,"L",b+z*a+g,c+k*h+y,"L",b+m*a+g,c+u*h+y,"L",b+m*a,c+u*h,"Z"];h=Math.atan2(y,-g);c=Math.abs(d+h);a=Math.abs(f+h);f=Math.abs((f+d)/2+h);c=e(c);a=e(a);f=e(f);f*=1E5;d=1E5*a;c*=1E5;return{top:v,zTop:1E5*Math.PI+1,out:l,zOut:Math.max(f,d,c),inn:p,zInn:Math.max(f,d,c),side1:n,zSide1:.99*c,
|
445
|
+
side2:b,zSide2:.99*d}}})(A);(function(d){function w(d,g){var c=d.plotLeft,b=d.plotWidth+c,e=d.plotTop,a=d.plotHeight+e,f=c+d.plotWidth/2,k=e+d.plotHeight/2,p=Number.MAX_VALUE,v=-Number.MAX_VALUE,q=Number.MAX_VALUE,l=-Number.MAX_VALUE,n,h=1;n=[{x:c,y:e,z:0},{x:c,y:e,z:g}];t([0,1],function(a){n.push({x:b,y:n[a].y,z:n[a].z})});t([0,1,2,3],function(e){n.push({x:n[e].x,y:a,z:n[e].z})});n=y(n,d,!1);t(n,function(a){p=Math.min(p,a.x);v=Math.max(v,a.x);q=Math.min(q,a.y);l=Math.max(l,a.y)});c>p&&(h=Math.min(h,
|
446
|
+
1-Math.abs((c+f)/(p+f))%1));b<v&&(h=Math.min(h,(b-f)/(v-f)));e>q&&(h=0>q?Math.min(h,(e+k)/(-q+e+k)):Math.min(h,1-(e+k)/(q+k)%1));a<l&&(h=Math.min(h,Math.abs((a-k)/(l-k))));return h}var r=d.Chart,t=d.each,x=d.merge,y=d.perspective,m=d.pick,u=d.wrap;r.prototype.is3d=function(){return this.options.chart.options3d&&this.options.chart.options3d.enabled};r.prototype.propsRequireDirtyBox.push("chart.options3d");r.prototype.propsRequireUpdateSeries.push("chart.options3d");d.wrap(d.Chart.prototype,"isInsidePlot",
|
447
|
+
function(d){return this.is3d()||d.apply(this,[].slice.call(arguments,1))});var h=d.getOptions();x(!0,h,{chart:{options3d:{enabled:!1,alpha:0,beta:0,depth:100,fitToPlot:!0,viewDistance:25,axisLabelPosition:"default",frame:{visible:"default",size:1,bottom:{},top:{},left:{},right:{},back:{},front:{}}}}});u(r.prototype,"setClassName",function(d){d.apply(this,[].slice.call(arguments,1));this.is3d()&&(this.container.className+=" highcharts-3d-chart")});d.wrap(d.Chart.prototype,"setChartSize",function(d){var g=
|
448
|
+
this.options.chart.options3d;d.apply(this,[].slice.call(arguments,1));if(this.is3d()){var c=this.inverted,b=this.clipBox,e=this.margin;b[c?"y":"x"]=-(e[3]||0);b[c?"x":"y"]=-(e[0]||0);b[c?"height":"width"]=this.chartWidth+(e[3]||0)+(e[1]||0);b[c?"width":"height"]=this.chartHeight+(e[0]||0)+(e[2]||0);this.scale3d=1;!0===g.fitToPlot&&(this.scale3d=w(this,g.depth))}});u(r.prototype,"redraw",function(d){this.is3d()&&(this.isDirtyBox=!0,this.frame3d=this.get3dFrame());d.apply(this,[].slice.call(arguments,
|
449
|
+
1))});u(r.prototype,"render",function(d){this.is3d()&&(this.frame3d=this.get3dFrame());d.apply(this,[].slice.call(arguments,1))});u(r.prototype,"renderSeries",function(d){var g=this.series.length;if(this.is3d())for(;g--;)d=this.series[g],d.translate(),d.render();else d.call(this)});u(r.prototype,"drawChartBox",function(v){if(this.is3d()){var g=this.renderer,c=this.options.chart.options3d,b=this.get3dFrame(),e=this.plotLeft,a=this.plotLeft+this.plotWidth,f=this.plotTop,k=this.plotTop+this.plotHeight,
|
450
|
+
c=c.depth,p=e-(b.left.visible?b.left.size:0),h=a+(b.right.visible?b.right.size:0),q=f-(b.top.visible?b.top.size:0),l=k+(b.bottom.visible?b.bottom.size:0),n=0-(b.front.visible?b.front.size:0),m=c+(b.back.visible?b.back.size:0),u=this.hasRendered?"animate":"attr";this.frame3d=b;this.frameShapes||(this.frameShapes={bottom:g.polyhedron().add(),top:g.polyhedron().add(),left:g.polyhedron().add(),right:g.polyhedron().add(),back:g.polyhedron().add(),front:g.polyhedron().add()});this.frameShapes.bottom[u]({"class":"highcharts-3d-frame highcharts-3d-frame-bottom",
|
451
|
+
zIndex:b.bottom.frontFacing?-1E3:1E3,faces:[{fill:d.color(b.bottom.color).brighten(.1).get(),vertexes:[{x:p,y:l,z:n},{x:h,y:l,z:n},{x:h,y:l,z:m},{x:p,y:l,z:m}],enabled:b.bottom.visible},{fill:d.color(b.bottom.color).brighten(.1).get(),vertexes:[{x:e,y:k,z:c},{x:a,y:k,z:c},{x:a,y:k,z:0},{x:e,y:k,z:0}],enabled:b.bottom.visible},{fill:d.color(b.bottom.color).brighten(-.1).get(),vertexes:[{x:p,y:l,z:n},{x:p,y:l,z:m},{x:e,y:k,z:c},{x:e,y:k,z:0}],enabled:b.bottom.visible&&!b.left.visible},{fill:d.color(b.bottom.color).brighten(-.1).get(),
|
452
|
+
vertexes:[{x:h,y:l,z:m},{x:h,y:l,z:n},{x:a,y:k,z:0},{x:a,y:k,z:c}],enabled:b.bottom.visible&&!b.right.visible},{fill:d.color(b.bottom.color).get(),vertexes:[{x:h,y:l,z:n},{x:p,y:l,z:n},{x:e,y:k,z:0},{x:a,y:k,z:0}],enabled:b.bottom.visible&&!b.front.visible},{fill:d.color(b.bottom.color).get(),vertexes:[{x:p,y:l,z:m},{x:h,y:l,z:m},{x:a,y:k,z:c},{x:e,y:k,z:c}],enabled:b.bottom.visible&&!b.back.visible}]});this.frameShapes.top[u]({"class":"highcharts-3d-frame highcharts-3d-frame-top",zIndex:b.top.frontFacing?
|
453
|
+
-1E3:1E3,faces:[{fill:d.color(b.top.color).brighten(.1).get(),vertexes:[{x:p,y:q,z:m},{x:h,y:q,z:m},{x:h,y:q,z:n},{x:p,y:q,z:n}],enabled:b.top.visible},{fill:d.color(b.top.color).brighten(.1).get(),vertexes:[{x:e,y:f,z:0},{x:a,y:f,z:0},{x:a,y:f,z:c},{x:e,y:f,z:c}],enabled:b.top.visible},{fill:d.color(b.top.color).brighten(-.1).get(),vertexes:[{x:p,y:q,z:m},{x:p,y:q,z:n},{x:e,y:f,z:0},{x:e,y:f,z:c}],enabled:b.top.visible&&!b.left.visible},{fill:d.color(b.top.color).brighten(-.1).get(),vertexes:[{x:h,
|
454
|
+
y:q,z:n},{x:h,y:q,z:m},{x:a,y:f,z:c},{x:a,y:f,z:0}],enabled:b.top.visible&&!b.right.visible},{fill:d.color(b.top.color).get(),vertexes:[{x:p,y:q,z:n},{x:h,y:q,z:n},{x:a,y:f,z:0},{x:e,y:f,z:0}],enabled:b.top.visible&&!b.front.visible},{fill:d.color(b.top.color).get(),vertexes:[{x:h,y:q,z:m},{x:p,y:q,z:m},{x:e,y:f,z:c},{x:a,y:f,z:c}],enabled:b.top.visible&&!b.back.visible}]});this.frameShapes.left[u]({"class":"highcharts-3d-frame highcharts-3d-frame-left",zIndex:b.left.frontFacing?-1E3:1E3,faces:[{fill:d.color(b.left.color).brighten(.1).get(),
|
455
|
+
vertexes:[{x:p,y:l,z:n},{x:e,y:k,z:0},{x:e,y:k,z:c},{x:p,y:l,z:m}],enabled:b.left.visible&&!b.bottom.visible},{fill:d.color(b.left.color).brighten(.1).get(),vertexes:[{x:p,y:q,z:m},{x:e,y:f,z:c},{x:e,y:f,z:0},{x:p,y:q,z:n}],enabled:b.left.visible&&!b.top.visible},{fill:d.color(b.left.color).brighten(-.1).get(),vertexes:[{x:p,y:l,z:m},{x:p,y:q,z:m},{x:p,y:q,z:n},{x:p,y:l,z:n}],enabled:b.left.visible},{fill:d.color(b.left.color).brighten(-.1).get(),vertexes:[{x:e,y:f,z:c},{x:e,y:k,z:c},{x:e,y:k,z:0},
|
456
|
+
{x:e,y:f,z:0}],enabled:b.left.visible},{fill:d.color(b.left.color).get(),vertexes:[{x:p,y:l,z:n},{x:p,y:q,z:n},{x:e,y:f,z:0},{x:e,y:k,z:0}],enabled:b.left.visible&&!b.front.visible},{fill:d.color(b.left.color).get(),vertexes:[{x:p,y:q,z:m},{x:p,y:l,z:m},{x:e,y:k,z:c},{x:e,y:f,z:c}],enabled:b.left.visible&&!b.back.visible}]});this.frameShapes.right[u]({"class":"highcharts-3d-frame highcharts-3d-frame-right",zIndex:b.right.frontFacing?-1E3:1E3,faces:[{fill:d.color(b.right.color).brighten(.1).get(),
|
457
|
+
vertexes:[{x:h,y:l,z:m},{x:a,y:k,z:c},{x:a,y:k,z:0},{x:h,y:l,z:n}],enabled:b.right.visible&&!b.bottom.visible},{fill:d.color(b.right.color).brighten(.1).get(),vertexes:[{x:h,y:q,z:n},{x:a,y:f,z:0},{x:a,y:f,z:c},{x:h,y:q,z:m}],enabled:b.right.visible&&!b.top.visible},{fill:d.color(b.right.color).brighten(-.1).get(),vertexes:[{x:a,y:f,z:0},{x:a,y:k,z:0},{x:a,y:k,z:c},{x:a,y:f,z:c}],enabled:b.right.visible},{fill:d.color(b.right.color).brighten(-.1).get(),vertexes:[{x:h,y:l,z:n},{x:h,y:q,z:n},{x:h,y:q,
|
458
|
+
z:m},{x:h,y:l,z:m}],enabled:b.right.visible},{fill:d.color(b.right.color).get(),vertexes:[{x:h,y:q,z:n},{x:h,y:l,z:n},{x:a,y:k,z:0},{x:a,y:f,z:0}],enabled:b.right.visible&&!b.front.visible},{fill:d.color(b.right.color).get(),vertexes:[{x:h,y:l,z:m},{x:h,y:q,z:m},{x:a,y:f,z:c},{x:a,y:k,z:c}],enabled:b.right.visible&&!b.back.visible}]});this.frameShapes.back[u]({"class":"highcharts-3d-frame highcharts-3d-frame-back",zIndex:b.back.frontFacing?-1E3:1E3,faces:[{fill:d.color(b.back.color).brighten(.1).get(),
|
459
|
+
vertexes:[{x:h,y:l,z:m},{x:p,y:l,z:m},{x:e,y:k,z:c},{x:a,y:k,z:c}],enabled:b.back.visible&&!b.bottom.visible},{fill:d.color(b.back.color).brighten(.1).get(),vertexes:[{x:p,y:q,z:m},{x:h,y:q,z:m},{x:a,y:f,z:c},{x:e,y:f,z:c}],enabled:b.back.visible&&!b.top.visible},{fill:d.color(b.back.color).brighten(-.1).get(),vertexes:[{x:p,y:l,z:m},{x:p,y:q,z:m},{x:e,y:f,z:c},{x:e,y:k,z:c}],enabled:b.back.visible&&!b.left.visible},{fill:d.color(b.back.color).brighten(-.1).get(),vertexes:[{x:h,y:q,z:m},{x:h,y:l,
|
460
|
+
z:m},{x:a,y:k,z:c},{x:a,y:f,z:c}],enabled:b.back.visible&&!b.right.visible},{fill:d.color(b.back.color).get(),vertexes:[{x:e,y:f,z:c},{x:a,y:f,z:c},{x:a,y:k,z:c},{x:e,y:k,z:c}],enabled:b.back.visible},{fill:d.color(b.back.color).get(),vertexes:[{x:p,y:l,z:m},{x:h,y:l,z:m},{x:h,y:q,z:m},{x:p,y:q,z:m}],enabled:b.back.visible}]});this.frameShapes.front[u]({"class":"highcharts-3d-frame highcharts-3d-frame-front",zIndex:b.front.frontFacing?-1E3:1E3,faces:[{fill:d.color(b.front.color).brighten(.1).get(),
|
461
|
+
vertexes:[{x:p,y:l,z:n},{x:h,y:l,z:n},{x:a,y:k,z:0},{x:e,y:k,z:0}],enabled:b.front.visible&&!b.bottom.visible},{fill:d.color(b.front.color).brighten(.1).get(),vertexes:[{x:h,y:q,z:n},{x:p,y:q,z:n},{x:e,y:f,z:0},{x:a,y:f,z:0}],enabled:b.front.visible&&!b.top.visible},{fill:d.color(b.front.color).brighten(-.1).get(),vertexes:[{x:p,y:q,z:n},{x:p,y:l,z:n},{x:e,y:k,z:0},{x:e,y:f,z:0}],enabled:b.front.visible&&!b.left.visible},{fill:d.color(b.front.color).brighten(-.1).get(),vertexes:[{x:h,y:l,z:n},{x:h,
|
462
|
+
y:q,z:n},{x:a,y:f,z:0},{x:a,y:k,z:0}],enabled:b.front.visible&&!b.right.visible},{fill:d.color(b.front.color).get(),vertexes:[{x:a,y:f,z:0},{x:e,y:f,z:0},{x:e,y:k,z:0},{x:a,y:k,z:0}],enabled:b.front.visible},{fill:d.color(b.front.color).get(),vertexes:[{x:h,y:l,z:n},{x:p,y:l,z:n},{x:p,y:q,z:n},{x:h,y:q,z:n}],enabled:b.front.visible}]})}return v.apply(this,[].slice.call(arguments,1))});r.prototype.retrieveStacks=function(d){var g=this.series,c={},b,e=1;t(this.series,function(a){b=m(a.options.stack,
|
463
|
+
d?0:g.length-1-a.index);c[b]?c[b].series.push(a):(c[b]={series:[a],position:e},e++)});c.totalStacks=e+1;return c};r.prototype.get3dFrame=function(){var h=this,g=h.options.chart.options3d,c=g.frame,b=h.plotLeft,e=h.plotLeft+h.plotWidth,a=h.plotTop,f=h.plotTop+h.plotHeight,k=g.depth,p=d.shapeArea3d([{x:b,y:f,z:k},{x:e,y:f,z:k},{x:e,y:f,z:0},{x:b,y:f,z:0}],h),u=d.shapeArea3d([{x:b,y:a,z:0},{x:e,y:a,z:0},{x:e,y:a,z:k},{x:b,y:a,z:k}],h),q=d.shapeArea3d([{x:b,y:a,z:0},{x:b,y:a,z:k},{x:b,y:f,z:k},{x:b,y:f,
|
464
|
+
z:0}],h),l=d.shapeArea3d([{x:e,y:a,z:k},{x:e,y:a,z:0},{x:e,y:f,z:0},{x:e,y:f,z:k}],h),n=d.shapeArea3d([{x:b,y:f,z:0},{x:e,y:f,z:0},{x:e,y:a,z:0},{x:b,y:a,z:0}],h),r=d.shapeArea3d([{x:b,y:a,z:k},{x:e,y:a,z:k},{x:e,y:f,z:k},{x:b,y:f,z:k}],h),x=!1,w=!1,A=!1,G=!1;t([].concat(h.xAxis,h.yAxis,h.zAxis),function(a){a&&(a.horiz?a.opposite?w=!0:x=!0:a.opposite?G=!0:A=!0)});var E=function(a,e,b){for(var c=["size","color","visible"],d={},f=0;f<c.length;f++)for(var k=c[f],g=0;g<a.length;g++)if("object"===typeof a[g]){var h=
|
465
|
+
a[g][k];if(void 0!==h&&null!==h){d[k]=h;break}}a=b;!0===d.visible||!1===d.visible?a=d.visible:"auto"===d.visible&&(a=0<=e);return{size:m(d.size,1),color:m(d.color,"none"),frontFacing:0<e,visible:a}},c={bottom:E([c.bottom,c.top,c],p,x),top:E([c.top,c.bottom,c],u,w),left:E([c.left,c.right,c.side,c],q,A),right:E([c.right,c.left,c.side,c],l,G),back:E([c.back,c.front,c],r,!0),front:E([c.front,c.back,c],n,!1)};"auto"===g.axisLabelPosition?(l=function(a,e){return a.visible!==e.visible||a.visible&&e.visible&&
|
466
|
+
a.frontFacing!==e.frontFacing},g=[],l(c.left,c.front)&&g.push({y:(a+f)/2,x:b,z:0}),l(c.left,c.back)&&g.push({y:(a+f)/2,x:b,z:k}),l(c.right,c.front)&&g.push({y:(a+f)/2,x:e,z:0}),l(c.right,c.back)&&g.push({y:(a+f)/2,x:e,z:k}),p=[],l(c.bottom,c.front)&&p.push({x:(b+e)/2,y:f,z:0}),l(c.bottom,c.back)&&p.push({x:(b+e)/2,y:f,z:k}),u=[],l(c.top,c.front)&&u.push({x:(b+e)/2,y:a,z:0}),l(c.top,c.back)&&u.push({x:(b+e)/2,y:a,z:k}),q=[],l(c.bottom,c.left)&&q.push({z:(0+k)/2,y:f,x:b}),l(c.bottom,c.right)&&q.push({z:(0+
|
467
|
+
k)/2,y:f,x:e}),f=[],l(c.top,c.left)&&f.push({z:(0+k)/2,y:a,x:b}),l(c.top,c.right)&&f.push({z:(0+k)/2,y:a,x:e}),b=function(a,e,b){if(0===a.length)return null;if(1===a.length)return a[0];for(var c=0,d=y(a,h,!1),f=1;f<d.length;f++)b*d[f][e]>b*d[c][e]?c=f:b*d[f][e]===b*d[c][e]&&d[f].z<d[c].z&&(c=f);return a[c]},c.axes={y:{left:b(g,"x",-1),right:b(g,"x",1)},x:{top:b(u,"y",-1),bottom:b(p,"y",1)},z:{top:b(f,"y",-1),bottom:b(q,"y",1)}}):c.axes={y:{left:{x:b,z:0},right:{x:e,z:0}},x:{top:{y:a,z:0},bottom:{y:f,
|
468
|
+
z:0}},z:{top:{x:A?e:b,y:a},bottom:{x:A?e:b,y:f}}};return c}})(A);(function(d){function w(e,a){if(e.chart.is3d()&&"colorAxis"!==e.coll){var b=e.chart,c=b.frame3d,d=b.plotLeft,g=b.plotWidth+d,m=b.plotTop,b=b.plotHeight+m,l=0,n=0;a=e.swapZ({x:a.x,y:a.y,z:0});if(e.isZAxis)if(e.opposite){if(null===c.axes.z.top)return{};n=a.y-m;a.x=c.axes.z.top.x;a.y=c.axes.z.top.y}else{if(null===c.axes.z.bottom)return{};n=a.y-b;a.x=c.axes.z.bottom.x;a.y=c.axes.z.bottom.y}else if(e.horiz)if(e.opposite){if(null===c.axes.x.top)return{};
|
469
|
+
n=a.y-m;a.y=c.axes.x.top.y;a.z=c.axes.x.top.z}else{if(null===c.axes.x.bottom)return{};n=a.y-b;a.y=c.axes.x.bottom.y;a.z=c.axes.x.bottom.z}else if(e.opposite){if(null===c.axes.y.right)return{};l=a.x-g;a.x=c.axes.y.right.x;a.z=c.axes.y.right.z}else{if(null===c.axes.y.left)return{};l=a.x-d;a.x=c.axes.y.left.x;a.z=c.axes.y.left.z}a=h([a],e.chart)[0];a.x+=l;a.y+=n}return a}var r,t=d.Axis,x=d.Chart,y=d.each,m=d.extend,u=d.merge,h=d.perspective,v=d.pick,g=d.splat,c=d.Tick,b=d.wrap;b(t.prototype,"setOptions",
|
470
|
+
function(e,a){e.call(this,a);this.chart.is3d()&&"colorAxis"!==this.coll&&(e=this.options,e.tickWidth=v(e.tickWidth,0),e.gridLineWidth=v(e.gridLineWidth,1))});b(t.prototype,"getPlotLinePath",function(e){var a=e.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d()||"colorAxis"===this.coll||null===a)return a;var b=this.chart,c=b.options.chart.options3d,c=this.isZAxis?b.plotWidth:c.depth,b=b.frame3d,a=[this.swapZ({x:a[1],y:a[2],z:0}),this.swapZ({x:a[1],y:a[2],z:c}),this.swapZ({x:a[4],y:a[5],z:0}),
|
471
|
+
this.swapZ({x:a[4],y:a[5],z:c})],c=[];this.horiz?(this.isZAxis?(b.left.visible&&c.push(a[0],a[2]),b.right.visible&&c.push(a[1],a[3])):(b.front.visible&&c.push(a[0],a[2]),b.back.visible&&c.push(a[1],a[3])),b.top.visible&&c.push(a[0],a[1]),b.bottom.visible&&c.push(a[2],a[3])):(b.front.visible&&c.push(a[0],a[2]),b.back.visible&&c.push(a[1],a[3]),b.left.visible&&c.push(a[0],a[1]),b.right.visible&&c.push(a[2],a[3]));c=h(c,this.chart,!1);return this.chart.renderer.toLineSegments(c)});b(t.prototype,"getLinePath",
|
472
|
+
function(b){return this.chart.is3d()?[]:b.apply(this,[].slice.call(arguments,1))});b(t.prototype,"getPlotBandPath",function(b){if(!this.chart.is3d()||"colorAxis"===this.coll)return b.apply(this,[].slice.call(arguments,1));var a=arguments,e=a[2],c=[],a=this.getPlotLinePath(a[1]),e=this.getPlotLinePath(e);if(a&&e)for(var d=0;d<a.length;d+=6)c.push("M",a[d+1],a[d+2],"L",a[d+4],a[d+5],"L",e[d+4],e[d+5],"L",e[d+1],e[d+2],"Z");return c});b(c.prototype,"getMarkPath",function(b){var a=b.apply(this,[].slice.call(arguments,
|
473
|
+
1)),a=[w(this.axis,{x:a[1],y:a[2],z:0}),w(this.axis,{x:a[4],y:a[5],z:0})];return this.axis.chart.renderer.toLineSegments(a)});b(c.prototype,"getLabelPosition",function(b){var a=b.apply(this,[].slice.call(arguments,1));return w(this.axis,a)});d.wrap(t.prototype,"getTitlePosition",function(b){var a=b.apply(this,[].slice.call(arguments,1));return w(this,a)});b(t.prototype,"drawCrosshair",function(b){var a=arguments;this.chart.is3d()&&a[2]&&(a[2]={plotX:a[2].plotXold||a[2].plotX,plotY:a[2].plotYold||
|
474
|
+
a[2].plotY});b.apply(this,[].slice.call(a,1))});b(t.prototype,"destroy",function(b){y(["backFrame","bottomFrame","sideFrame"],function(a){this[a]&&(this[a]=this[a].destroy())},this);b.apply(this,[].slice.call(arguments,1))});t.prototype.swapZ=function(b,a){return this.isZAxis?(a=a?0:this.chart.plotLeft,{x:a+b.z,y:b.y,z:b.x-a}):b};r=d.ZAxis=function(){this.init.apply(this,arguments)};m(r.prototype,t.prototype);m(r.prototype,{isZAxis:!0,setOptions:function(b){b=u({offset:0,lineWidth:0},b);t.prototype.setOptions.call(this,
|
475
|
+
b);this.coll="zAxis"},setAxisSize:function(){t.prototype.setAxisSize.call(this);this.width=this.len=this.chart.options.chart.options3d.depth;this.right=this.chart.chartWidth-this.width-this.left},getSeriesExtremes:function(){var b=this,a=b.chart;b.hasVisibleSeries=!1;b.dataMin=b.dataMax=b.ignoreMinPadding=b.ignoreMaxPadding=null;b.buildStacks&&b.buildStacks();y(b.series,function(c){if(c.visible||!a.options.chart.ignoreHiddenSeries)b.hasVisibleSeries=!0,c=c.zData,c.length&&(b.dataMin=Math.min(v(b.dataMin,
|
476
|
+
c[0]),Math.min.apply(null,c)),b.dataMax=Math.max(v(b.dataMax,c[0]),Math.max.apply(null,c)))})}});b(x.prototype,"getAxes",function(b){var a=this,c=this.options,c=c.zAxis=g(c.zAxis||{});b.call(this);a.is3d()&&(this.zAxis=[],y(c,function(b,c){b.index=c;b.isX=!0;(new r(a,b)).setScale()}))})})(A);(function(d){function w(d){var g=d.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&(g.stroke=this.options.edgeColor||g.fill,g["stroke-width"]=x(this.options.edgeWidth,1));return g}var r=d.each,t=d.perspective,
|
477
|
+
x=d.pick,y=d.Series,m=d.seriesTypes,u=d.inArray,h=d.svg;d=d.wrap;d(m.column.prototype,"translate",function(d){d.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var g=this,c=g.chart,b=g.options,e=b.depth||25,a=g.borderWidth%2?.5:0;if(c.inverted&&!g.yAxis.reversed||!c.inverted&&g.yAxis.reversed)a*=-1;var f=(b.stacking?b.stack||0:g.index)*(e+(b.groupZPadding||1));!1!==b.grouping&&(f=0);f+=b.groupZPadding||1;r(g.data,function(b){if(null!==b.y){var d=b.shapeArgs,h=b.tooltipPos,k;r([["x","width"],
|
478
|
+
["y","height"]],function(b){k=d[b[0]]-a;if(0>k+d[b[1]]||k>g[b[0]+"Axis"].len)for(var c in d)d[c]=0;0>k&&(d[b[1]]+=d[b[0]],d[b[0]]=0);k+d[b[1]]>g[b[0]+"Axis"].len&&(d[b[1]]=g[b[0]+"Axis"].len-d[b[0]])});b.shapeType="cuboid";d.z=f;d.depth=e;d.insidePlotArea=!0;h=t([{x:h[0],y:h[1],z:f}],c,!0)[0];b.tooltipPos=[h.x,h.y]}});g.z=f}});d(m.column.prototype,"animate",function(d){if(this.chart.is3d()){var g=arguments[1],c=this.yAxis,b=this,e=this.yAxis.reversed;h&&(g?r(b.data,function(a){null!==a.y&&(a.height=
|
479
|
+
a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,e||(a.shapeArgs.y=a.stackY?a.plotY+c.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)))}):(r(b.data,function(a){null!==a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,b.options.animation))}),this.drawDataLabels(),b.animate=null))}else d.apply(this,[].slice.call(arguments,1))});d(m.column.prototype,"plotGroup",function(d,g,c,b,e,a){this.chart.is3d()&&a&&!this[g]&&(this[g]=a,a.attr(this.getPlotBox()),
|
480
|
+
this[g].survive=!0);return d.apply(this,Array.prototype.slice.call(arguments,1))});d(m.column.prototype,"setVisible",function(d,g){var c=this,b;c.chart.is3d()&&r(c.data,function(e){b=(e.visible=e.options.visible=g=void 0===g?!e.visible:g)?"visible":"hidden";c.options.data[u(e,c.data)]=e.options;e.graphic&&e.graphic.attr({visibility:b})});d.apply(this,Array.prototype.slice.call(arguments,1))});d(m.column.prototype,"init",function(d){d.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var g=
|
481
|
+
this.options,c=g.grouping,b=g.stacking,e=x(this.yAxis.options.reversedStacks,!0),a=0;if(void 0===c||c){c=this.chart.retrieveStacks(b);a=g.stack||0;for(b=0;b<c[a].series.length&&c[a].series[b]!==this;b++);a=10*(c.totalStacks-c[a].position)+(e?b:-b);this.xAxis.reversed||(a=10*c.totalStacks-a)}g.zIndex=a}});d(m.column.prototype,"pointAttribs",w);m.columnrange&&(d(m.columnrange.prototype,"pointAttribs",w),m.columnrange.prototype.plotGroup=m.column.prototype.plotGroup,m.columnrange.prototype.setVisible=
|
482
|
+
m.column.prototype.setVisible);d(y.prototype,"alignDataLabel",function(d){if(this.chart.is3d()&&("column"===this.type||"columnrange"===this.type)){var g=arguments[4],c={x:g.x,y:g.y,z:this.z},c=t([c],this.chart,!0)[0];g.x=c.x;g.y=c.y}d.apply(this,[].slice.call(arguments,1))})})(A);(function(d){var w=d.deg2rad,r=d.each,t=d.pick,x=d.seriesTypes,y=d.svg;d=d.wrap;d(x.pie.prototype,"translate",function(d){d.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var m=this,h=m.options,v=h.depth||0,
|
483
|
+
g=m.chart.options.chart.options3d,c=g.alpha,b=g.beta,e=h.stacking?(h.stack||0)*v:m._i*v,e=e+v/2;!1!==h.grouping&&(e=0);r(m.data,function(a){var d=a.shapeArgs;a.shapeType="arc3d";d.z=e;d.depth=.75*v;d.alpha=c;d.beta=b;d.center=m.center;d=(d.end+d.start)/2;a.slicedTranslation={translateX:Math.round(Math.cos(d)*h.slicedOffset*Math.cos(c*w)),translateY:Math.round(Math.sin(d)*h.slicedOffset*Math.cos(c*w))}})}});d(x.pie.prototype.pointClass.prototype,"haloPath",function(d){var m=arguments;return this.series.chart.is3d()?
|
484
|
+
[]:d.call(this,m[1])});d(x.pie.prototype,"pointAttribs",function(d,u,h){d=d.call(this,u,h);h=this.options;this.chart.is3d()&&(d.stroke=h.edgeColor||u.color||this.color,d["stroke-width"]=t(h.edgeWidth,1));return d});d(x.pie.prototype,"drawPoints",function(d){d.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&r(this.points,function(d){var h=d.graphic;if(h)h[d.y&&d.visible?"show":"hide"]()})});d(x.pie.prototype,"drawDataLabels",function(d){if(this.chart.is3d()){var m=this.chart.options.chart.options3d;
|
485
|
+
r(this.data,function(d){var h=d.shapeArgs,g=h.r,c=(h.start+h.end)/2,b=d.labelPos,e=-g*(1-Math.cos((h.alpha||m.alpha)*w))*Math.sin(c),a=g*(Math.cos((h.beta||m.beta)*w)-1)*Math.cos(c);r([0,2,4],function(c){b[c]+=a;b[c+1]+=e})})}d.apply(this,[].slice.call(arguments,1))});d(x.pie.prototype,"addPoint",function(d){d.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&this.update(this.userOptions,!0)});d(x.pie.prototype,"animate",function(d){if(this.chart.is3d()){var m=arguments[1],h=this.options.animation,
|
486
|
+
r=this.center,g=this.group,c=this.markerGroup;y&&(!0===h&&(h={}),m?(g.oldtranslateX=g.translateX,g.oldtranslateY=g.translateY,m={translateX:r[0],translateY:r[1],scaleX:.001,scaleY:.001},g.attr(m),c&&(c.attrSetters=g.attrSetters,c.attr(m))):(m={translateX:g.oldtranslateX,translateY:g.oldtranslateY,scaleX:1,scaleY:1},g.animate(m,h),c&&c.animate(m,h),this.animate=null))}else d.apply(this,[].slice.call(arguments,1))})})(A);(function(d){var w=d.perspective,r=d.pick,t=d.Point,x=d.seriesTypes,y=d.wrap;y(x.scatter.prototype,
|
487
|
+
"translate",function(d){d.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var m=this.chart,h=r(this.zAxis,m.options.zAxis[0]),t=[],g,c,b;for(b=0;b<this.data.length;b++)g=this.data[b],c=h.isLog&&h.val2lin?h.val2lin(g.z):g.z,g.plotZ=h.translate(c),g.isInside=g.isInside?c>=h.min&&c<=h.max:!1,t.push({x:g.plotX,y:g.plotY,z:g.plotZ});m=w(t,m,!0);for(b=0;b<this.data.length;b++)g=this.data[b],h=m[b],g.plotXold=g.plotX,g.plotYold=g.plotY,g.plotZold=g.plotZ,g.plotX=h.x,g.plotY=h.y,g.plotZ=h.z}});
|
488
|
+
y(x.scatter.prototype,"init",function(d,r,h){r.is3d()&&(this.axisTypes=["xAxis","yAxis","zAxis"],this.pointArrayMap=["x","y","z"],this.parallelArrays=["x","y","z"],this.directTouch=!0);d=d.apply(this,[r,h]);this.chart.is3d()&&(this.tooltipOptions.pointFormat=this.userOptions.tooltip?this.userOptions.tooltip.pointFormat||"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3ez: \x3cb\x3e{point.z}\x3c/b\x3e\x3cbr/\x3e":"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3ez: \x3cb\x3e{point.z}\x3c/b\x3e\x3cbr/\x3e");
|
489
|
+
return d});y(x.scatter.prototype,"pointAttribs",function(m,r){var h=m.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&r&&(h.zIndex=d.pointCameraDistance(r,this.chart));return h});y(t.prototype,"applyOptions",function(d){var m=d.apply(this,[].slice.call(arguments,1));this.series.chart.is3d()&&void 0===m.z&&(m.z=0);return m})})(A);(function(d){var w=d.Axis,r=d.SVGRenderer,t=d.VMLRenderer;t&&(d.setOptions({animate:!1}),t.prototype.face3d=r.prototype.face3d,t.prototype.polyhedron=r.prototype.polyhedron,
|
490
|
+
t.prototype.cuboid=r.prototype.cuboid,t.prototype.cuboidPath=r.prototype.cuboidPath,t.prototype.toLinePath=r.prototype.toLinePath,t.prototype.toLineSegments=r.prototype.toLineSegments,t.prototype.createElement3D=r.prototype.createElement3D,t.prototype.arc3d=function(d){d=r.prototype.arc3d.call(this,d);d.css({zIndex:d.zIndex});return d},d.VMLRenderer.prototype.arc3dPath=d.SVGRenderer.prototype.arc3dPath,d.wrap(w.prototype,"render",function(d){d.apply(this,[].slice.call(arguments,1));this.sideFrame&&
|
491
|
+
(this.sideFrame.css({zIndex:0}),this.sideFrame.front.attr({fill:this.sideFrame.color}));this.bottomFrame&&(this.bottomFrame.css({zIndex:1}),this.bottomFrame.front.attr({fill:this.bottomFrame.color}));this.backFrame&&(this.backFrame.css({zIndex:0}),this.backFrame.front.attr({fill:this.backFrame.color}))}))})(A)});
|
492
|
+
|
493
|
+
/* END highcharts-3d.js*/
|
494
|
+
|
495
|
+
/* BEGIN highstock.js */
|
496
|
+
|
497
|
+
/*
|
498
|
+
Highstock JS v5.0.12 (2017-05-24)
|
499
|
+
|
500
|
+
(c) 2009-2016 Torstein Honsi
|
501
|
+
|
502
|
+
License: www.highcharts.com/license
|
503
|
+
*/
|
504
|
+
(function(L,T){"object"===typeof module&&module.exports?module.exports=L.document?T(L):T:L.Highcharts=T(L)})("undefined"!==typeof window?window:this,function(L){L=function(){var a=window,E=a.document,B=a.navigator&&a.navigator.userAgent||"",F=E&&E.createElementNS&&!!E.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,D=/(edge|msie|trident)/i.test(B)&&!window.opera,n=!F,h=/Firefox/.test(B),u=h&&4>parseInt(B.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock",
|
505
|
+
version:"5.0.12",deg2rad:2*Math.PI/360,doc:E,hasBidiBug:u,hasTouch:E&&void 0!==E.documentElement.ontouchstart,isMS:D,isWebKit:/AppleWebKit/.test(B),isFirefox:h,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(B),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:F,vml:n,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){var E=[],B=a.charts,F=a.doc,D=a.win;a.error=function(n,h){n=a.isNumber(n)?"Highcharts error #"+
|
506
|
+
n+": www.highcharts.com/errors/"+n:n;if(h)throw Error(n);D.console&&console.log(n)};a.Fx=function(a,h,u){this.options=h;this.elem=a;this.prop=u};a.Fx.prototype={dSetter:function(){var a=this.paths[0],h=this.paths[1],u=[],r=this.now,x=a.length,t;if(1===r)u=this.toD;else if(x===h.length&&1>r)for(;x--;)t=parseFloat(a[x]),u[x]=isNaN(t)?a[x]:r*parseFloat(h[x]-t)+t;else u=h;this.elem.attr("d",u,null,!0)},update:function(){var a=this.elem,h=this.prop,u=this.now,r=this.options.step;if(this[h+"Setter"])this[h+
|
507
|
+
"Setter"]();else a.attr?a.element&&a.attr(h,u,null,!0):a.style[h]=u+this.unit;r&&r.call(a,u,this)},run:function(a,h,u){var r=this,n=function(a){return n.stopped?!1:r.step(a)},t;this.startTime=+new Date;this.start=a;this.end=h;this.unit=u;this.now=this.start;this.pos=0;n.elem=this.elem;n.prop=this.prop;n()&&1===E.push(n)&&(n.timerId=setInterval(function(){for(t=0;t<E.length;t++)E[t]()||E.splice(t--,1);E.length||clearInterval(n.timerId)},13))},step:function(n){var h=+new Date,u,r=this.options,x=this.elem,
|
508
|
+
t=r.complete,m=r.duration,f=r.curAnim;x.attr&&!x.element?n=!1:n||h>=m+this.startTime?(this.now=this.end,this.pos=1,this.update(),u=f[this.prop]=!0,a.objectEach(f,function(a){!0!==a&&(u=!1)}),u&&t&&t.call(x),n=!1):(this.pos=r.easing((h-this.startTime)/m),this.now=this.start+(this.end-this.start)*this.pos,this.update(),n=!0);return n},initPath:function(n,h,u){function r(a){var c,b;for(A=a.length;A--;)c="M"===a[A]||"L"===a[A],b=/[a-zA-Z]/.test(a[A+3]),c&&b&&a.splice(A+1,0,a[A+1],a[A+2],a[A+1],a[A+2])}
|
509
|
+
function x(a,c){for(;a.length<p;){a[0]=c[p-a.length];var b=a.slice(0,d);[].splice.apply(a,[0,0].concat(b));v&&(b=a.slice(a.length-d),[].splice.apply(a,[a.length,0].concat(b)),A--)}a[0]="M"}function t(a,c){for(var q=(p-a.length)/d;0<q&&q--;)b=a.slice().splice(a.length/H-d,d*H),b[0]=c[p-d-q*d],e&&(b[d-6]=b[d-2],b[d-5]=b[d-1]),[].splice.apply(a,[a.length/H,0].concat(b)),v&&q--}h=h||"";var m,f=n.startX,g=n.endX,e=-1<h.indexOf("C"),d=e?7:3,p,b,A;h=h.split(" ");u=u.slice();var v=n.isArea,H=v?2:1,q;e&&(r(h),
|
510
|
+
r(u));if(f&&g){for(A=0;A<f.length;A++)if(f[A]===g[0]){m=A;break}else if(f[0]===g[g.length-f.length+A]){m=A;q=!0;break}void 0===m&&(h=[])}h.length&&a.isNumber(m)&&(p=u.length+m*H*d,q?(x(h,u),t(u,h)):(x(u,h),t(h,u)));return[h,u]}};a.Fx.prototype.fillSetter=a.Fx.prototype.strokeSetter=function(){this.elem.attr(this.prop,a.color(this.start).tweenTo(a.color(this.end),this.pos),null,!0)};a.extend=function(a,h){var n;a||(a={});for(n in h)a[n]=h[n];return a};a.merge=function(){var n,h=arguments,u,r={},x=
|
511
|
+
function(h,m){"object"!==typeof h&&(h={});a.objectEach(m,function(f,g){!a.isObject(f,!0)||a.isClass(f)||a.isDOMElement(f)?h[g]=m[g]:h[g]=x(h[g]||{},f)});return h};!0===h[0]&&(r=h[1],h=Array.prototype.slice.call(h,2));u=h.length;for(n=0;n<u;n++)r=x(r,h[n]);return r};a.pInt=function(a,h){return parseInt(a,h||10)};a.isString=function(a){return"string"===typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a};a.isObject=function(n,
|
512
|
+
h){return!!n&&"object"===typeof n&&(!h||!a.isArray(n))};a.isDOMElement=function(n){return a.isObject(n)&&"number"===typeof n.nodeType};a.isClass=function(n){var h=n&&n.constructor;return!(!a.isObject(n,!0)||a.isDOMElement(n)||!h||!h.name||"Object"===h.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=function(a,h){for(var n=a.length;n--;)if(a[n]===h){a.splice(n,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(n,h,u){var r;a.isString(h)?a.defined(u)?
|
513
|
+
n.setAttribute(h,u):n&&n.getAttribute&&(r=n.getAttribute(h)):a.defined(h)&&a.isObject(h)&&a.objectEach(h,function(a,h){n.setAttribute(h,a)});return r};a.splat=function(n){return a.isArray(n)?n:[n]};a.syncTimeout=function(a,h,u){if(h)return setTimeout(a,h,u);a.call(0,u)};a.pick=function(){var a=arguments,h,u,r=a.length;for(h=0;h<r;h++)if(u=a[h],void 0!==u&&null!==u)return u};a.css=function(n,h){a.isMS&&!a.svg&&h&&void 0!==h.opacity&&(h.filter="alpha(opacity\x3d"+100*h.opacity+")");a.extend(n.style,
|
514
|
+
h)};a.createElement=function(n,h,u,r,x){n=F.createElement(n);var t=a.css;h&&a.extend(n,h);x&&t(n,{padding:0,border:"none",margin:0});u&&t(n,u);r&&r.appendChild(n);return n};a.extendClass=function(n,h){var u=function(){};u.prototype=new n;a.extend(u.prototype,h);return u};a.pad=function(a,h,u){return Array((h||2)+1-String(a).length).join(u||0)+a};a.relativeLength=function(a,h){return/%$/.test(a)?h*parseFloat(a)/100:parseFloat(a)};a.wrap=function(a,h,u){var r=a[h];a[h]=function(){var a=Array.prototype.slice.call(arguments),
|
515
|
+
h=arguments,m=this;m.proceed=function(){r.apply(m,arguments.length?arguments:h)};a.unshift(r);a=u.apply(this,a);m.proceed=null;return a}};a.getTZOffset=function(n){var h=a.Date;return 6E4*(h.hcGetTimezoneOffset&&h.hcGetTimezoneOffset(n)||h.hcTimezoneOffset||0)};a.dateFormat=function(n,h,u){if(!a.defined(h)||isNaN(h))return a.defaultOptions.lang.invalidDate||"";n=a.pick(n,"%Y-%m-%d %H:%M:%S");var r=a.Date,x=new r(h-a.getTZOffset(h)),t=x[r.hcGetHours](),m=x[r.hcGetDay](),f=x[r.hcGetDate](),g=x[r.hcGetMonth](),
|
516
|
+
e=x[r.hcGetFullYear](),d=a.defaultOptions.lang,p=d.weekdays,b=d.shortWeekdays,A=a.pad,r=a.extend({a:b?b[m]:p[m].substr(0,3),A:p[m],d:A(f),e:A(f,2," "),w:m,b:d.shortMonths[g],B:d.months[g],m:A(g+1),y:e.toString().substr(2,2),Y:e,H:A(t),k:t,I:A(t%12||12),l:t%12||12,M:A(x[r.hcGetMinutes]()),p:12>t?"AM":"PM",P:12>t?"am":"pm",S:A(x.getSeconds()),L:A(Math.round(h%1E3),3)},a.dateFormats);a.objectEach(r,function(a,b){for(;-1!==n.indexOf("%"+b);)n=n.replace("%"+b,"function"===typeof a?a(h):a)});return u?n.substr(0,
|
517
|
+
1).toUpperCase()+n.substr(1):n};a.formatSingle=function(n,h){var u=/\.([0-9])/,r=a.defaultOptions.lang;/f$/.test(n)?(u=(u=n.match(u))?u[1]:-1,null!==h&&(h=a.numberFormat(h,u,r.decimalPoint,-1<n.indexOf(",")?r.thousandsSep:""))):h=a.dateFormat(n,h);return h};a.format=function(n,h){for(var u="{",r=!1,x,t,m,f,g=[],e;n;){u=n.indexOf(u);if(-1===u)break;x=n.slice(0,u);if(r){x=x.split(":");t=x.shift().split(".");f=t.length;e=h;for(m=0;m<f;m++)e=e[t[m]];x.length&&(e=a.formatSingle(x.join(":"),e));g.push(e)}else g.push(x);
|
518
|
+
n=n.slice(u+1);u=(r=!r)?"}":"{"}g.push(n);return g.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(n,h,u,r,x){var t,m=n;u=a.pick(u,1);t=n/u;h||(h=x?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===r&&(1===u?h=a.grep(h,function(a){return 0===a%1}):.1>=u&&(h=[1/u])));for(r=0;r<h.length&&!(m=h[r],x&&m*u>=n||!x&&t<=(h[r]+(h[r+1]||h[r]))/2);r++);return m=a.correctFloat(m*u,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=
|
519
|
+
function(a,h){var n=a.length,r,x;for(x=0;x<n;x++)a[x].safeI=x;a.sort(function(a,m){r=h(a,m);return 0===r?a.safeI-m.safeI:r});for(x=0;x<n;x++)delete a[x].safeI};a.arrayMin=function(a){for(var h=a.length,n=a[0];h--;)a[h]<n&&(n=a[h]);return n};a.arrayMax=function(a){for(var h=a.length,n=a[0];h--;)a[h]>n&&(n=a[h]);return n};a.destroyObjectProperties=function(n,h){a.objectEach(n,function(a,r){a&&a!==h&&a.destroy&&a.destroy();delete n[r]})};a.discardElement=function(n){var h=a.garbageBin;h||(h=a.createElement("div"));
|
520
|
+
n&&h.appendChild(n);h.innerHTML=""};a.correctFloat=function(a,h){return parseFloat(a.toPrecision(h||14))};a.setAnimation=function(n,h){h.renderer.globalAnimation=a.pick(n,h.options.chart.animation,!0)};a.animObject=function(n){return a.isObject(n)?a.merge(n):{duration:n?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(n,h,u,r){n=+n||0;h=+h;var x=a.defaultOptions.lang,t=(n.toString().split(".")[1]||"").length,
|
521
|
+
m,f;-1===h?h=Math.min(t,20):a.isNumber(h)||(h=2);f=(Math.abs(n)+Math.pow(10,-Math.max(h,t)-1)).toFixed(h);t=String(a.pInt(f));m=3<t.length?t.length%3:0;u=a.pick(u,x.decimalPoint);r=a.pick(r,x.thousandsSep);n=(0>n?"-":"")+(m?t.substr(0,m)+r:"");n+=t.substr(m).replace(/(\d{3})(?=\d)/g,"$1"+r);h&&(n+=u+f.slice(-h));return n};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(n,h,u){if("width"===h)return Math.min(n.offsetWidth,n.scrollWidth)-a.getStyle(n,"padding-left")-
|
522
|
+
a.getStyle(n,"padding-right");if("height"===h)return Math.min(n.offsetHeight,n.scrollHeight)-a.getStyle(n,"padding-top")-a.getStyle(n,"padding-bottom");if(n=D.getComputedStyle(n,void 0))n=n.getPropertyValue(h),a.pick(u,!0)&&(n=a.pInt(n));return n};a.inArray=function(a,h){return h.indexOf?h.indexOf(a):[].indexOf.call(h,a)};a.grep=function(a,h){return[].filter.call(a,h)};a.find=function(a,h){return[].find.call(a,h)};a.map=function(a,h){for(var n=[],r=0,x=a.length;r<x;r++)n[r]=h.call(a[r],a[r],r,a);
|
523
|
+
return n};a.offset=function(a){var h=F.documentElement;a=a.getBoundingClientRect();return{top:a.top+(D.pageYOffset||h.scrollTop)-(h.clientTop||0),left:a.left+(D.pageXOffset||h.scrollLeft)-(h.clientLeft||0)}};a.stop=function(a,h){for(var n=E.length;n--;)E[n].elem!==a||h&&h!==E[n].prop||(E[n].stopped=!0)};a.each=function(a,h,u){return Array.prototype.forEach.call(a,h,u)};a.objectEach=function(a,h,u){for(var r in a)a.hasOwnProperty(r)&&h.call(u,a[r],r,a)};a.addEvent=function(n,h,u){function r(a){a.target=
|
524
|
+
a.srcElement||D;u.call(n,a)}var x=n.hcEvents=n.hcEvents||{};n.addEventListener?n.addEventListener(h,u,!1):n.attachEvent&&(n.hcEventsIE||(n.hcEventsIE={}),n.hcEventsIE[u.toString()]=r,n.attachEvent("on"+h,r));x[h]||(x[h]=[]);x[h].push(u);return function(){a.removeEvent(n,h,u)}};a.removeEvent=function(n,h,u){function r(a,e){n.removeEventListener?n.removeEventListener(a,e,!1):n.attachEvent&&(e=n.hcEventsIE[e.toString()],n.detachEvent("on"+a,e))}function x(){var f,e;n.nodeName&&(h?(f={},f[h]=!0):f=m,
|
525
|
+
a.objectEach(f,function(a,f){if(m[f])for(e=m[f].length;e--;)r(f,m[f][e])}))}var t,m=n.hcEvents,f;m&&(h?(t=m[h]||[],u?(f=a.inArray(u,t),-1<f&&(t.splice(f,1),m[h]=t),r(h,u)):(x(),m[h]=[])):(x(),n.hcEvents={}))};a.fireEvent=function(n,h,u,r){var x;x=n.hcEvents;var t,m;u=u||{};if(F.createEvent&&(n.dispatchEvent||n.fireEvent))x=F.createEvent("Events"),x.initEvent(h,!0,!0),a.extend(x,u),n.dispatchEvent?n.dispatchEvent(x):n.fireEvent(h,x);else if(x)for(x=x[h]||[],t=x.length,u.target||a.extend(u,{preventDefault:function(){u.defaultPrevented=
|
526
|
+
!0},target:n,type:h}),h=0;h<t;h++)(m=x[h])&&!1===m.call(n,u)&&u.preventDefault();r&&!u.defaultPrevented&&r(u)};a.animate=function(n,h,u){var r,x="",t,m,f;a.isObject(u)||(f=arguments,u={duration:f[2],easing:f[3],complete:f[4]});a.isNumber(u.duration)||(u.duration=400);u.easing="function"===typeof u.easing?u.easing:Math[u.easing]||Math.easeInOutSine;u.curAnim=a.merge(h);a.objectEach(h,function(f,e){a.stop(n,e);m=new a.Fx(n,u,e);t=null;"d"===e?(m.paths=m.initPath(n,n.d,h.d),m.toD=h.d,r=0,t=1):n.attr?
|
527
|
+
r=n.attr(e):(r=parseFloat(a.getStyle(n,e))||0,"opacity"!==e&&(x="px"));t||(t=f);t&&t.match&&t.match("px")&&(t=t.replace(/px/g,""));m.run(r,t,x)})};a.seriesType=function(n,h,u,r,x){var t=a.getOptions(),m=a.seriesTypes;if(m[n])return a.error(27);t.plotOptions[n]=a.merge(t.plotOptions[h],u);m[n]=a.extendClass(m[h]||function(){},r);m[n].prototype.type=n;x&&(m[n].prototype.pointClass=a.extendClass(a.Point,x));return m[n]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),h=0;return function(){return"highcharts-"+
|
528
|
+
a+"-"+h++}}();D.jQuery&&(D.jQuery.fn.highcharts=function(){var n=[].slice.call(arguments);if(this[0])return n[0]?(new (a[a.isString(n[0])?n.shift():"Chart"])(this[0],n[0],n[1]),this):B[a.attr(this[0],"data-highcharts-chart")]});F&&!F.defaultView&&(a.getStyle=function(n,h){var u={width:"clientWidth",height:"clientHeight"}[h];if(n.style[h])return a.pInt(n.style[h]);"opacity"===h&&(h="filter");if(u)return n.style.zoom=1,Math.max(n[u]-2*a.getStyle(n,"padding"),0);n=n.currentStyle[h.replace(/\-(\w)/g,
|
529
|
+
function(a,h){return h.toUpperCase()})];"filter"===h&&(n=n.replace(/alpha\(opacity=([0-9]+)\)/,function(a,h){return h/100}));return""===n?1:a.pInt(n)});Array.prototype.forEach||(a.each=function(a,h,u){for(var r=0,n=a.length;r<n;r++)if(!1===h.call(u,a[r],r,a))return r});Array.prototype.indexOf||(a.inArray=function(a,h){var n,r=0;if(h)for(n=h.length;r<n;r++)if(h[r]===a)return r;return-1});Array.prototype.filter||(a.grep=function(a,h){for(var n=[],r=0,x=a.length;r<x;r++)h(a[r],r)&&n.push(a[r]);return n});
|
530
|
+
Array.prototype.find||(a.find=function(a,h){var n,r=a.length;for(n=0;n<r;n++)if(h(a[n],n))return a[n]})})(L);(function(a){var E=a.each,B=a.isNumber,F=a.map,D=a.merge,n=a.pInt;a.Color=function(h){if(!(this instanceof a.Color))return new a.Color(h);this.init(h)};a.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(a){return[n(a[1]),n(a[2]),n(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,
|
531
|
+
parse:function(a){return[n(a[1]),n(a[2]),n(a[3]),1]}}],names:{none:"rgba(255,255,255,0)",white:"#ffffff",black:"#000000"},init:function(h){var n,r,x,t;if((this.input=h=this.names[h&&h.toLowerCase?h.toLowerCase():""]||h)&&h.stops)this.stops=F(h.stops,function(m){return new a.Color(m[1])});else if(h&&"#"===h[0]&&(n=h.length,h=parseInt(h.substr(1),16),7===n?r=[(h&16711680)>>16,(h&65280)>>8,h&255,1]:4===n&&(r=[(h&3840)>>4|(h&3840)>>8,(h&240)>>4|h&240,(h&15)<<4|h&15,1])),!r)for(x=this.parsers.length;x--&&
|
532
|
+
!r;)t=this.parsers[x],(n=t.regex.exec(h))&&(r=t.parse(n));this.rgba=r||[]},get:function(a){var h=this.input,r=this.rgba,n;this.stops?(n=D(h),n.stops=[].concat(n.stops),E(this.stops,function(h,m){n.stops[m]=[n.stops[m][0],h.get(a)]})):n=r&&B(r[0])?"rgb"===a||!a&&1===r[3]?"rgb("+r[0]+","+r[1]+","+r[2]+")":"a"===a?r[3]:"rgba("+r.join(",")+")":h;return n},brighten:function(a){var h,r=this.rgba;if(this.stops)E(this.stops,function(h){h.brighten(a)});else if(B(a)&&0!==a)for(h=0;3>h;h++)r[h]+=n(255*a),0>
|
533
|
+
r[h]&&(r[h]=0),255<r[h]&&(r[h]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,n){var h,x;a.rgba.length?(h=this.rgba,a=a.rgba,x=1!==a[3]||1!==h[3],a=(x?"rgba(":"rgb(")+Math.round(a[0]+(h[0]-a[0])*(1-n))+","+Math.round(a[1]+(h[1]-a[1])*(1-n))+","+Math.round(a[2]+(h[2]-a[2])*(1-n))+(x?","+(a[3]+(h[3]-a[3])*(1-n)):"")+")"):a=a.input||"none";return a}};a.color=function(h){return new a.Color(h)}})(L);(function(a){var E,B,F=a.addEvent,D=a.animate,n=a.attr,h=a.charts,
|
534
|
+
u=a.color,r=a.css,x=a.createElement,t=a.defined,m=a.deg2rad,f=a.destroyObjectProperties,g=a.doc,e=a.each,d=a.extend,p=a.erase,b=a.grep,A=a.hasTouch,v=a.inArray,H=a.isArray,q=a.isFirefox,J=a.isMS,c=a.isObject,w=a.isString,K=a.isWebKit,y=a.merge,G=a.noop,l=a.objectEach,I=a.pick,k=a.pInt,z=a.removeEvent,Q=a.stop,M=a.svg,N=a.SVG_NS,P=a.symbolSizes,O=a.win;E=a.SVGElement=function(){return this};d(E.prototype,{opacity:1,SVG_NS:N,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),
|
535
|
+
init:function(a,k){this.element="span"===k?x(k):g.createElementNS(this.SVG_NS,k);this.renderer=a},animate:function(C,k,c){k=a.animObject(I(k,this.renderer.globalAnimation,!0));0!==k.duration?(c&&(k.complete=c),D(this,C,k)):(this.attr(C,null,c),k.step&&k.step.call(this));return this},colorGradient:function(C,k,c){var z=this.renderer,b,d,q,f,w,G,g,M,v,R,p=[],I;C.radialGradient?d="radialGradient":C.linearGradient&&(d="linearGradient");d&&(q=C[d],w=z.gradients,g=C.stops,R=c.radialReference,H(q)&&(C[d]=
|
536
|
+
q={x1:q[0],y1:q[1],x2:q[2],y2:q[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===d&&R&&!t(q.gradientUnits)&&(f=q,q=y(q,z.getRadialAttr(R,f),{gradientUnits:"userSpaceOnUse"})),l(q,function(a,C){"id"!==C&&p.push(C,a)}),l(g,function(a){p.push(a)}),p=p.join(","),w[p]?R=w[p].attr("id"):(q.id=R=a.uniqueKey(),w[p]=G=z.createElement(d).attr(q).add(z.defs),G.radAttr=f,G.stops=[],e(g,function(C){0===C[1].indexOf("rgba")?(b=a.color(C[1]),M=b.get("rgb"),v=b.get("a")):(M=C[1],v=1);C=z.createElement("stop").attr({offset:C[0],
|
537
|
+
"stop-color":M,"stop-opacity":v}).add(G);G.stops.push(C)})),I="url("+z.url+"#"+R+")",c.setAttribute(k,I),c.gradient=p,C.toString=function(){return I})},applyTextOutline:function(C){var k=this.element,c,z,l,b,d;-1!==C.indexOf("contrast")&&(C=C.replace(/contrast/g,this.renderer.getContrast(k.style.fill)));C=C.split(" ");z=C[C.length-1];if((l=C[0])&&"none"!==l&&a.svg){this.fakeTS=!0;C=[].slice.call(k.getElementsByTagName("tspan"));this.ySetter=this.xSetter;l=l.replace(/(^[\d\.]+)(.*?)$/g,function(a,
|
538
|
+
C,k){return 2*C+k});for(d=C.length;d--;)c=C[d],"highcharts-text-outline"===c.getAttribute("class")&&p(C,k.removeChild(c));b=k.firstChild;e(C,function(a,C){0===C&&(a.setAttribute("x",k.getAttribute("x")),C=k.getAttribute("y"),a.setAttribute("y",C||0),null===C&&k.setAttribute("y",0));a=a.cloneNode(1);n(a,{"class":"highcharts-text-outline",fill:z,stroke:z,"stroke-width":l,"stroke-linejoin":"round"});k.insertBefore(a,b)})}},attr:function(a,k,c,z){var C,b=this.element,d,q=this,e,y;"string"===typeof a&&
|
539
|
+
void 0!==k&&(C=a,a={},a[C]=k);"string"===typeof a?q=(this[a+"Getter"]||this._defaultGetter).call(this,a,b):(l(a,function(k,C){e=!1;z||Q(this,C);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(C)&&(d||(this.symbolAttr(a),d=!0),e=!0);!this.rotation||"x"!==C&&"y"!==C||(this.doTransform=!0);e||(y=this[C+"Setter"]||this._defaultSetter,y.call(this,k,C,b),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(C)&&this.updateShadows(C,k,y))},this),this.afterSetters());
|
540
|
+
c&&c();return q},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(a,k,c){for(var C=this.shadows,z=C.length;z--;)c.call(C[z],"height"===a?Math.max(k-(C[z].cutHeight||0),0):"d"===a?this.d:k,a,C[z])},addClass:function(a,k){var C=this.attr("class")||"";-1===C.indexOf(a)&&(k||(a=(C+(C?" ":"")+a).replace(" "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==n(this.element,"class").indexOf(a)},removeClass:function(a){n(this.element,
|
541
|
+
"class",(n(this.element,"class")||"").replace(a,""));return this},symbolAttr:function(a){var k=this;e("x y r start end width height innerR anchorX anchorY".split(" "),function(C){k[C]=I(a[C],k[C])});k.attr({d:k.renderer.symbols[k.symbolName](k.x,k.y,k.width,k.height,k)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,k){var C=this,c={},z;k=k||a.strokeWidth||0;z=Math.round(k)%2/2;a.x=Math.floor(a.x||C.x||0)+z;a.y=Math.floor(a.y||C.y||
|
542
|
+
0)+z;a.width=Math.floor((a.width||C.width||0)-2*z);a.height=Math.floor((a.height||C.height||0)-2*z);t(a.strokeWidth)&&(a.strokeWidth=k);l(a,function(a,k){C[k]!==a&&(C[k]=c[k]=a)});return c},css:function(a){var C=this.styles,c={},z=this.element,b,q="",e,y=!C,f=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);C&&l(a,function(a,k){a!==C[k]&&(c[k]=a,y=!0)});y&&(C&&(a=d(C,c)),b=this.textWidth=a&&a.width&&"auto"!==a.width&&"text"===z.nodeName.toLowerCase()&&k(a.width),this.styles=a,b&&
|
543
|
+
!M&&this.renderer.forExport&&delete a.width,J&&!M?r(this.element,a):(e=function(a,k){return"-"+k.toLowerCase()},l(a,function(a,k){-1===v(k,f)&&(q+=k.replace(/([A-Z])/g,e)+":"+a+";")}),q&&n(z,"style",q)),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},strokeWidth:function(){return this["stroke-width"]||0},on:function(a,k){var C=this,c=C.element;A&&"click"===a?(c.ontouchstart=function(a){C.touchEventFired=
|
544
|
+
Date.now();a.preventDefault();k.call(c,a)},c.onclick=function(a){(-1===O.navigator.userAgent.indexOf("Android")||1100<Date.now()-(C.touchEventFired||0))&&k.call(c,a)}):c["on"+a]=k;return this},setRadialReference:function(a){var k=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;k&&k.radAttr&&k.animate(this.renderer.getRadialAttr(a,k.radAttr));return this},translate:function(a,k){return this.attr({translateX:a,translateY:k})},invert:function(a){this.inverted=a;this.updateTransform();
|
545
|
+
return this},updateTransform:function(){var a=this.translateX||0,k=this.translateY||0,c=this.scaleX,z=this.scaleY,l=this.inverted,b=this.rotation,d=this.element;l&&(a+=this.width,k+=this.height);a=["translate("+a+","+k+")"];l?a.push("rotate(90) scale(-1,1)"):b&&a.push("rotate("+b+" "+(d.getAttribute("x")||0)+" "+(d.getAttribute("y")||0)+")");(t(c)||t(z))&&a.push("scale("+I(c,1)+" "+I(z,1)+")");a.length&&d.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);
|
546
|
+
return this},align:function(a,k,c){var C,z,l,b,d={};z=this.renderer;l=z.alignedObjects;var q,e;if(a){if(this.alignOptions=a,this.alignByTranslate=k,!c||w(c))this.alignTo=C=c||"renderer",p(l,this),l.push(this),c=null}else a=this.alignOptions,k=this.alignByTranslate,C=this.alignTo;c=I(c,z[C],z);C=a.align;z=a.verticalAlign;l=(c.x||0)+(a.x||0);b=(c.y||0)+(a.y||0);"right"===C?q=1:"center"===C&&(q=2);q&&(l+=(c.width-(a.width||0))/q);d[k?"translateX":"x"]=Math.round(l);"bottom"===z?e=1:"middle"===z&&(e=
|
547
|
+
2);e&&(b+=(c.height-(a.height||0))/e);d[k?"translateY":"y"]=Math.round(b);this[this.placed?"animate":"attr"](d);this.placed=!0;this.alignAttr=d;return this},getBBox:function(a,k){var C,c=this.renderer,z,l=this.element,b=this.styles,q,y=this.textStr,f,w=c.cache,G=c.cacheKeys,g;k=I(k,this.rotation);z=k*m;q=b&&b.fontSize;void 0!==y&&(g=y.toString(),-1===g.indexOf("\x3c")&&(g=g.replace(/[0-9]/g,"0")),g+=["",k||0,q,b&&b.width,b&&b.textOverflow].join());g&&!a&&(C=w[g]);if(!C){if(l.namespaceURI===this.SVG_NS||
|
548
|
+
c.forExport){try{(f=this.fakeTS&&function(a){e(l.querySelectorAll(".highcharts-text-outline"),function(k){k.style.display=a})})&&f("none"),C=l.getBBox?d({},l.getBBox()):{width:l.offsetWidth,height:l.offsetHeight},f&&f("")}catch(W){}if(!C||0>C.width)C={width:0,height:0}}else C=this.htmlGetBBox();c.isSVG&&(a=C.width,c=C.height,b&&"11px"===b.fontSize&&17===Math.round(c)&&(C.height=c=14),k&&(C.width=Math.abs(c*Math.sin(z))+Math.abs(a*Math.cos(z)),C.height=Math.abs(c*Math.cos(z))+Math.abs(a*Math.sin(z))));
|
549
|
+
if(g&&0<C.height){for(;250<G.length;)delete w[G.shift()];w[g]||G.push(g);w[g]=C}}return C},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var k=this;k.animate({opacity:0},{duration:a||150,complete:function(){k.attr({y:-9999})}})},add:function(a){var k=this.renderer,c=this.element,C;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&k.buildText(this);this.added=!0;if(!a||
|
550
|
+
a.handleZ||this.zIndex)C=this.zIndexSetter();C||(a?a.element:k.box).appendChild(c);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var k=a.parentNode;k&&k.removeChild(a)},destroy:function(){var a=this,k=a.element||{},c=a.renderer.isSVG&&"SPAN"===k.nodeName&&a.parentGroup,z=k.ownerSVGElement;k.onclick=k.onmouseout=k.onmouseover=k.onmousemove=k.point=null;Q(a);a.clipPath&&z&&(e(z.querySelectorAll("[clip-path]"),function(k){-1<k.getAttribute("clip-path").indexOf(a.clipPath.element.id+
|
551
|
+
")")&&k.removeAttribute("clip-path")}),a.clipPath=a.clipPath.destroy());if(a.stops){for(z=0;z<a.stops.length;z++)a.stops[z]=a.stops[z].destroy();a.stops=null}a.safeRemoveChild(k);for(a.destroyShadows();c&&c.div&&0===c.div.childNodes.length;)k=c.parentGroup,a.safeRemoveChild(c.div),delete c.div,c=k;a.alignTo&&p(a.renderer.alignedObjects,a);l(a,function(k,c){delete a[c]});return null},shadow:function(a,k,c){var C=[],z,l,b=this.element,d,q,e,y;if(!a)this.destroyShadows();else if(!this.shadows){q=I(a.width,
|
552
|
+
3);e=(a.opacity||.15)/q;y=this.parentInverted?"(-1,-1)":"("+I(a.offsetX,1)+", "+I(a.offsetY,1)+")";for(z=1;z<=q;z++)l=b.cloneNode(0),d=2*q+1-2*z,n(l,{isShadow:"true",stroke:a.color||"#000000","stroke-opacity":e*z,"stroke-width":d,transform:"translate"+y,fill:"none"}),c&&(n(l,"height",Math.max(n(l,"height")-d,0)),l.cutHeight=d),k?k.element.appendChild(l):b.parentNode.insertBefore(l,b),C.push(l);this.shadows=C}return this},destroyShadows:function(){e(this.shadows||[],function(a){this.safeRemoveChild(a)},
|
553
|
+
this);this.shadows=void 0},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=I(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,k,c){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");c.setAttribute(k,a);this[k]=a},dashstyleSetter:function(a){var c,z=this["stroke-width"];"inherit"===z&&(z=1);if(a=a&&a.toLowerCase()){a=
|
554
|
+
a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(c=a.length;c--;)a[c]=k(a[c])*z;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,k,c){this[k]=
|
555
|
+
a;c.setAttribute(k,a)},titleSetter:function(a){var k=this.element.getElementsByTagName("title")[0];k||(k=g.createElementNS(this.SVG_NS,"title"),this.element.appendChild(k));k.firstChild&&k.removeChild(k.firstChild);k.appendChild(g.createTextNode(String(I(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,k,c){"string"===typeof a?c.setAttribute(k,a):a&&this.colorGradient(a,k,c)},
|
556
|
+
visibilitySetter:function(a,k,c){"inherit"===a?c.removeAttribute(k):c.setAttribute(k,a)},zIndexSetter:function(a,c){var z=this.renderer,l=this.parentGroup,C=(l||z).element||z.box,b,d=this.element,q;b=this.added;var e;t(a)&&(d.zIndex=a,a=+a,this[c]===a&&(b=!1),this[c]=a);if(b){(a=this.zIndex)&&l&&(l.handleZ=!0);c=C.childNodes;for(e=0;e<c.length&&!q;e++)l=c[e],b=l.zIndex,l!==d&&(k(b)>a||!t(a)&&t(b)||0>a&&!t(b)&&C!==z.box)&&(C.insertBefore(d,l),q=!0);q||C.appendChild(d)}return q},_defaultSetter:function(a,
|
557
|
+
k,c){c.setAttribute(k,a)}});E.prototype.yGetter=E.prototype.xGetter;E.prototype.translateXSetter=E.prototype.translateYSetter=E.prototype.rotationSetter=E.prototype.verticalAlignSetter=E.prototype.scaleXSetter=E.prototype.scaleYSetter=function(a,k){this[k]=a;this.doTransform=!0};E.prototype["stroke-widthSetter"]=E.prototype.strokeSetter=function(a,k,c){this[k]=a;this.stroke&&this["stroke-width"]?(E.prototype.fillSetter.call(this,this.stroke,"stroke",c),c.setAttribute("stroke-width",this["stroke-width"]),
|
558
|
+
this.hasStroke=!0):"stroke-width"===k&&0===a&&this.hasStroke&&(c.removeAttribute("stroke"),this.hasStroke=!1)};B=a.SVGRenderer=function(){this.init.apply(this,arguments)};d(B.prototype,{Element:E,SVG_NS:N,init:function(a,k,c,z,l,b){var C;z=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(z));C=z.element;a.appendChild(C);-1===a.innerHTML.indexOf("xmlns")&&n(C,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=C;this.boxWrapper=z;this.alignedObjects=[];this.url=(q||
|
559
|
+
K)&&g.getElementsByTagName("base").length?O.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(g.createTextNode("Created with Highstock 5.0.12"));this.defs=this.createElement("defs").add();this.allowHTML=b;this.forExport=l;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(k,c,!1);var d;q&&a.getBoundingClientRect&&(k=function(){r(a,{left:0,top:0});d=a.getBoundingClientRect();
|
560
|
+
r(a,{left:Math.ceil(d.left)-d.left+"px",top:Math.ceil(d.top)-d.top+"px"})},k(),this.unSubPixelFix=F(O,"resize",k))},getStyle:function(a){return this.style=d({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();f(this.gradients||{});this.gradients=
|
561
|
+
null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var k=new this.Element;k.init(this,a);return k},draw:G,getRadialAttr:function(a,k){return{cx:a[0]-a[2]/2+k.cx*a[2],cy:a[1]-a[2]/2+k.cy*a[2],r:k.r*a[2]}},getSpanWidth:function(a,k){var c=a.getBBox(!0).width;!M&&this.forExport&&(c=this.measureSpanWidth(k.firstChild.data,a.styles));return c},applyEllipsis:function(a,k,c,z){var l=this.getSpanWidth(a,k),b=l>z,l=c,d,q=0,C=
|
562
|
+
c.length,e=function(a){k.removeChild(k.firstChild);a&&k.appendChild(g.createTextNode(a))};if(b){for(;q<=C;)d=Math.ceil((q+C)/2),l=c.substring(0,d)+"\u2026",e(l),l=this.getSpanWidth(a,k),q===C?q=C+1:l>z?C=d-1:q=d;0===C&&e("")}return b},buildText:function(a){var c=a.element,z=this,l=z.forExport,d=I(a.textStr,"").toString(),q=-1!==d.indexOf("\x3c"),C=c.childNodes,y,f,w,G,v=n(c,"x"),p=a.styles,J=a.textWidth,m=p&&p.lineHeight,A=p&&p.textOutline,H=p&&"ellipsis"===p.textOverflow,K=p&&"nowrap"===p.whiteSpace,
|
563
|
+
h=p&&p.fontSize,Q,t,x=C.length,p=J&&!a.added&&this.box,u=function(a){var l;l=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:h||z.style.fontSize||12;return m?k(m):z.fontMetrics(l,a.getAttribute("style")?a:c).h};Q=[d,H,K,m,A,h,J].join();if(Q!==a.textCache){for(a.textCache=Q;x--;)c.removeChild(C[x]);q||A||H||J||-1!==d.indexOf(" ")?(y=/<.*class="([^"]+)".*>/,f=/<.*style="([^"]+)".*>/,w=/<.*href="([^"]+)".*>/,p&&p.appendChild(c),d=q?d.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g,
|
564
|
+
'\x3cspan style\x3d"font-style:italic"\x3e').replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g):[d],d=b(d,function(a){return""!==a}),e(d,function(k,b){var d,q=0;k=k.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");d=k.split("|||");e(d,function(k){if(""!==k||1===d.length){var C={},e=g.createElementNS(z.SVG_NS,"tspan"),p,I;y.test(k)&&(p=k.match(y)[1],n(e,"class",p));f.test(k)&&(I=k.match(f)[1].replace(/(;| |^)color([ :])/,
|
565
|
+
"$1fill$2"),n(e,"style",I));w.test(k)&&!l&&(n(e,"onclick",'location.href\x3d"'+k.match(w)[1]+'"'),r(e,{cursor:"pointer"}));k=(k.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"\x3c").replace(/>/g,"\x3e");if(" "!==k){e.appendChild(g.createTextNode(k));q?C.dx=0:b&&null!==v&&(C.x=v);n(e,C);c.appendChild(e);!q&&t&&(!M&&l&&r(e,{display:"block"}),n(e,"dy",u(e)));if(J){C=k.replace(/([^\^])-/g,"$1- ").split(" ");p=1<d.length||b||1<C.length&&!K;var m=[],A,h=u(e),Q=a.rotation;for(H&&(G=z.applyEllipsis(a,
|
566
|
+
e,k,J));!H&&p&&(C.length||m.length);)a.rotation=0,A=z.getSpanWidth(a,e),k=A>J,void 0===G&&(G=k),k&&1!==C.length?(e.removeChild(e.firstChild),m.unshift(C.pop())):(C=m,m=[],C.length&&!K&&(e=g.createElementNS(N,"tspan"),n(e,{dy:h,x:v}),I&&n(e,"style",I),c.appendChild(e)),A>J&&(J=A)),C.length&&e.appendChild(g.createTextNode(C.join(" ").replace(/- /g,"-")));a.rotation=Q}q++}}});t=t||c.childNodes.length}),G&&a.attr("title",a.textStr),p&&p.removeChild(c),A&&a.applyTextOutline&&a.applyTextOutline(A)):c.appendChild(g.createTextNode(d.replace(/</g,
|
567
|
+
"\x3c").replace(/>/g,"\x3e")))}},getContrast:function(a){a=u(a).rgba;return 510<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,k,c,z,l,b,q,e,f){var C=this.label(a,k,c,f,null,null,null,null,"button"),w=0;C.attr(y({padding:8,r:2},l));var G,g,p,v;l=y({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},l);G=l.style;delete l.style;b=y(l,{fill:"#e6e6e6"},b);g=b.style;delete b.style;q=y(l,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},
|
568
|
+
q);p=q.style;delete q.style;e=y(l,{style:{color:"#cccccc"}},e);v=e.style;delete e.style;F(C.element,J?"mouseover":"mouseenter",function(){3!==w&&C.setState(1)});F(C.element,J?"mouseout":"mouseleave",function(){3!==w&&C.setState(w)});C.setState=function(a){1!==a&&(C.state=w=a);C.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0]);C.attr([l,b,q,e][a||0]).css([G,g,p,v][a||0])};C.attr(l).css(d({cursor:"default"},
|
569
|
+
G));return C.on("click",function(a){3!==w&&z.call(C,a)})},crispLine:function(a,k){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-k%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+k%2/2);return a},path:function(a){var k={fill:"none"};H(a)?k.d=a:c(a)&&d(k,a);return this.createElement("path").attr(k)},circle:function(a,k,z){a=c(a)?a:{x:a,y:k,r:z};k=this.createElement("circle");k.xSetter=k.ySetter=function(a,k,c){c.setAttribute("c"+k,a)};return k.attr(a)},arc:function(a,k,z,l,b,d){c(a)?(l=a,k=l.y,z=l.r,a=l.x):
|
570
|
+
l={innerR:l,start:b,end:d};a=this.symbol("arc",a,k,z,z,l);a.r=z;return a},rect:function(a,k,z,l,b,d){b=c(a)?a.r:b;var q=this.createElement("rect");a=c(a)?a:void 0===a?{}:{x:a,y:k,width:Math.max(z,0),height:Math.max(l,0)};void 0!==d&&(a.strokeWidth=d,a=q.crisp(a));a.fill="none";b&&(a.r=b);q.rSetter=function(a,k,c){n(c,{rx:a,ry:a})};return q.attr(a)},setSize:function(a,k,c){var z=this.alignedObjects,l=z.length;this.width=a;this.height=k;for(this.boxWrapper.animate({width:a,height:k},{step:function(){this.attr({viewBox:"0 0 "+
|
571
|
+
this.attr("width")+" "+this.attr("height")})},duration:I(c,!0)?void 0:0});l--;)z[l].align()},g:function(a){var k=this.createElement("g");return a?k.attr({"class":"highcharts-"+a}):k},image:function(a,k,c,z,l){var b={preserveAspectRatio:"none"};1<arguments.length&&d(b,{x:k,y:c,width:z,height:l});b=this.createElement("image").attr(b);b.element.setAttributeNS?b.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):b.element.setAttribute("hc-svg-href",a);return b},symbol:function(a,k,c,z,l,
|
572
|
+
b){var q=this,y,C=/^url\((.*?)\)$/,f=C.test(a),w=!f&&(this.symbols[a]?a:"circle"),G=w&&this.symbols[w],p=t(k)&&G&&G.call(this.symbols,Math.round(k),Math.round(c),z,l,b),v,M;G?(y=this.path(p),y.attr("fill","none"),d(y,{symbolName:w,x:k,y:c,width:z,height:l}),b&&d(y,b)):f&&(v=a.match(C)[1],y=this.image(v),y.imgwidth=I(P[v]&&P[v].width,b&&b.width),y.imgheight=I(P[v]&&P[v].height,b&&b.height),M=function(){y.attr({width:y.width,height:y.height})},e(["width","height"],function(a){y[a+"Setter"]=function(a,
|
573
|
+
k){var c={},z=this["img"+k],l="width"===k?"translateX":"translateY";this[k]=a;t(z)&&(this.element&&this.element.setAttribute(k,z),this.alignByTranslate||(c[l]=((this[k]||0)-z)/2,this.attr(c)))}}),t(k)&&y.attr({x:k,y:c}),y.isImg=!0,t(y.imgwidth)&&t(y.imgheight)?M():(y.attr({width:0,height:0}),x("img",{onload:function(){var a=h[q.chartIndex];0===this.width&&(r(this,{position:"absolute",top:"-999em"}),g.body.appendChild(this));P[v]={width:this.width,height:this.height};y.imgwidth=this.width;y.imgheight=
|
574
|
+
this.height;y.element&&M();this.parentNode&&this.parentNode.removeChild(this);q.imgCount--;if(!q.imgCount&&a&&a.onload)a.onload()},src:v}),this.imgCount++));return y},symbols:{circle:function(a,k,c,z){return this.arc(a+c/2,k+z/2,c/2,z/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,k,c,z){return["M",a,k,"L",a+c,k,a+c,k+z,a,k+z,"Z"]},triangle:function(a,k,c,z){return["M",a+c/2,k,"L",a+c,k+z,a,k+z,"Z"]},"triangle-down":function(a,k,c,z){return["M",a,k,"L",a+c,k,a+c/2,k+z,"Z"]},diamond:function(a,
|
575
|
+
k,c,z){return["M",a+c/2,k,"L",a+c,k+z/2,a+c/2,k+z,a,k+z/2,"Z"]},arc:function(a,k,c,z,l){var b=l.start,d=l.r||c,q=l.r||z||c,e=l.end-.001;c=l.innerR;z=l.open;var y=Math.cos(b),f=Math.sin(b),C=Math.cos(e),e=Math.sin(e);l=l.end-b<Math.PI?0:1;d=["M",a+d*y,k+q*f,"A",d,q,0,l,1,a+d*C,k+q*e];t(c)&&d.push(z?"M":"L",a+c*C,k+c*e,"A",c,c,0,l,0,a+c*y,k+c*f);d.push(z?"":"Z");return d},callout:function(a,k,c,z,l){var b=Math.min(l&&l.r||0,c,z),d=b+6,q=l&&l.anchorX;l=l&&l.anchorY;var e;e=["M",a+b,k,"L",a+c-b,k,"C",
|
576
|
+
a+c,k,a+c,k,a+c,k+b,"L",a+c,k+z-b,"C",a+c,k+z,a+c,k+z,a+c-b,k+z,"L",a+b,k+z,"C",a,k+z,a,k+z,a,k+z-b,"L",a,k+b,"C",a,k,a,k,a+b,k];q&&q>c?l>k+d&&l<k+z-d?e.splice(13,3,"L",a+c,l-6,a+c+6,l,a+c,l+6,a+c,k+z-b):e.splice(13,3,"L",a+c,z/2,q,l,a+c,z/2,a+c,k+z-b):q&&0>q?l>k+d&&l<k+z-d?e.splice(33,3,"L",a,l+6,a-6,l,a,l-6,a,k+b):e.splice(33,3,"L",a,z/2,q,l,a,z/2,a,k+b):l&&l>z&&q>a+d&&q<a+c-d?e.splice(23,3,"L",q+6,k+z,q,k+z+6,q-6,k+z,a+b,k+z):l&&0>l&&q>a+d&&q<a+c-d&&e.splice(3,3,"L",q-6,k,q,k-6,q+6,k,c-b,k);return e}},
|
577
|
+
clipRect:function(k,c,z,l){var b=a.uniqueKey(),d=this.createElement("clipPath").attr({id:b}).add(this.defs);k=this.rect(k,c,z,l,0).add(d);k.id=b;k.clipPath=d;k.count=0;return k},text:function(a,k,c,z){var l=!M&&this.forExport,b={};if(z&&(this.allowHTML||!this.forExport))return this.html(a,k,c);b.x=Math.round(k||0);c&&(b.y=Math.round(c));if(a||0===a)b.text=a;a=this.createElement("text").attr(b);l&&a.css({position:"absolute"});z||(a.xSetter=function(a,k,c){var z=c.getElementsByTagName("tspan"),l,b=
|
578
|
+
c.getAttribute(k),d;for(d=0;d<z.length;d++)l=z[d],l.getAttribute(k)===b&&l.setAttribute(k,a);c.setAttribute(k,a)});return a},fontMetrics:function(a,c){a=a||c&&c.style&&c.style.fontSize||this.style&&this.style.fontSize;a=/px/.test(a)?k(a):/em/.test(a)?parseFloat(a)*(c?this.fontMetrics(null,c.parentNode).f:16):12;c=24>a?a+3:Math.round(1.2*a);return{h:c,b:Math.round(.8*c),f:a}},rotCorr:function(a,k,c){var z=a;k&&c&&(z=Math.max(z*Math.cos(k*m),4));return{x:-a/3*Math.sin(k*m),y:z}},label:function(k,c,
|
579
|
+
l,b,q,f,w,G,g){var v=this,p=v.g("button"!==g&&"label"),M=p.text=v.text("",0,0,w).attr({zIndex:1}),C,I,J=0,m=3,A=0,H,h,K,Q,r,N={},n,x,u=/^url\((.*?)\)$/.test(b),P=u,R,V,U,O;g&&p.addClass("highcharts-"+g);P=u;R=function(){return(n||0)%2/2};V=function(){var a=M.element.style,k={};I=(void 0===H||void 0===h||r)&&t(M.textStr)&&M.getBBox();p.width=(H||I.width||0)+2*m+A;p.height=(h||I.height||0)+2*m;x=m+v.fontMetrics(a&&a.fontSize,M).b;P&&(C||(p.box=C=v.symbols[b]||u?v.symbol(b):v.rect(),C.addClass(("button"===
|
580
|
+
g?"":"highcharts-label-box")+(g?" highcharts-"+g+"-box":"")),C.add(p),a=R(),k.x=a,k.y=(G?-x:0)+a),k.width=Math.round(p.width),k.height=Math.round(p.height),C.attr(d(k,N)),N={})};U=function(){var a=A+m,k;k=G?0:x;t(H)&&I&&("center"===r||"right"===r)&&(a+={center:.5,right:1}[r]*(H-I.width));if(a!==M.x||k!==M.y)M.attr("x",a),void 0!==k&&M.attr("y",k);M.x=a;M.y=k};O=function(a,k){C?C.attr(a,k):N[a]=k};p.onAdd=function(){M.add(p);p.attr({text:k||0===k?k:"",x:c,y:l});C&&t(q)&&p.attr({anchorX:q,anchorY:f})};
|
581
|
+
p.widthSetter=function(k){H=a.isNumber(k)?k:null};p.heightSetter=function(a){h=a};p["text-alignSetter"]=function(a){r=a};p.paddingSetter=function(a){t(a)&&a!==m&&(m=p.padding=a,U())};p.paddingLeftSetter=function(a){t(a)&&a!==A&&(A=a,U())};p.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==J&&(J=a,I&&p.attr({x:K}))};p.textSetter=function(a){void 0!==a&&M.textSetter(a);V();U()};p["stroke-widthSetter"]=function(a,k){a&&(P=!0);n=this["stroke-width"]=a;O(k,a)};p.strokeSetter=p.fillSetter=p.rSetter=
|
582
|
+
function(a,k){"fill"===k&&a&&(P=!0);O(k,a)};p.anchorXSetter=function(a,k){q=p.anchorX=a;O(k,Math.round(a)-R()-K)};p.anchorYSetter=function(a,k){f=p.anchorY=a;O(k,a-Q)};p.xSetter=function(a){p.x=a;J&&(a-=J*((H||I.width)+2*m));K=Math.round(a);p.attr("translateX",K)};p.ySetter=function(a){Q=p.y=Math.round(a);p.attr("translateY",Q)};var B=p.css;return d(p,{css:function(a){if(a){var k={};a=y(a);e(p.textProps,function(c){void 0!==a[c]&&(k[c]=a[c],delete a[c])});M.css(k)}return B.call(p,a)},getBBox:function(){return{width:I.width+
|
583
|
+
2*m,height:I.height+2*m,x:I.x-m,y:I.y-m}},shadow:function(a){a&&(V(),C&&C.shadow(a));return p},destroy:function(){z(p.element,"mouseenter");z(p.element,"mouseleave");M&&(M=M.destroy());C&&(C=C.destroy());E.prototype.destroy.call(p);p=v=V=U=O=null}})}});a.Renderer=B})(L);(function(a){var E=a.attr,B=a.createElement,F=a.css,D=a.defined,n=a.each,h=a.extend,u=a.isFirefox,r=a.isMS,x=a.isWebKit,t=a.pInt,m=a.SVGRenderer,f=a.win,g=a.wrap;h(a.SVGElement.prototype,{htmlCss:function(a){var d=this.element;if(d=
|
584
|
+
a&&"SPAN"===d.tagName&&a.width)delete a.width,this.textWidth=d,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=h(this.styles,a);F(this.element,a);return this},htmlGetBBox:function(){var a=this.element;"text"===a.nodeName&&(a.style.position="absolute");return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,d=this.element,f=this.translateX||0,b=this.translateY||
|
585
|
+
0,g=this.x||0,v=this.y||0,m=this.textAlign||"left",q={left:0,center:.5,right:1}[m],J=this.styles;F(d,{marginLeft:f,marginTop:b});this.shadows&&n(this.shadows,function(a){F(a,{marginLeft:f+1,marginTop:b+1})});this.inverted&&n(d.childNodes,function(c){a.invertChild(c,d)});if("SPAN"===d.tagName){var c=this.rotation,w=t(this.textWidth),K=J&&J.whiteSpace,y=[c,m,d.innerHTML,this.textWidth,this.textAlign].join();y!==this.cTT&&(J=a.fontMetrics(d.style.fontSize).b,D(c)&&this.setSpanRotation(c,q,J),F(d,{width:"",
|
586
|
+
whiteSpace:K||"nowrap"}),d.offsetWidth>w&&/[ \-]/.test(d.textContent||d.innerText)&&F(d,{width:w+"px",display:"block",whiteSpace:K||"normal"}),this.getSpanCorrection(d.offsetWidth,J,q,c,m));F(d,{left:g+(this.xCorr||0)+"px",top:v+(this.yCorr||0)+"px"});x&&(J=d.offsetHeight);this.cTT=y}}else this.alignOnAdd=!0},setSpanRotation:function(a,d,p){var b={},e=r?"-ms-transform":x?"-webkit-transform":u?"MozTransform":f.opera?"-o-transform":"";b[e]=b.transform="rotate("+a+"deg)";b[e+(u?"Origin":"-origin")]=
|
587
|
+
b.transformOrigin=100*d+"% "+p+"px";F(this.element,b)},getSpanCorrection:function(a,d,f){this.xCorr=-a*f;this.yCorr=-d}});h(m.prototype,{html:function(a,d,f){var b=this.createElement("span"),e=b.element,p=b.renderer,m=p.isSVG,q=function(a,c){n(["opacity","visibility"],function(b){g(a,b+"Setter",function(a,b,d,l){a.call(this,b,d,l);c[d]=b})})};b.textSetter=function(a){a!==e.innerHTML&&delete this.bBox;e.innerHTML=this.textStr=a;b.htmlUpdateTransform()};m&&q(b,b.element.style);b.xSetter=b.ySetter=b.alignSetter=
|
588
|
+
b.rotationSetter=function(a,c){"align"===c&&(c="textAlign");b[c]=a;b.htmlUpdateTransform()};b.attr({text:a,x:Math.round(d),y:Math.round(f)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"});e.style.whiteSpace="nowrap";b.css=b.htmlCss;m&&(b.add=function(a){var c,d=p.box.parentNode,f=[];if(this.parentGroup=a){if(c=a.div,!c){for(;a;)f.push(a),a=a.parentGroup;n(f.reverse(),function(a){var e,l=E(a.element,"class");l&&(l={className:l});c=a.div=a.div||B("div",l,{position:"absolute",
|
589
|
+
left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},c||d);e=c.style;h(a,{on:function(){b.on.apply({element:f[0].div},arguments);return a},translateXSetter:function(c,k){e.left=c+"px";a[k]=c;a.doTransform=!0},translateYSetter:function(c,k){e.top=c+"px";a[k]=c;a.doTransform=!0}});q(a,e)})}}else c=d;c.appendChild(e);b.added=!0;b.alignOnAdd&&b.htmlUpdateTransform();return b});return b}})})(L);(function(a){var E,B,F=
|
590
|
+
a.createElement,D=a.css,n=a.defined,h=a.deg2rad,u=a.discardElement,r=a.doc,x=a.each,t=a.erase,m=a.extend;E=a.extendClass;var f=a.isArray,g=a.isNumber,e=a.isObject,d=a.merge;B=a.noop;var p=a.pick,b=a.pInt,A=a.SVGElement,v=a.SVGRenderer,H=a.win;a.svg||(B={docMode8:r&&8===r.documentMode,init:function(a,b){var c=["\x3c",b,' filled\x3d"f" stroked\x3d"f"'],d=["position: ","absolute",";"],q="div"===b;("shape"===b||q)&&d.push("left:0;top:0;width:1px;height:1px;");d.push("visibility: ",q?"hidden":"visible");
|
591
|
+
c.push(' style\x3d"',d.join(""),'"/\x3e');b&&(c=q||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=F(c));this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box,q=a&&a.inverted,d=a?a.element||a:d;a&&(this.parentGroup=a);q&&b.invertChild(c,d);d.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:A.prototype.htmlUpdateTransform,
|
592
|
+
setSpanRotation:function(){var a=this.rotation,b=Math.cos(a*h),c=Math.sin(a*h);D(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,d,e){var q=d?Math.cos(d*h):1,f=d?Math.sin(d*h):0,l=p(this.elemHeight,this.element.offsetHeight),w;this.xCorr=0>q&&-a;this.yCorr=0>f&&-l;w=0>q*f;this.xCorr+=f*b*(w?1-c:c);this.yCorr-=q*b*(d?w?c:1-c:1);e&&"left"!==
|
593
|
+
e&&(this.xCorr-=a*c*(0>q?-1:1),d&&(this.yCorr-=l*c*(0>f?-1:1)),D(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)g(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,t(c,b),c.push(b),b.destroyClip=function(){t(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),
|
594
|
+
a={clip:b.docMode8?"inherit":"rect(auto)"});return b.css(a)},css:A.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&u(a)},destroy:function(){this.destroyClip&&this.destroyClip();return A.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=H.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,d){var c;a=a.split(/[ ,]/);c=a.length;if(9===c||11===c)a[c-4]=a[c-2]=b(a[c-2])-10*d;return a.join(" ")},shadow:function(a,d,c){var e=[],q,f=this.element,
|
595
|
+
g=this.renderer,l,v=f.style,k,z=f.path,m,M,A,J;z&&"string"!==typeof z.value&&(z="x");M=z;if(a){A=p(a.width,3);J=(a.opacity||.15)/A;for(q=1;3>=q;q++)m=2*A+1-2*q,c&&(M=this.cutOffPath(z.value,m+.5)),k=['\x3cshape isShadow\x3d"true" strokeweight\x3d"',m,'" filled\x3d"false" path\x3d"',M,'" coordsize\x3d"10 10" style\x3d"',f.style.cssText,'" /\x3e'],l=F(g.prepVML(k),null,{left:b(v.left)+p(a.offsetX,1),top:b(v.top)+p(a.offsetY,1)}),c&&(l.cutOff=m+1),k=['\x3cstroke color\x3d"',a.color||"#000000",'" opacity\x3d"',
|
596
|
+
J*q,'"/\x3e'],F(g.prepVML(k),null,null,l),d?d.element.appendChild(l):f.parentNode.insertBefore(l,f),e.push(l);this.shadows=e}return this},updateShadows:B,setAttr:function(a,b){this.docMode8?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){(this.added?this.element:this).className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||F(this.renderer.prepVML(["\x3cstroke/\x3e"]),null,null,c))[b]=a||"solid";this[b]=a},dSetter:function(a,b,c){var d=this.shadows;
|
597
|
+
a=a||[];this.d=a.join&&a.join(" ");c.path=a=this.pathToVML(a);if(d)for(c=d.length;c--;)d[c].path=d[c].cutOff?this.cutOffPath(a,d[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var d=c.nodeName;"SPAN"===d?c.style.color=a:"IMG"!==d&&(c.filled="none"!==a,this.setAttr("fillcolor",this.renderer.color(a,c,b,this)))},"fill-opacitySetter":function(a,b,c){F(this.renderer.prepVML(["\x3c",b.split("-")[0],' opacity\x3d"',a,'"/\x3e']),null,null,c)},opacitySetter:B,rotationSetter:function(a,b,c){c=
|
598
|
+
c.style;this[b]=c[b]=a;c.left=-Math.round(Math.sin(a*h)+1)+"px";c.top=Math.round(Math.cos(a*h))+"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;g(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&&x(this.shadows,function(c){c.style[b]=a});"DIV"===c.nodeName&&(a="hidden"===a?"-999em":
|
599
|
+
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}},B["stroke-opacitySetter"]=B["fill-opacitySetter"],a.VMLElement=B=E(A,B),B.prototype.ySetter=B.prototype.widthSetter=B.prototype.heightSetter=B.prototype.xSetter,B={Element:B,isIE8:-1<H.navigator.userAgent.indexOf("MSIE 8.0"),init:function(a,b,c){var d,
|
600
|
+
e;this.alignedObjects=[];d=this.createElement("div").css({position:"relative"});e=d.element;a.appendChild(d.element);this.isVML=!0;this.box=e;this.boxWrapper=d;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(b,c,!1);if(!r.namespaces.hcv){r.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{r.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(y){r.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},
|
601
|
+
isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var f=this.createElement(),q=e(a);return m(f,{members:[],count:0,left:(q?a.x:a)+1,top:(q?a.y:b)+1,width:(q?a.width:c)-1,height:(q?a.height:d)-1,getCSS:function(a){var c=a.element,b=c.nodeName,k=a.inverted,z=this.top-("shape"===b?c.offsetTop:0),d=this.left,c=d+this.width,e=z+this.height,z={clip:"rect("+Math.round(k?d:z)+"px,"+Math.round(k?e:c)+"px,"+Math.round(k?c:e)+"px,"+Math.round(k?z:d)+"px)"};!k&&a.docMode8&&"DIV"===b&&
|
602
|
+
m(z,{width:c+"px",height:e+"px"});return z},updateClipping:function(){x(f.members,function(a){a.element&&a.css(f.getCSS(a))})}})},color:function(b,d,c,e){var f=this,y,q=/^rgba/,l,p,k="none";b&&b.linearGradient?p="gradient":b&&b.radialGradient&&(p="pattern");if(p){var z,g,v=b.linearGradient||b.radialGradient,w,m,A,C,H,h="";b=b.stops;var J,r=[],n=function(){l=['\x3cfill colors\x3d"'+r.join(",")+'" opacity\x3d"',A,'" o:opacity2\x3d"',m,'" type\x3d"',p,'" ',h,'focus\x3d"100%" method\x3d"any" /\x3e'];
|
603
|
+
F(f.prepVML(l),null,null,d)};w=b[0];J=b[b.length-1];0<w[0]&&b.unshift([0,w[1]]);1>J[0]&&b.push([1,J[1]]);x(b,function(k,c){q.test(k[1])?(y=a.color(k[1]),z=y.get("rgb"),g=y.get("a")):(z=k[1],g=1);r.push(100*k[0]+"% "+z);c?(A=g,C=z):(m=g,H=z)});if("fill"===c)if("gradient"===p)c=v.x1||v[0]||0,b=v.y1||v[1]||0,w=v.x2||v[2]||0,v=v.y2||v[3]||0,h='angle\x3d"'+(90-180*Math.atan((v-b)/(w-c))/Math.PI)+'"',n();else{var k=v.r,t=2*k,u=2*k,B=v.cx,E=v.cy,D=d.radialReference,S,k=function(){D&&(S=e.getBBox(),B+=(D[0]-
|
604
|
+
S.x)/S.width-.5,E+=(D[1]-S.y)/S.height-.5,t*=D[2]/S.width,u*=D[2]/S.height);h='src\x3d"'+a.getOptions().global.VMLRadialGradientURL+'" size\x3d"'+t+","+u+'" origin\x3d"0.5,0.5" position\x3d"'+B+","+E+'" color2\x3d"'+H+'" ';n()};e.added?k():e.onAdd=k;k=C}else k=z}else q.test(b)&&"IMG"!==d.tagName?(y=a.color(b),e[c+"-opacitySetter"](y.get("a"),c,d),k=y.get("rgb")):(k=d.getElementsByTagName(c),k.length&&(k[0].opacity=1,k[0].type="solid"),k=b);return k},prepVML:function(a){var b=this.isIE8;a=a.join("");
|
605
|
+
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:v.prototype.html,path:function(a){var b={coordsize:"10 10"};f(a)?b.d=a:e(a)&&m(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,c){var d=this.symbol("circle");
|
606
|
+
e(a)&&(c=a.r,b=a.y,a=a.x);d.isCircle=!0;d.r=c;return d.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,d,e){var f=this.createElement("img").attr({src:a});1<arguments.length&&f.attr({x:b,y:c,width:d,height:e});return f},createElement:function(a){return"rect"===a?this.symbol(a):v.prototype.createElement.call(this,a)},invertChild:function(a,d){var c=this;d=d.style;var e="IMG"===a.tagName&&a.style;
|
607
|
+
D(a,{flip:"x",left:b(d.width)-(e?b(e.top):1),top:b(d.height)-(e?b(e.left):1),rotation:-90});x(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var f=e.start,p=e.end,l=e.r||c||d;c=e.innerR;d=Math.cos(f);var g=Math.sin(f),k=Math.cos(p),z=Math.sin(p);if(0===p-f)return["x"];f=["wa",a-l,b-l,a+l,b+l,a+l*d,b+l*g,a+l*k,b+l*z];e.open&&!c&&f.push("e","M",a,b);f.push("at",a-c,b-c,a+c,b+c,a+c*k,b+c*z,a+c*d,b+c*g,"x","e");f.isArc=!0;return f},circle:function(a,b,c,d,e){e&&n(e.r)&&
|
608
|
+
(c=d=2*e.r);e&&e.isCircle&&(a-=c/2,b-=d/2);return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){return v.prototype.symbols[n(e)&&e.r?"callout":"square"].call(0,a,b,c,d,e)}}},a.VMLRenderer=E=function(){this.init.apply(this,arguments)},E.prototype=d(v.prototype,B),a.Renderer=E);v.prototype.measureSpanWidth=function(a,b){var c=r.createElement("span");a=r.createTextNode(a);c.appendChild(a);D(c,b);this.box.appendChild(c);b=c.offsetWidth;u(c);return b}})(L);(function(a){function E(){var h=
|
609
|
+
a.defaultOptions.global,n=r.moment;if(h.timezone){if(n)return function(a){return-n.tz(a,h.timezone).utcOffset()};a.error(25)}return h.useUTC&&h.getTimezoneOffset}function B(){var h=a.defaultOptions.global,t,m=h.useUTC,f=m?"getUTC":"get",g=m?"setUTC":"set";a.Date=t=h.Date||r.Date;t.hcTimezoneOffset=m&&h.timezoneOffset;t.hcGetTimezoneOffset=E();t.hcMakeTime=function(a,d,f,b,g,v){var e;m?(e=t.UTC.apply(0,arguments),e+=n(e)):e=(new t(a,d,u(f,1),u(b,0),u(g,0),u(v,0))).getTime();return e};D("Minutes Hours Day Date Month FullYear".split(" "),
|
610
|
+
function(a){t["hcGet"+a]=f+a});D("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(a){t["hcSet"+a]=g+a})}var F=a.color,D=a.each,n=a.getTZOffset,h=a.merge,u=a.pick,r=a.win;a.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),
|
611
|
+
shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0,VMLRadialGradientURL:"http://code.highcharts.com/5.0.12/gfx/vml-radial-gradient.png"},chart:{borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},
|
612
|
+
position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},
|
613
|
+
itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,
|
614
|
+
animation:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,backgroundColor:F("#f7f7f7").setOpacity(.85).get(),borderWidth:1,headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e',
|
615
|
+
shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};a.setOptions=function(r){a.defaultOptions=h(!0,a.defaultOptions,r);B();return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;B()})(L);
|
616
|
+
(function(a){var E=a.correctFloat,B=a.defined,F=a.destroyObjectProperties,D=a.isNumber,n=a.merge,h=a.pick,u=a.deg2rad;a.Tick=function(a,h,n,m){this.axis=a;this.pos=h;this.type=n||"";this.isNewLabel=this.isNew=!0;n||m||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,x=a.options,t=a.chart,m=a.categories,f=a.names,g=this.pos,e=x.labels,d=a.tickPositions,p=g===d[0],b=g===d[d.length-1],f=m?h(m[g],f[g],g):g,m=this.label,d=d.info,A;a.isDatetimeAxis&&d&&(A=x.dateTimeLabelFormats[d.higherRanks[g]||
|
617
|
+
d.unitName]);this.isFirst=p;this.isLast=b;x=a.labelFormatter.call({axis:a,chart:t,isFirst:p,isLast:b,dateTimeLabelFormat:A,value:a.isLog?E(a.lin2log(f)):f});B(m)?m&&m.attr({text:x}):(this.labelLength=(this.label=m=B(x)&&e.enabled?t.renderer.text(x,0,0,e.useHTML).css(n(e.style)).add(a.labelGroup):null)&&m.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var r=this.axis,n=a.x,m=r.chart.chartWidth,
|
618
|
+
f=r.chart.spacing,g=h(r.labelLeft,Math.min(r.pos,f[3])),f=h(r.labelRight,Math.max(r.pos+r.len,m-f[1])),e=this.label,d=this.rotation,p={left:0,center:.5,right:1}[r.labelAlign],b=e.getBBox().width,A=r.getSlotWidth(),v=A,H=1,q,J={};if(d)0>d&&n-p*b<g?q=Math.round(n/Math.cos(d*u)-g):0<d&&n+p*b>f&&(q=Math.round((m-n)/Math.cos(d*u)));else if(m=n+(1-p)*b,n-p*b<g?v=a.x+v*(1-p)-g:m>f&&(v=f-a.x+v*p,H=-1),v=Math.min(A,v),v<A&&"center"===r.labelAlign&&(a.x+=H*(A-v-p*(A-Math.min(b,v)))),b>v||r.autoRotation&&(e.styles||
|
619
|
+
{}).width)q=v;q&&(J.width=q,(r.options.labels.style||{}).textOverflow||(J.textOverflow="ellipsis"),e.css(J))},getPosition:function(a,h,n,m){var f=this.axis,g=f.chart,e=m&&g.oldChartHeight||g.chartHeight;return{x:a?f.translate(h+n,null,null,m)+f.transB:f.left+f.offset+(f.opposite?(m&&g.oldChartWidth||g.chartWidth)-f.right-f.left:0),y:a?e-f.bottom+f.offset-(f.opposite?f.height:0):e-f.translate(h+n,null,null,m)-f.transB}},getLabelPosition:function(a,h,n,m,f,g,e,d){var p=this.axis,b=p.transA,A=p.reversed,
|
620
|
+
v=p.staggerLines,H=p.tickRotCorr||{x:0,y:0},q=f.y;B(q)||(q=0===p.side?n.rotation?-8:-n.getBBox().height:2===p.side?H.y+8:Math.cos(n.rotation*u)*(H.y-n.getBBox(!1,0).height/2));a=a+f.x+H.x-(g&&m?g*b*(A?-1:1):0);h=h+q-(g&&!m?g*b*(A?1:-1):0);v&&(n=e/(d||1)%v,p.opposite&&(n=v-n-1),h+=p.labelOffset/v*n);return{x:a,y:Math.round(h)}},getMarkPath:function(a,h,n,m,f,g){return g.crispLine(["M",a,h,"L",a+(f?0:-n),h+(f?n:0)],m)},renderGridLine:function(a,h,n){var m=this.axis,f=m.options,g=this.gridLine,e={},
|
621
|
+
d=this.pos,p=this.type,b=m.tickmarkOffset,A=m.chart.renderer,v=p?p+"Grid":"grid",H=f[v+"LineWidth"],q=f[v+"LineColor"],f=f[v+"LineDashStyle"];g||(e.stroke=q,e["stroke-width"]=H,f&&(e.dashstyle=f),p||(e.zIndex=1),a&&(e.opacity=0),this.gridLine=g=A.path().attr(e).addClass("highcharts-"+(p?p+"-":"")+"grid-line").add(m.gridGroup));if(!a&&g&&(a=m.getPlotLinePath(d+b,g.strokeWidth()*n,a,!0)))g[this.isNew?"attr":"animate"]({d:a,opacity:h})},renderMark:function(a,n,t){var m=this.axis,f=m.options,g=m.chart.renderer,
|
622
|
+
e=this.type,d=e?e+"Tick":"tick",p=m.tickSize(d),b=this.mark,A=!b,v=a.x;a=a.y;var H=h(f[d+"Width"],!e&&m.isXAxis?1:0),f=f[d+"Color"];p&&(m.opposite&&(p[0]=-p[0]),A&&(this.mark=b=g.path().addClass("highcharts-"+(e?e+"-":"")+"tick").add(m.axisGroup),b.attr({stroke:f,"stroke-width":H})),b[A?"attr":"animate"]({d:this.getMarkPath(v,a,p[0],b.strokeWidth()*t,m.horiz,g),opacity:n}))},renderLabel:function(a,n,t,m){var f=this.axis,g=f.horiz,e=f.options,d=this.label,p=e.labels,b=p.step,A=f.tickmarkOffset,v=!0,
|
623
|
+
H=a.x;a=a.y;d&&D(H)&&(d.xy=a=this.getLabelPosition(H,a,d,g,p,A,m,b),this.isFirst&&!this.isLast&&!h(e.showFirstLabel,1)||this.isLast&&!this.isFirst&&!h(e.showLastLabel,1)?v=!1:!g||f.isRadial||p.step||p.rotation||n||0===t||this.handleOverflow(a),b&&m%b&&(v=!1),v&&D(a.y)?(a.opacity=t,d[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1):(d.attr("y",-9999),this.isNewLabel=!0),this.isNew=!1)},render:function(a,n,t){var m=this.axis,f=m.horiz,g=this.getPosition(f,this.pos,m.tickmarkOffset,n),e=g.x,
|
624
|
+
d=g.y,m=f&&e===m.pos+m.len||!f&&d===m.pos?-1:1;t=h(t,1);this.isActive=!0;this.renderGridLine(n,t,m);this.renderMark(g,t,m);this.renderLabel(g,n,t,a)},destroy:function(){F(this,this.axis)}}})(L);var T=function(a){var E=a.addEvent,B=a.animObject,F=a.arrayMax,D=a.arrayMin,n=a.color,h=a.correctFloat,u=a.defaultOptions,r=a.defined,x=a.deg2rad,t=a.destroyObjectProperties,m=a.each,f=a.extend,g=a.fireEvent,e=a.format,d=a.getMagnitude,p=a.grep,b=a.inArray,A=a.isArray,v=a.isNumber,H=a.isString,q=a.merge,J=
|
625
|
+
a.normalizeTickInterval,c=a.objectEach,w=a.pick,K=a.removeEvent,y=a.splat,G=a.syncTimeout,l=a.Tick,I=function(){this.init.apply(this,arguments)};a.extend(I.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,
|
626
|
+
startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,
|
627
|
+
formatter:function(){return a.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,z){var k=z.isX,l=this;l.chart=a;l.horiz=
|
628
|
+
a.inverted&&!l.isZAxis?!k:k;l.isXAxis=k;l.coll=l.coll||(k?"xAxis":"yAxis");l.opposite=z.opposite;l.side=z.side||(l.horiz?l.opposite?0:2:l.opposite?1:3);l.setOptions(z);var d=this.options,e=d.type;l.labelFormatter=d.labels.formatter||l.defaultLabelFormatter;l.userOptions=z;l.minPixelPadding=0;l.reversed=d.reversed;l.visible=!1!==d.visible;l.zoomEnabled=!1!==d.zoomEnabled;l.hasNames="category"===e||!0===d.categories;l.categories=d.categories||l.hasNames;l.names=l.names||[];l.plotLinesAndBandsGroups=
|
629
|
+
{};l.isLog="logarithmic"===e;l.isDatetimeAxis="datetime"===e;l.positiveValuesOnly=l.isLog&&!l.allowNegativeLog;l.isLinked=r(d.linkedTo);l.ticks={};l.labelEdge=[];l.minorTicks={};l.plotLinesAndBands=[];l.alternateBands={};l.len=0;l.minRange=l.userMinRange=d.minRange||d.maxZoom;l.range=d.range;l.offset=d.offset||0;l.stacks={};l.oldStacks={};l.stacksTouched=0;l.max=null;l.min=null;l.crosshair=w(d.crosshair,y(a.options.tooltip.crosshairs)[k?0:1],!1);z=l.options.events;-1===b(l,a.axes)&&(k?a.axes.splice(a.xAxis.length,
|
630
|
+
0,l):a.axes.push(l),a[l.coll].push(l));l.series=l.series||[];a.inverted&&!l.isZAxis&&k&&void 0===l.reversed&&(l.reversed=!0);c(z,function(a,k){E(l,k,a)});l.lin2log=d.linearToLogConverter||l.lin2log;l.isLog&&(l.val2lin=l.log2lin,l.lin2val=l.lin2log)},setOptions:function(a){this.options=q(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],q(u[this.coll],a))},
|
631
|
+
defaultLabelFormatter:function(){var k=this.axis,c=this.value,b=k.categories,l=this.dateTimeLabelFormat,d=u.lang,f=d.numericSymbols,d=d.numericSymbolMagnitude||1E3,y=f&&f.length,p,g=k.options.labels.format,k=k.isLog?Math.abs(c):k.tickInterval;if(g)p=e(g,this);else if(b)p=c;else if(l)p=a.dateFormat(l,c);else if(y&&1E3<=k)for(;y--&&void 0===p;)b=Math.pow(d,y+1),k>=b&&0===10*c%b&&null!==f[y]&&0!==c&&(p=a.numberFormat(c/b,-1)+f[y]);void 0===p&&(p=1E4<=Math.abs(c)?a.numberFormat(c,-1):a.numberFormat(c,
|
632
|
+
-1,void 0,""));return p},getSeriesExtremes:function(){var a=this,c=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();m(a.series,function(k){if(k.visible||!c.options.chart.ignoreHiddenSeries){var b=k.options,l=b.threshold,z;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=l&&(l=null);if(a.isXAxis)b=k.xData,b.length&&(k=D(b),v(k)||k instanceof Date||(b=p(b,function(a){return v(a)}),k=D(b)),a.dataMin=Math.min(w(a.dataMin,b[0]),
|
633
|
+
k),a.dataMax=Math.max(w(a.dataMax,b[0]),F(b)));else if(k.getExtremes(),z=k.dataMax,k=k.dataMin,r(k)&&r(z)&&(a.dataMin=Math.min(w(a.dataMin,k),k),a.dataMax=Math.max(w(a.dataMax,z),z)),r(l)&&(a.threshold=l),!b.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,c,b,l,d,e){var k=this.linkedParent||this,z=1,f=0,y=l?k.oldTransA:k.transA;l=l?k.oldMin:k.min;var p=k.minPixelPadding;d=(k.isOrdinal||k.isBroken||k.isLog&&d)&&k.lin2val;y||(y=k.transA);b&&(z*=-1,f=k.len);k.reversed&&
|
634
|
+
(z*=-1,f-=z*(k.sector||k.len));c?(a=(a*z+f-p)/y+l,d&&(a=k.lin2val(a))):(d&&(a=k.val2lin(a)),a=z*(a-l)*y+f+z*p+(v(e)?y*e:0));return a},toPixels:function(a,c){return this.translate(a,!1,!this.horiz,null,!0)+(c?0:this.pos)},toValue:function(a,c){return this.translate(a-(c?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,c,b,l,d){var k=this.chart,z=this.left,e=this.top,f,y,p=b&&k.oldChartHeight||k.chartHeight,g=b&&k.oldChartWidth||k.chartWidth,q;f=this.transB;var G=function(a,k,c){if(a<
|
635
|
+
k||a>c)l?a=Math.min(Math.max(k,a),c):q=!0;return a};d=w(d,this.translate(a,null,null,b));a=b=Math.round(d+f);f=y=Math.round(p-d-f);v(d)?this.horiz?(f=e,y=p-this.bottom,a=b=G(a,z,z+this.width)):(a=z,b=g-this.right,f=y=G(f,e,e+this.height)):q=!0;return q&&!l?null:k.renderer.crispLine(["M",a,f,"L",b,y],c||1)},getLinearTickPositions:function(a,c,b){var k,l=h(Math.floor(c/a)*a);b=h(Math.ceil(b/a)*a);var z=[];if(this.single)return[c];for(c=l;c<=b;){z.push(c);c=h(c+a);if(c===k)break;k=c}return z},getMinorTickPositions:function(){var a=
|
636
|
+
this,c=a.options,b=a.tickPositions,l=a.minorTickInterval,d=[],e=a.pointRangePadding||0,f=a.min-e,e=a.max+e,y=e-f;if(y&&y/l<a.len/3)if(a.isLog)m(this.paddedTicks,function(k,c,b){c&&d.push.apply(d,a.getLogTickPositions(l,b[c-1],b[c],!0))});else if(a.isDatetimeAxis&&"auto"===c.minorTickInterval)d=d.concat(a.getTimeTicks(a.normalizeTimeTickInterval(l),f,e,c.startOfWeek));else for(c=f+(b[0]-f)%l;c<=e&&c!==d[0];c+=l)d.push(c);0!==d.length&&a.trimTicks(d);return d},adjustForMinRange:function(){var a=this.options,
|
637
|
+
c=this.min,b=this.max,l,d,e,f,y,p,g,v;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(r(a.min)||r(a.max)?this.minRange=null:(m(this.series,function(a){p=a.xData;for(f=g=a.xIncrement?1:p.length-1;0<f;f--)if(y=p[f]-p[f-1],void 0===e||y<e)e=y}),this.minRange=Math.min(5*e,this.dataMax-this.dataMin)));b-c<this.minRange&&(d=this.dataMax-this.dataMin>=this.minRange,v=this.minRange,l=(v-b+c)/2,l=[c-l,w(a.min,c-l)],d&&(l[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),c=F(l),b=[c+v,w(a.max,c+v)],
|
638
|
+
d&&(b[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),b=D(b),b-c<v&&(l[0]=b-v,l[1]=w(a.min,b-v),c=F(l)));this.min=c;this.max=b},getClosest:function(){var a;this.categories?a=1:m(this.series,function(k){var c=k.closestPointRange,b=k.visible||!k.chart.options.chart.ignoreHiddenSeries;!k.noSharedTooltip&&r(c)&&b&&(a=r(a)?Math.min(a,c):c)});return a},nameToX:function(a){var k=A(this.categories),c=k?this.categories:this.names,l=a.options.x,d;a.series.requireSorting=!1;r(l)||(l=!1===this.options.uniqueNames?
|
639
|
+
a.series.autoIncrement():b(a.name,c));-1===l?k||(d=c.length):d=l;void 0!==d&&(this.names[d]=a.name);return d},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=this.userMinRange,m(this.series||[],function(k){k.xIncrement=null;if(!k.points||k.isDirtyData)k.processData(),k.generatePoints();m(k.points,function(c,b){var l;c.options&&(l=a.nameToX(c),void 0!==l&&l!==c.x&&(c.x=l,k.xData[b]=l))})}))},setAxisTranslation:function(a){var k=this,c=k.max-k.min,b=k.axisPointRange||
|
640
|
+
0,l,d=0,e=0,f=k.linkedParent,y=!!k.categories,p=k.transA,g=k.isXAxis;if(g||y||b)l=k.getClosest(),f?(d=f.minPointOffset,e=f.pointRangePadding):m(k.series,function(a){var c=y?1:g?w(a.options.pointRange,l,0):k.axisPointRange||0;a=a.options.pointPlacement;b=Math.max(b,c);k.single||(d=Math.max(d,H(a)?0:c/2),e=Math.max(e,"on"===a?0:c))}),f=k.ordinalSlope&&l?k.ordinalSlope/l:1,k.minPointOffset=d*=f,k.pointRangePadding=e*=f,k.pointRange=Math.min(b,c),g&&(k.closestPointRange=l);a&&(k.oldTransA=p);k.translationSlope=
|
641
|
+
k.transA=p=k.options.staticScale||k.len/(c+e||1);k.transB=k.horiz?k.left:k.bottom;k.minPixelPadding=p*d},minFromRange:function(){return this.max-this.range},setTickInterval:function(k){var c=this,b=c.chart,l=c.options,e=c.isLog,f=c.log2lin,y=c.isDatetimeAxis,p=c.isXAxis,q=c.isLinked,G=l.maxPadding,I=l.minPadding,A=l.tickInterval,H=l.tickPixelInterval,n=c.categories,K=c.threshold,t=c.softThreshold,u,x,B,D;y||n||q||this.getTickAmount();B=w(c.userMin,l.min);D=w(c.userMax,l.max);q?(c.linkedParent=b[c.coll][l.linkedTo],
|
642
|
+
b=c.linkedParent.getExtremes(),c.min=w(b.min,b.dataMin),c.max=w(b.max,b.dataMax),l.type!==c.linkedParent.options.type&&a.error(11,1)):(!t&&r(K)&&(c.dataMin>=K?(u=K,I=0):c.dataMax<=K&&(x=K,G=0)),c.min=w(B,u,c.dataMin),c.max=w(D,x,c.dataMax));e&&(c.positiveValuesOnly&&!k&&0>=Math.min(c.min,w(c.dataMin,c.min))&&a.error(10,1),c.min=h(f(c.min),15),c.max=h(f(c.max),15));c.range&&r(c.max)&&(c.userMin=c.min=B=Math.max(c.min,c.minFromRange()),c.userMax=D=c.max,c.range=null);g(c,"foundExtremes");c.beforePadding&&
|
643
|
+
c.beforePadding();c.adjustForMinRange();!(n||c.axisPointRange||c.usePercentage||q)&&r(c.min)&&r(c.max)&&(f=c.max-c.min)&&(!r(B)&&I&&(c.min-=f*I),!r(D)&&G&&(c.max+=f*G));v(l.softMin)&&(c.min=Math.min(c.min,l.softMin));v(l.softMax)&&(c.max=Math.max(c.max,l.softMax));v(l.floor)&&(c.min=Math.max(c.min,l.floor));v(l.ceiling)&&(c.max=Math.min(c.max,l.ceiling));t&&r(c.dataMin)&&(K=K||0,!r(B)&&c.min<K&&c.dataMin>=K?c.min=K:!r(D)&&c.max>K&&c.dataMax<=K&&(c.max=K));c.tickInterval=c.min===c.max||void 0===c.min||
|
644
|
+
void 0===c.max?1:q&&!A&&H===c.linkedParent.options.tickPixelInterval?A=c.linkedParent.tickInterval:w(A,this.tickAmount?(c.max-c.min)/Math.max(this.tickAmount-1,1):void 0,n?1:(c.max-c.min)*H/Math.max(c.len,H));p&&!k&&m(c.series,function(a){a.processData(c.min!==c.oldMin||c.max!==c.oldMax)});c.setAxisTranslation(!0);c.beforeSetTickPositions&&c.beforeSetTickPositions();c.postProcessTickInterval&&(c.tickInterval=c.postProcessTickInterval(c.tickInterval));c.pointRange&&!A&&(c.tickInterval=Math.max(c.pointRange,
|
645
|
+
c.tickInterval));k=w(l.minTickInterval,c.isDatetimeAxis&&c.closestPointRange);!A&&c.tickInterval<k&&(c.tickInterval=k);y||e||A||(c.tickInterval=J(c.tickInterval,null,d(c.tickInterval),w(l.allowDecimals,!(.5<c.tickInterval&&5>c.tickInterval&&1E3<c.max&&9999>c.max)),!!this.tickAmount));this.tickAmount||(c.tickInterval=c.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,c,b=a.tickPositions,l=a.tickPositioner,d=a.startOnTick,e=a.endOnTick;this.tickmarkOffset=this.categories&&
|
646
|
+
"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.single=this.min===this.max&&r(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=c=b&&b.slice();!c&&(c=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,
|
647
|
+
!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),c.length>this.len&&(c=[c[0],c.pop()]),this.tickPositions=c,l&&(l=l.apply(this,[this.min,this.max])))&&(this.tickPositions=c=l);this.paddedTicks=c.slice(0);this.trimTicks(c,d,e);this.isLinked||(this.single&&(this.min-=.5,this.max+=.5),b||l||this.adjustTickAmount())},trimTicks:function(a,c,b){var k=a[0],l=a[a.length-1],d=this.minPointOffset||0;if(!this.isLinked){if(c&&
|
648
|
+
-Infinity!==k)this.min=k;else for(;this.min-d>a[0];)a.shift();if(b)this.max=l;else for(;this.max+d<a[a.length-1];)a.pop();0===a.length&&r(k)&&a.push((l+k)/2)}},alignToOthers:function(){var a={},c,b=this.options;!1===this.chart.options.chart.alignTicks||!1===b.alignTicks||this.isLog||m(this.chart[this.coll],function(k){var b=k.options,b=[k.horiz?b.left:b.top,b.width,b.height,b.pane].join();k.series.length&&(a[b]?c=!0:a[b]=1)});return c},getTickAmount:function(){var a=this.options,c=a.tickAmount,b=
|
649
|
+
a.tickPixelInterval;!r(a.tickInterval)&&this.len<b&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(c=2);!c&&this.alignToOthers()&&(c=Math.ceil(this.len/b)+1);4>c&&(this.finalTickAmt=c,c=5);this.tickAmount=c},adjustTickAmount:function(){var a=this.tickInterval,c=this.tickPositions,b=this.tickAmount,l=this.finalTickAmt,d=c&&c.length;if(d<b){for(;c.length<b;)c.push(h(c[c.length-1]+a));this.transA*=(d-1)/(b-1);this.max=c[c.length-1]}else d>b&&(this.tickInterval*=2,this.setTickPositions());
|
650
|
+
if(r(l)){for(a=b=c.length;a--;)(3===l&&1===a%2||2>=l&&0<a&&a<b-1)&&c.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,c;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();c=this.len!==this.oldAxisLength;m(this.series,function(c){if(c.isDirtyData||c.isDirty||c.xAxis.isDirty)a=!0});c||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=
|
651
|
+
!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=c||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,c,b,l,d){var k=this,e=k.chart;b=w(b,!0);m(k.series,function(a){delete a.kdTree});d=f(d,{min:a,max:c});g(k,"setExtremes",d,function(){k.userMin=a;k.userMax=c;k.eventArgs=d;b&&e.redraw(l)})},zoom:function(a,c){var k=this.dataMin,b=this.dataMax,l=this.options,
|
652
|
+
d=Math.min(k,w(l.min,k)),l=Math.max(b,w(l.max,b));if(a!==this.min||c!==this.max)this.allowZoomOutside||(r(k)&&(a<d&&(a=d),a>l&&(a=l)),r(b)&&(c<d&&(c=d),c>l&&(c=l))),this.displayBtn=void 0!==a||void 0!==c,this.setExtremes(a,c,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,c=this.options,b=c.offsets||[0,0,0,0],l=this.horiz,d=w(c.width,a.plotWidth-b[3]+b[1]),e=w(c.height,a.plotHeight-b[0]+b[2]),f=w(c.top,a.plotTop+b[0]),c=w(c.left,a.plotLeft+b[3]),b=/%$/;b.test(e)&&(e=
|
653
|
+
Math.round(parseFloat(e)/100*a.plotHeight));b.test(f)&&(f=Math.round(parseFloat(f)/100*a.plotHeight+a.plotTop));this.left=c;this.top=f;this.width=d;this.height=e;this.bottom=a.chartHeight-e-f;this.right=a.chartWidth-d-c;this.len=Math.max(l?d:e,0);this.pos=l?c:f},getExtremes:function(){var a=this.isLog,c=this.lin2log;return{min:a?h(c(this.min)):this.min,max:a?h(c(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var c=
|
654
|
+
this.isLog,k=this.lin2log,b=c?k(this.min):this.min,c=c?k(this.max):this.max;null===a?a=b:b>a?a=b:c<a&&(a=c);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a=(w(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var c=this.options,k=c[a+"Length"],b=w(c[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(b&&k)return"inside"===c[a+"Position"]&&(k=-k),[k,b]},labelMetrics:function(){var a=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&
|
655
|
+
this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,c=this.horiz,b=this.tickInterval,l=b,d=this.len/(((this.categories?1:0)+this.max-this.min)/b),e,f=a.rotation,y=this.labelMetrics(),p,g=Number.MAX_VALUE,v,q=function(a){a/=d||1;a=1<a?Math.ceil(a):1;return a*b};c?(v=!a.staggerLines&&!a.step&&(r(f)?[f]:d<w(a.autoRotationLimit,80)&&a.autoRotation))&&m(v,function(a){var c;if(a===f||a&&-90<=a&&90>=a)p=q(Math.abs(y.h/Math.sin(x*a))),c=p+
|
656
|
+
Math.abs(a/360),c<g&&(g=c,e=a,l=p)}):a.step||(l=q(y.h));this.autoRotation=v;this.labelRotation=w(e,f);return l},getSlotWidth:function(){var a=this.chart,c=this.horiz,b=this.options.labels,l=Math.max(this.tickPositions.length-(this.categories?0:1),1),d=a.margin[3];return c&&2>(b.step||0)&&!b.rotation&&(this.staggerLines||1)*this.len/l||!c&&(d&&d-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,c=a.renderer,b=this.tickPositions,l=this.ticks,d=this.options.labels,e=this.horiz,
|
657
|
+
f=this.getSlotWidth(),y=Math.max(1,Math.round(f-2*(d.padding||5))),p={},g=this.labelMetrics(),v=d.style&&d.style.textOverflow,G,w=0,I,A;H(d.rotation)||(p.rotation=d.rotation||0);m(b,function(a){(a=l[a])&&a.labelLength>w&&(w=a.labelLength)});this.maxLabelLength=w;if(this.autoRotation)w>y&&w>g.h?p.rotation=this.labelRotation:this.labelRotation=0;else if(f&&(G={width:y+"px"},!v))for(G.textOverflow="clip",I=b.length;!e&&I--;)if(A=b[I],y=l[A].label)y.styles&&"ellipsis"===y.styles.textOverflow?y.css({textOverflow:"clip"}):
|
658
|
+
l[A].labelLength>f&&y.css({width:f+"px"}),y.getBBox().height>this.len/b.length-(g.h-g.f)&&(y.specCss={textOverflow:"ellipsis"});p.rotation&&(G={width:(w>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},v||(G.textOverflow="ellipsis"));if(this.labelAlign=d.align||this.autoLabelAlign(this.labelRotation))p.align=this.labelAlign;m(b,function(a){var c=(a=l[a])&&a.label;c&&(c.attr(p),G&&c.css(q(G,c.specCss)),delete c.specCss,a.rotation=p.rotation)});this.tickRotCorr=c.rotCorr(g.b,this.labelRotation||
|
659
|
+
0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||r(this.min)&&r(this.max)&&!!this.tickPositions},addTitle:function(a){var c=this.chart.renderer,k=this.horiz,b=this.opposite,l=this.options.title,d;this.axisTitle||((d=l.textAlign)||(d=(k?{low:"left",middle:"center",high:"right"}:{low:b?"right":"left",middle:"center",high:b?"left":"right"})[l.align]),this.axisTitle=c.text(l.text,0,0,l.useHTML).attr({zIndex:7,rotation:l.rotation||0,align:d}).addClass("highcharts-axis-title").css(l.style).add(this.axisGroup),
|
660
|
+
this.axisTitle.isNew=!0);this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var c=this.ticks;c[a]?c[a].addLabel():c[a]=new l(this,a)},getOffset:function(){var a=this,b=a.chart,l=b.renderer,d=a.options,e=a.tickPositions,f=a.ticks,y=a.horiz,p=a.side,g=b.inverted&&!a.isZAxis?[1,0,3,2][p]:p,v,q,G=0,I,A=0,h=d.title,H=d.labels,n=0,K=b.axisOffset,b=b.clipOffset,J=[-1,1,1,-1][p],t=d.className,u=a.axisParent,x=this.tickSize("tick");v=a.hasData();a.showAxis=q=v||w(d.showEmpty,!0);a.staggerLines=
|
661
|
+
a.horiz&&H.staggerLines;a.axisGroup||(a.gridGroup=l.g("grid").attr({zIndex:d.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(t||"")).add(u),a.axisGroup=l.g("axis").attr({zIndex:d.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(t||"")).add(u),a.labelGroup=l.g("axis-labels").attr({zIndex:H.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(t||"")).add(u));v||a.isLinked?(m(e,function(c,b){a.generateTick(c,b)}),a.renderUnsquish(),!1===H.reserveSpace||
|
662
|
+
0!==p&&2!==p&&{1:"left",3:"right"}[p]!==a.labelAlign&&"center"!==a.labelAlign||m(e,function(a){n=Math.max(f[a].getLabelSize(),n)}),a.staggerLines&&(n*=a.staggerLines,a.labelOffset=n*(a.opposite?-1:1))):c(f,function(a,c){a.destroy();delete f[c]});h&&h.text&&!1!==h.enabled&&(a.addTitle(q),q&&!1!==h.reserveSpace&&(a.titleOffset=G=a.axisTitle.getBBox()[y?"height":"width"],I=h.offset,A=r(I)?0:w(h.margin,y?5:10)));a.renderLine();a.offset=J*w(d.offset,K[p]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};l=0===p?
|
663
|
+
-a.labelMetrics().h:2===p?a.tickRotCorr.y:0;A=Math.abs(n)+A;n&&(A=A-l+J*(y?w(H.y,a.tickRotCorr.y+8*J):H.x));a.axisTitleMargin=w(I,A);K[p]=Math.max(K[p],a.axisTitleMargin+G+J*a.offset,A,v&&e.length&&x?x[0]+J*a.offset:0);e=2*Math.floor(a.axisLine.strokeWidth()/2);0<d.offset&&(e-=2*d.offset);b[g]=Math.max(b[g]||e,e)},getLinePath:function(a){var c=this.chart,b=this.opposite,k=this.offset,l=this.horiz,d=this.left+(b?this.width:0)+k,k=c.chartHeight-this.bottom-(b?this.height:0)+k;b&&(a*=-1);return c.renderer.crispLine(["M",
|
664
|
+
l?this.left:d,l?k:this.top,"L",l?c.chartWidth-this.right:d,l?k:c.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,c=this.left,b=this.top,l=this.len,d=this.options.title,e=a?c:b,f=this.opposite,y=this.offset,p=d.x||0,g=d.y||0,v=this.chart.renderer.fontMetrics(d.style&&
|
665
|
+
d.style.fontSize,this.axisTitle).f,l={low:e+(a?0:l),middle:e+l/2,high:e+(a?l:0)}[d.align],c=(a?b+this.height:c)+(a?1:-1)*(f?-1:1)*this.axisTitleMargin+(2===this.side?v:0);return{x:a?l+p:c+(f?this.width:0)+y+p,y:a?c+g-(f?this.height:0)+y:l+g}},renderMinorTick:function(a){var c=this.chart.hasRendered&&v(this.oldMin),b=this.minorTicks;b[a]||(b[a]=new l(this,a,"minor"));c&&b[a].isNew&&b[a].render(null,!0);b[a].render(null,!1,1)},renderTick:function(a,c){var b=this.isLinked,k=this.ticks,d=this.chart.hasRendered&&
|
666
|
+
v(this.oldMin);if(!b||a>=this.min&&a<=this.max)k[a]||(k[a]=new l(this,a)),d&&k[a].isNew&&k[a].render(c,!0,.1),k[a].render(c)},render:function(){var b=this,d=b.chart,e=b.options,f=b.isLog,y=b.lin2log,p=b.isLinked,g=b.tickPositions,q=b.axisTitle,w=b.ticks,I=b.minorTicks,A=b.alternateBands,h=e.stackLabels,H=e.alternateGridColor,n=b.tickmarkOffset,K=b.axisLine,J=b.showAxis,r=B(d.renderer.globalAnimation),t,u;b.labelEdge.length=0;b.overlap=!1;m([w,I,A],function(a){c(a,function(a){a.isActive=!1})});if(b.hasData()||
|
667
|
+
p)b.minorTickInterval&&!b.categories&&m(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),g.length&&(m(g,function(a,c){b.renderTick(a,c)}),n&&(0===b.min||b.single)&&(w[-1]||(w[-1]=new l(b,-1,null,!0)),w[-1].render(-1))),H&&m(g,function(c,l){u=void 0!==g[l+1]?g[l+1]+n:b.max-n;0===l%2&&c<b.max&&u<=b.max+(d.polar?-n:n)&&(A[c]||(A[c]=new a.PlotLineOrBand(b)),t=c+n,A[c].options={from:f?y(t):t,to:f?y(u):u,color:H},A[c].render(),A[c].isActive=!0)}),b._addedPlotLB||(m((e.plotLines||[]).concat(e.plotBands||
|
668
|
+
[]),function(a){b.addPlotBandOrLine(a)}),b._addedPlotLB=!0);m([w,I,A],function(a){var b,l=[],k=r.duration;c(a,function(a,c){a.isActive||(a.render(c,!1,0),a.isActive=!1,l.push(c))});G(function(){for(b=l.length;b--;)a[l[b]]&&!a[l[b]].isActive&&(a[l[b]].destroy(),delete a[l[b]])},a!==A&&d.hasRendered&&k?k:0)});K&&(K[K.isPlaced?"animate":"attr"]({d:this.getLinePath(K.strokeWidth())}),K.isPlaced=!0,K[J?"show":"hide"](!0));q&&J&&(e=b.getTitlePosition(),v(e.y)?(q[q.isNew?"attr":"animate"](e),q.isNew=!1):
|
669
|
+
(q.attr("y",-9999),q.isNew=!0));h&&h.enabled&&b.renderStackTotals();b.isDirty=!1},redraw:function(){this.visible&&(this.render(),m(this.plotLinesAndBands,function(a){a.render()}));m(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var l=this,k=l.stacks,d=l.plotLinesAndBands,e;a||K(l);c(k,function(a,c){t(a);k[c]=null});m([l.ticks,l.minorTicks,l.alternateBands],function(a){t(a)});if(d)for(a=d.length;a--;)d[a].destroy();m("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),
|
670
|
+
function(a){l[a]&&(l[a]=l[a].destroy())});for(e in l.plotLinesAndBandsGroups)l.plotLinesAndBandsGroups[e]=l.plotLinesAndBandsGroups[e].destroy();c(l,function(a,c){-1===b(c,l.keepProps)&&delete l[c]})},drawCrosshair:function(a,c){var b,l=this.crosshair,k=w(l.snap,!0),d,e=this.cross;a||(a=this.cross&&this.cross.e);this.crosshair&&!1!==(r(c)||!k)?(k?r(c)&&(d=this.isXAxis?c.plotX:this.len-c.plotY):d=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),r(d)&&(b=this.getPlotLinePath(c&&(this.isXAxis?
|
671
|
+
c.x:w(c.stackY,c.y)),null,null,null,d)||null),r(b)?(c=this.categories&&!this.isRadial,e||(this.cross=e=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(c?"category ":"thin ")+l.className).attr({zIndex:w(l.zIndex,2)}).add(),e.attr({stroke:l.color||(c?n("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":w(l.width,1)}),l.dashStyle&&e.attr({dashstyle:l.dashStyle})),e.show().attr({d:b}),c&&!l.width&&e.attr({"stroke-width":this.transA}),this.cross.e=a):this.hideCrosshair()):
|
672
|
+
this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}});return a.Axis=I}(L);(function(a){var E=a.Axis,B=a.Date,F=a.dateFormat,D=a.defaultOptions,n=a.defined,h=a.each,u=a.extend,r=a.getMagnitude,x=a.getTZOffset,t=a.normalizeTickInterval,m=a.pick,f=a.timeUnits;E.prototype.getTimeTicks=function(a,e,d,p){var b=[],g={},v=D.global.useUTC,H,q=new B(e-Math.max(x(e),x(d))),J=B.hcMakeTime,c=a.unitRange,w=a.count,K;if(n(e)){q[B.hcSetMilliseconds](c>=f.second?0:w*Math.floor(q.getMilliseconds()/
|
673
|
+
w));if(c>=f.second)q[B.hcSetSeconds](c>=f.minute?0:w*Math.floor(q.getSeconds()/w));if(c>=f.minute)q[B.hcSetMinutes](c>=f.hour?0:w*Math.floor(q[B.hcGetMinutes]()/w));if(c>=f.hour)q[B.hcSetHours](c>=f.day?0:w*Math.floor(q[B.hcGetHours]()/w));if(c>=f.day)q[B.hcSetDate](c>=f.month?1:w*Math.floor(q[B.hcGetDate]()/w));c>=f.month&&(q[B.hcSetMonth](c>=f.year?0:w*Math.floor(q[B.hcGetMonth]()/w)),H=q[B.hcGetFullYear]());if(c>=f.year)q[B.hcSetFullYear](H-H%w);if(c===f.week)q[B.hcSetDate](q[B.hcGetDate]()-q[B.hcGetDay]()+
|
674
|
+
m(p,1));H=q[B.hcGetFullYear]();p=q[B.hcGetMonth]();var y=q[B.hcGetDate](),G=q[B.hcGetHours]();if(B.hcTimezoneOffset||B.hcGetTimezoneOffset)K=(!v||!!B.hcGetTimezoneOffset)&&(d-e>4*f.month||x(e)!==x(d)),q=q.getTime(),q=new B(q+x(q));v=q.getTime();for(e=1;v<d;)b.push(v),v=c===f.year?J(H+e*w,0):c===f.month?J(H,p+e*w):!K||c!==f.day&&c!==f.week?K&&c===f.hour?J(H,p,y,G+e*w):v+c*w:J(H,p,y+e*w*(c===f.day?1:7)),e++;b.push(v);c<=f.hour&&1E4>b.length&&h(b,function(a){0===a%18E5&&"000000000"===F("%H%M%S%L",a)&&
|
675
|
+
(g[a]="day")})}b.info=u(a,{higherRanks:g,totalRange:c*w});return b};E.prototype.normalizeTimeTickInterval=function(a,e){var d=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];e=d[d.length-1];var p=f[e[0]],b=e[1],g;for(g=0;g<d.length&&!(e=d[g],p=f[e[0]],b=e[1],d[g+1]&&a<=(p*b[b.length-1]+f[d[g+1][0]])/2);g++);p===f.year&&a<5*p&&(b=[1,2,5]);a=t(a/p,b,
|
676
|
+
"year"===e[0]?Math.max(r(a/p),1):1);return{unitRange:p,count:a,unitName:e[0]}}})(L);(function(a){var E=a.Axis,B=a.getMagnitude,F=a.map,D=a.normalizeTickInterval,n=a.pick;E.prototype.getLogTickPositions=function(a,u,r,x){var h=this.options,m=this.len,f=this.lin2log,g=this.log2lin,e=[];x||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),e=this.getLinearTickPositions(a,u,r);else if(.08<=a)for(var m=Math.floor(u),d,p,b,A,v,h=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];m<r+1&&!v;m++)for(p=
|
677
|
+
h.length,d=0;d<p&&!v;d++)b=g(f(m)*h[d]),b>u&&(!x||A<=r)&&void 0!==A&&e.push(A),A>r&&(v=!0),A=b;else u=f(u),r=f(r),a=h[x?"minorTickInterval":"tickInterval"],a=n("auto"===a?null:a,this._minorAutoInterval,h.tickPixelInterval/(x?5:1)*(r-u)/((x?m/this.tickPositions.length:m)||1)),a=D(a,null,B(a)),e=F(this.getLinearTickPositions(a,u,r),g),x||(this._minorAutoInterval=a/5);x||(this.tickInterval=a);return e};E.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};E.prototype.lin2log=function(a){return Math.pow(10,
|
678
|
+
a)}})(L);(function(a,E){var B=a.arrayMax,F=a.arrayMin,D=a.defined,n=a.destroyObjectProperties,h=a.each,u=a.erase,r=a.merge,x=a.pick;a.PlotLineOrBand=function(a,m){this.axis=a;m&&(this.options=m,this.id=m.id)};a.PlotLineOrBand.prototype={render:function(){var h=this,m=h.axis,f=m.horiz,g=h.options,e=g.label,d=h.label,p=g.to,b=g.from,A=g.value,v=D(b)&&D(p),H=D(A),q=h.svgElem,n=!q,c=[],w=g.color,K=x(g.zIndex,0),y=g.events,c={"class":"highcharts-plot-"+(v?"band ":"line ")+(g.className||"")},G={},l=m.chart.renderer,
|
679
|
+
I=v?"bands":"lines",k=m.log2lin;m.isLog&&(b=k(b),p=k(p),A=k(A));H?(c={stroke:w,"stroke-width":g.width},g.dashStyle&&(c.dashstyle=g.dashStyle)):v&&(w&&(c.fill=w),g.borderWidth&&(c.stroke=g.borderColor,c["stroke-width"]=g.borderWidth));G.zIndex=K;I+="-"+K;(w=m.plotLinesAndBandsGroups[I])||(m.plotLinesAndBandsGroups[I]=w=l.g("plot-"+I).attr(G).add());n&&(h.svgElem=q=l.path().attr(c).add(w));if(H)c=m.getPlotLinePath(A,q.strokeWidth());else if(v)c=m.getPlotBandPath(b,p,g);else return;n&&c&&c.length?(q.attr({d:c}),
|
680
|
+
y&&a.objectEach(y,function(a,c){q.on(c,function(a){y[c].apply(h,[a])})})):q&&(c?(q.show(),q.animate({d:c})):(q.hide(),d&&(h.label=d=d.destroy())));e&&D(e.text)&&c&&c.length&&0<m.width&&0<m.height&&!c.flat?(e=r({align:f&&v&&"center",x:f?!v&&4:10,verticalAlign:!f&&v&&"middle",y:f?v?16:10:v?6:-4,rotation:f&&!v&&90},e),this.renderLabel(e,c,v,K)):d&&d.hide();return h},renderLabel:function(a,m,f,g){var e=this.label,d=this.axis.chart.renderer;e||(e={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+
|
681
|
+
(f?"band":"line")+"-label "+(a.className||"")},e.zIndex=g,this.label=e=d.text(a.text,0,0,a.useHTML).attr(e).add(),e.css(a.style));g=[m[1],m[4],f?m[6]:m[1]];m=[m[2],m[5],f?m[7]:m[2]];f=F(g);d=F(m);e.align(a,!1,{x:f,y:d,width:B(g)-f,height:B(m)-d});e.show()},destroy:function(){u(this.axis.plotLinesAndBands,this);delete this.axis;n(this)}};a.extend(E.prototype,{getPlotBandPath:function(a,m){var f=this.getPlotLinePath(m,null,null,!0),g=this.getPlotLinePath(a,null,null,!0),e=this.horiz,d=1;a=a<this.min&&
|
682
|
+
m<this.min||a>this.max&&m>this.max;g&&f?(a&&(g.flat=g.toString()===f.toString(),d=0),g.push(e&&f[4]===g[4]?f[4]+d:f[4],e||f[5]!==g[5]?f[5]:f[5]+d,e&&f[1]===g[1]?f[1]+d:f[1],e||f[2]!==g[2]?f[2]:f[2]+d)):g=null;return g},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(h,m){var f=(new a.PlotLineOrBand(this,h)).render(),g=this.userOptions;f&&(m&&(g[m]=g[m]||[],g[m].push(h)),this.plotLinesAndBands.push(f));
|
683
|
+
return f},removePlotBandOrLine:function(a){for(var m=this.plotLinesAndBands,f=this.options,g=this.userOptions,e=m.length;e--;)m[e].id===a&&m[e].destroy();h([f.plotLines||[],g.plotLines||[],f.plotBands||[],g.plotBands||[]],function(d){for(e=d.length;e--;)d[e].id===a&&u(d,d[e])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(L,T);(function(a){var E=a.dateFormat,B=a.each,F=a.extend,D=a.format,n=a.isNumber,h=a.map,u=a.merge,r=a.pick,
|
684
|
+
x=a.splat,t=a.syncTimeout,m=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype={init:function(a,g){this.chart=a;this.options=g;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=g.split&&!a.inverted;this.shared=g.shared||this.split},cleanSplit:function(a){B(this.chart.series,function(f){var e=f&&f.tt;e&&(!e.isActive||a?f.tt=e.destroy():e.isActive=!1)})},getLabel:function(){var a=this.chart.renderer,g=this.options;this.label||(this.split?this.label=
|
685
|
+
a.g("tooltip"):(this.label=a.label("",0,0,g.shape||"callout",null,null,g.useHTML,null,"tooltip").attr({padding:g.padding,r:g.borderRadius}),this.label.attr({fill:g.backgroundColor,"stroke-width":g.borderWidth}).css(g.style).shadow(g.shadow)),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();u(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,u(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&
|
686
|
+
(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,g,e,d){var f=this,b=f.now,m=!1!==f.options.animation&&!f.isHidden&&(1<Math.abs(a-b.x)||1<Math.abs(g-b.y)),v=f.followPointer||1<f.len;F(b,{x:m?(2*b.x+a)/3:a,y:m?(b.y+g)/2:g,anchorX:v?void 0:m?(2*b.anchorX+e)/3:e,anchorY:v?void 0:m?(b.anchorY+d)/2:d});f.getLabel().attr(b);m&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){f&&f.move(a,
|
687
|
+
g,e,d)},32))},hide:function(a){var f=this;clearTimeout(this.hideTimer);a=r(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=t(function(){f.getLabel()[a?"fadeOut":"hide"]();f.isHidden=!0},a))},getAnchor:function(a,g){var e,d=this.chart,f=d.inverted,b=d.plotTop,m=d.plotLeft,v=0,H=0,q,n;a=x(a);e=a[0].tooltipPos;this.followPointer&&g&&(void 0===g.chartX&&(g=d.pointer.normalize(g)),e=[g.chartX-d.plotLeft,g.chartY-b]);e||(B(a,function(a){q=a.series.yAxis;n=a.series.xAxis;v+=a.plotX+(!f&&n?n.left-
|
688
|
+
m:0);H+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!f&&q?q.top-b:0)}),v/=a.length,H/=a.length,e=[f?d.plotWidth-H:v,this.shared&&!f&&1<a.length&&g?g.chartY-b:f?d.plotHeight-v:H]);return h(e,Math.round)},getPosition:function(a,g,e){var d=this.chart,f=this.distance,b={},m=e.h||0,v,h=["y",d.chartHeight,g,e.plotY+d.plotTop,d.plotTop,d.plotTop+d.plotHeight],q=["x",d.chartWidth,a,e.plotX+d.plotLeft,d.plotLeft,d.plotLeft+d.plotWidth],n=!this.followPointer&&r(e.ttBelow,!d.inverted===!!e.negative),c=function(a,
|
689
|
+
c,d,k,e,y){var l=d<k-f,p=k+f+d<c,g=k-f-d;k+=f;if(n&&p)b[a]=k;else if(!n&&l)b[a]=g;else if(l)b[a]=Math.min(y-d,0>g-m?g:g-m);else if(p)b[a]=Math.max(e,k+m+d>c?k:k+m);else return!1},w=function(a,c,d,k){var l;k<f||k>c-f?l=!1:b[a]=k<d/2?1:k>c-d/2?c-d-2:k-d/2;return l},K=function(a){var c=h;h=q;q=c;v=a},y=function(){!1!==c.apply(0,h)?!1!==w.apply(0,q)||v||(K(!0),y()):v?b.x=b.y=0:(K(!0),y())};(d.inverted||1<this.len)&&K();y();return b},defaultFormatter:function(a){var f=this.points||x(this),e;e=[a.tooltipFooterHeaderFormatter(f[0])];
|
690
|
+
e=e.concat(a.bodyFormatter(f));e.push(a.tooltipFooterHeaderFormatter(f[0],!0));return e},refresh:function(a,g){var e,d=this.options,f,b=a,m,v={},h=[];e=d.formatter||this.defaultFormatter;var v=this.shared,q;clearTimeout(this.hideTimer);this.followPointer=x(b)[0].series.tooltipOptions.followPointer;m=this.getAnchor(b,g);g=m[0];f=m[1];!v||b.series&&b.series.noSharedTooltip?v=b.getLabelConfig():(B(b,function(a){a.setState("hover");h.push(a.getLabelConfig())}),v={x:b[0].category,y:b[0].y},v.points=h,
|
691
|
+
b=b[0]);this.len=h.length;v=e.call(v,this);q=b.series;this.distance=r(q.tooltipOptions.distance,16);!1===v?this.hide():(e=this.getLabel(),this.isHidden&&e.attr({opacity:1}).show(),this.split?this.renderSplit(v,a):(d.style.width||e.css({width:this.chart.spacingBox.width}),e.attr({text:v&&v.join?v.join(""):v}),e.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+r(b.colorIndex,q.colorIndex)),e.attr({stroke:d.borderColor||b.color||q.color||"#666666"}),this.updatePosition({plotX:g,plotY:f,
|
692
|
+
negative:b.negative,ttBelow:b.ttBelow,h:m[2]||0})),this.isHidden=!1)},renderSplit:function(f,g){var e=this,d=[],p=this.chart,b=p.renderer,m=!0,v=this.options,h,q=this.getLabel();B(f.slice(0,g.length+1),function(a,c){c=g[c-1]||{isHeader:!0,plotX:g[0].plotX};var f=c.series||e,A=f.tt,y=c.series||{},G="highcharts-color-"+r(c.colorIndex,y.colorIndex,"none");A||(f.tt=A=b.label(null,null,null,"callout").addClass("highcharts-tooltip-box "+G).attr({padding:v.padding,r:v.borderRadius,fill:v.backgroundColor,
|
693
|
+
stroke:c.color||y.color||"#333333","stroke-width":v.borderWidth}).add(q));A.isActive=!0;A.attr({text:a});A.css(v.style);a=A.getBBox();y=a.width+A.strokeWidth();c.isHeader?(h=a.height,y=Math.max(0,Math.min(c.plotX+p.plotLeft-y/2,p.chartWidth-y))):y=c.plotX+p.plotLeft-r(v.distance,16)-y;0>y&&(m=!1);a=(c.series&&c.series.yAxis&&c.series.yAxis.pos)+(c.plotY||0);a-=p.plotTop;d.push({target:c.isHeader?p.plotHeight+h:a,rank:c.isHeader?1:0,size:f.tt.getBBox().height+1,point:c,x:y,tt:A})});this.cleanSplit();
|
694
|
+
a.distribute(d,p.plotHeight+h);B(d,function(a){var c=a.point,b=c.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:m||c.isHeader?a.x:c.plotX+p.plotLeft+r(v.distance,16),y:a.pos+p.plotTop,anchorX:c.isHeader?c.plotX+p.plotLeft:c.plotX+b.xAxis.pos,anchorY:c.isHeader?a.pos+p.plotTop-15:c.plotY+b.yAxis.pos})})},updatePosition:function(a){var f=this.chart,e=this.getLabel(),e=(this.options.positioner||this.getPosition).call(this,e.width,e.height,a);this.move(Math.round(e.x),Math.round(e.y||
|
695
|
+
0),a.plotX+f.plotLeft,a.plotY+f.plotTop)},getDateFormat:function(a,g,e,d){var f=E("%m-%d %H:%M:%S.%L",g),b,A,v={millisecond:15,second:12,minute:9,hour:6,day:3},h="millisecond";for(A in m){if(a===m.week&&+E("%w",g)===e&&"00:00:00.000"===f.substr(6)){A="week";break}if(m[A]>a){A=h;break}if(v[A]&&f.substr(v[A])!=="01-01 00:00:00.000".substr(v[A]))break;"week"!==A&&(h=A)}A&&(b=d[A]);return b},getXDateFormat:function(a,g,e){g=g.dateTimeLabelFormats;var d=e&&e.closestPointRange;return(d?this.getDateFormat(d,
|
696
|
+
a.x,e.options.startOfWeek,g):g.day)||g.year},tooltipFooterHeaderFormatter:function(a,g){var e=g?"footer":"header";g=a.series;var d=g.tooltipOptions,f=d.xDateFormat,b=g.xAxis,m=b&&"datetime"===b.options.type&&n(a.key),e=d[e+"Format"];m&&!f&&(f=this.getXDateFormat(a,d,b));m&&f&&(e=e.replace("{point.key}","{point.key:"+f+"}"));return D(e,{point:a,series:g})},bodyFormatter:function(a){return h(a,function(a){var e=a.series.tooltipOptions;return(e.pointFormatter||a.point.tooltipFormatter).call(a.point,
|
697
|
+
e.pointFormat)})}}})(L);(function(a){var E=a.addEvent,B=a.attr,F=a.charts,D=a.color,n=a.css,h=a.defined,u=a.doc,r=a.each,x=a.extend,t=a.fireEvent,m=a.offset,f=a.pick,g=a.removeEvent,e=a.splat,d=a.Tooltip,p=a.win;a.Pointer=function(a,d){this.init(a,d)};a.Pointer.prototype={init:function(a,e){this.options=e;this.chart=a;this.runChartClick=e.chart.events&&!!e.chart.events.click;this.pinchDown=[];this.lastValidTouch={};d&&e.tooltip.enabled&&(a.tooltip=new d(a,e.tooltip),this.followTouchMove=f(e.tooltip.followTouchMove,
|
698
|
+
!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,d=b.options.chart,e=d.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(e=f(d.pinchType,e));this.zoomX=a=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=a&&!b||e&&b;this.zoomVert=e&&!b||a&&b;this.hasZoom=a||e},normalize:function(a,d){var b,e;a=a||p.event;a.target||(a.target=a.srcElement);e=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;d||(this.chartPosition=d=m(this.chart.container));void 0===e.pageX?(b=Math.max(a.x,
|
699
|
+
a.clientX-d.left),d=a.y):(b=e.pageX-d.left,d=e.pageY-d.top);return x(a,{chartX:Math.round(b),chartY:Math.round(d)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};r(this.chart.axes,function(d){b[d.isXAxis?"xAxis":"yAxis"].push({axis:d,value:d.toValue(a[d.horiz?"chartX":"chartY"])})});return b},getKDPoints:function(a,d,e){var b=[],p,g,c;r(a,function(a){p=a.noSharedTooltip&&d;g=!d&&a.directTouch;a.visible&&!g&&f(a.options.enableMouseTracking,!0)&&(c=a.searchPoint(e,!p&&0>a.options.findNearestPointBy.indexOf("y")))&&
|
700
|
+
c.series&&b.push(c)});b.sort(function(a,c){var b=a.distX-c.distX,e=a.dist-c.dist,l=(c.series.group&&c.series.group.zIndex)-(a.series.group&&a.series.group.zIndex);return 0!==b&&d?b:0!==e?e:0!==l?l:a.series.index>c.series.index?-1:1});if(d&&b[0]&&!b[0].series.noSharedTooltip)for(a=b.length;a--;)(b[a].x!==b[0].x||b[a].series.noSharedTooltip)&&b.splice(a,1);return b},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,d){var b=
|
701
|
+
a.series,e=b.xAxis,b=b.yAxis;if(e&&b)return d?{chartX:e.len+e.pos-a.clientX,chartY:b.len+b.pos-a.plotY}:{chartX:a.clientX+e.pos,chartY:a.plotY+b.pos}},getHoverData:function(b,d,e,f,p,g){var c=b,v=d,c=p?e:[v];f=!(!f||!b);d=v&&!v.stickyTracking;var q=function(a,c){return 0===c},y;f?q=function(a){return a===b}:d?q=function(a){return a.series===v}:c=a.grep(e,function(a){return a.stickyTracking});y=f&&!p?[b]:this.getKDPoints(c,p,g);v=(c=a.find(y,q))&&c.series;f||d||!p||(y=this.getKDPoints(e,p,g));y.sort(function(a,
|
702
|
+
c){return a.series.index-c.series.index});return{hoverPoint:c,hoverSeries:v,hoverPoints:y}},runPointActions:function(b,d){var e=this.chart,p=e.tooltip,g=p?p.shared:!1,m=d||e.hoverPoint,c=m&&m.series||e.hoverSeries;d=this.getHoverData(m,c,e.series,!!d||c&&c.directTouch&&this.isDirectTouch,g,b);var w,h,m=d.hoverPoint;w=(c=d.hoverSeries)&&c.tooltipOptions.followPointer;h=(g=g&&m&&!m.series.noSharedTooltip)?d.hoverPoints:m?[m]:[];if(m&&(m!==e.hoverPoint||p&&p.isHidden)){r(e.hoverPoints||[],function(c){-1===
|
703
|
+
a.inArray(c,h)&&c.setState()});r(h||[],function(a){a.setState("hover")});if(e.hoverSeries!==c)c.onMouseOver();e.hoverPoint&&e.hoverPoint.firePointEvent("mouseOut");m.firePointEvent("mouseOver");e.hoverPoints=h;e.hoverPoint=m;p&&p.refresh(g?h:m,b)}else w&&p&&!p.isHidden&&(c=p.getAnchor([{}],b),p.updatePosition({plotX:c[0],plotY:c[1]}));this.unDocMouseMove||(this.unDocMouseMove=E(u,"mousemove",function(c){var b=F[a.hoverChartIndex];if(b)b.pointer.onDocumentMouseMove(c)}));r(e.axes,function(c){f(c.crosshair.snap,
|
704
|
+
!0)?a.find(h,function(a){return a.series[c.coll]===c})?c.drawCrosshair(b,m):c.hideCrosshair():c.drawCrosshair(b)})},reset:function(a,d){var b=this.chart,f=b.hoverSeries,p=b.hoverPoint,g=b.hoverPoints,c=b.tooltip,m=c&&c.shared?g:p;a&&m&&r(e(m),function(c){c.series.isCartesian&&void 0===c.plotX&&(a=!1)});if(a)c&&m&&(c.refresh(m),p&&(p.setState(p.state,!0),r(b.axes,function(a){a.crosshair&&a.drawCrosshair(null,p)})));else{if(p)p.onMouseOut();g&&r(g,function(a){a.setState()});if(f)f.onMouseOut();c&&c.hide(d);
|
705
|
+
this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());r(b.axes,function(a){a.hideCrosshair()});this.hoverX=b.hoverPoints=b.hoverPoint=null}},scaleGroups:function(a,d){var b=this.chart,e;r(b.series,function(f){e=a||f.getPlotBox();f.xAxis&&f.xAxis.zoomEnabled&&f.group&&(f.group.attr(e),f.markerGroup&&(f.markerGroup.attr(e),f.markerGroup.clip(d?b.clipRect:null)),f.dataLabelsGroup&&f.dataLabelsGroup.attr(e))});b.clipRect.attr(d||b.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=
|
706
|
+
a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,d=b.options.chart,e=a.chartX,f=a.chartY,p=this.zoomHor,c=this.zoomVert,g=b.plotLeft,m=b.plotTop,y=b.plotWidth,G=b.plotHeight,l,I=this.selectionMarker,k=this.mouseDownX,z=this.mouseDownY,h=d.panKey&&a[d.panKey+"Key"];I&&I.touch||(e<g?e=g:e>g+y&&(e=g+y),f<m?f=m:f>m+G&&(f=m+G),this.hasDragged=Math.sqrt(Math.pow(k-e,2)+Math.pow(z-f,2)),10<this.hasDragged&&(l=b.isInsidePlot(k-
|
707
|
+
g,z-m),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&l&&!h&&!I&&(this.selectionMarker=I=b.renderer.rect(g,m,p?1:y,c?1:G,0).attr({fill:d.selectionMarkerFill||D("#335cad").setOpacity(.25).get(),"class":"highcharts-selection-marker",zIndex:7}).add()),I&&p&&(e-=k,I.attr({width:Math.abs(e),x:(0<e?0:e)+k})),I&&c&&(e=f-z,I.attr({height:Math.abs(e),y:(0<e?0:e)+z})),l&&!I&&d.panning&&b.pan(a,d.panning)))},drop:function(a){var b=this,d=this.chart,e=this.hasPinched;if(this.selectionMarker){var f={originalEvent:a,
|
708
|
+
xAxis:[],yAxis:[]},p=this.selectionMarker,c=p.attr?p.attr("x"):p.x,g=p.attr?p.attr("y"):p.y,m=p.attr?p.attr("width"):p.width,y=p.attr?p.attr("height"):p.height,G;if(this.hasDragged||e)r(d.axes,function(l){if(l.zoomEnabled&&h(l.min)&&(e||b[{xAxis:"zoomX",yAxis:"zoomY"}[l.coll]])){var d=l.horiz,k="touchend"===a.type?l.minPixelPadding:0,p=l.toValue((d?c:g)+k),d=l.toValue((d?c+m:g+y)-k);f[l.coll].push({axis:l,min:Math.min(p,d),max:Math.max(p,d)});G=!0}}),G&&t(d,"selection",f,function(a){d.zoom(x(a,e?
|
709
|
+
{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();e&&this.scaleGroups()}d&&(n(d.container,{cursor:d._cursor}),d.cancelClick=10<this.hasDragged,d.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a);this.zoomOption(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(b){F[a.hoverChartIndex]&&F[a.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(a){var b=this.chart,
|
710
|
+
d=this.chartPosition;a=this.normalize(a,d);!d||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var d=F[a.hoverChartIndex];d&&(b.relatedTarget||b.toElement)&&(d.pointer.reset(),d.pointer.chartPosition=null)},onContainerMouseMove:function(b){var d=this.chart;h(a.hoverChartIndex)&&F[a.hoverChartIndex]&&F[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex=d.index);b=this.normalize(b);b.returnValue=!1;
|
711
|
+
"mousedown"===d.mouseIsDown&&this.drag(b);!this.inClass(b.target,"highcharts-tracker")&&!d.isInsidePlot(b.chartX-d.plotLeft,b.chartY-d.plotTop)||d.openMenu||this.runPointActions(b)},inClass:function(a,d){for(var b;a;){if(b=B(a,"class")){if(-1!==b.indexOf(d))return!0;if(-1!==b.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;this.isDirectTouch=!1;if(!(!b||!a||b.stickyTracking||this.inClass(a,"highcharts-tooltip")||
|
712
|
+
this.inClass(a,"highcharts-series-"+b.index)&&this.inClass(a,"highcharts-tracker")))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,d=b.hoverPoint,e=b.plotLeft,f=b.plotTop;a=this.normalize(a);b.cancelClick||(d&&this.inClass(a.target,"highcharts-tracker")?(t(d.series,"click",x(a,{point:d})),b.hoverPoint&&d.firePointEvent("click",a)):(x(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-e,a.chartY-f)&&t(b,"click",a)))},setDOMEvents:function(){var b=this,d=b.chart.container;d.onmousedown=
|
713
|
+
function(a){b.onContainerMouseDown(a)};d.onmousemove=function(a){b.onContainerMouseMove(a)};d.onclick=function(a){b.onContainerClick(a)};E(d,"mouseleave",b.onContainerMouseLeave);1===a.chartCount&&E(u,"mouseup",b.onDocumentMouseUp);a.hasTouch&&(d.ontouchstart=function(a){b.onContainerTouchStart(a)},d.ontouchmove=function(a){b.onContainerTouchMove(a)},1===a.chartCount&&E(u,"touchend",b.onDocumentTouchEnd))},destroy:function(){var b=this;b.unDocMouseMove&&b.unDocMouseMove();g(b.chart.container,"mouseleave",
|
714
|
+
b.onContainerMouseLeave);a.chartCount||(g(u,"mouseup",b.onDocumentMouseUp),g(u,"touchend",b.onDocumentTouchEnd));clearInterval(b.tooltipTimeout);a.objectEach(b,function(a,d){b[d]=null})}}})(L);(function(a){var E=a.charts,B=a.each,F=a.extend,D=a.map,n=a.noop,h=a.pick;F(a.Pointer.prototype,{pinchTranslate:function(a,h,n,t,m,f){this.zoomHor&&this.pinchTranslateDirection(!0,a,h,n,t,m,f);this.zoomVert&&this.pinchTranslateDirection(!1,a,h,n,t,m,f)},pinchTranslateDirection:function(a,h,n,t,m,f,g,e){var d=
|
715
|
+
this.chart,p=a?"x":"y",b=a?"X":"Y",A="chart"+b,v=a?"width":"height",H=d["plot"+(a?"Left":"Top")],q,r,c=e||1,w=d.inverted,K=d.bounds[a?"h":"v"],y=1===h.length,G=h[0][A],l=n[0][A],I=!y&&h[1][A],k=!y&&n[1][A],z;n=function(){!y&&20<Math.abs(G-I)&&(c=e||Math.abs(l-k)/Math.abs(G-I));r=(H-l)/c+G;q=d["plot"+(a?"Width":"Height")]/c};n();h=r;h<K.min?(h=K.min,z=!0):h+q>K.max&&(h=K.max-q,z=!0);z?(l-=.8*(l-g[p][0]),y||(k-=.8*(k-g[p][1])),n()):g[p]=[l,k];w||(f[p]=r-H,f[v]=q);f=w?1/c:c;m[v]=q;m[p]=h;t[w?a?"scaleY":
|
716
|
+
"scaleX":"scale"+b]=c;t["translate"+b]=f*H+(l-f*G)},pinch:function(a){var r=this,u=r.chart,t=r.pinchDown,m=a.touches,f=m.length,g=r.lastValidTouch,e=r.hasZoom,d=r.selectionMarker,p={},b=1===f&&(r.inClass(a.target,"highcharts-tracker")&&u.runTrackerClick||r.runChartClick),A={};1<f&&(r.initiated=!0);e&&r.initiated&&!b&&a.preventDefault();D(m,function(a){return r.normalize(a)});"touchstart"===a.type?(B(m,function(a,b){t[b]={chartX:a.chartX,chartY:a.chartY}}),g.x=[t[0].chartX,t[1]&&t[1].chartX],g.y=[t[0].chartY,
|
717
|
+
t[1]&&t[1].chartY],B(u.axes,function(a){if(a.zoomEnabled){var b=u.bounds[a.horiz?"h":"v"],d=a.minPixelPadding,e=a.toPixels(h(a.options.min,a.dataMin)),c=a.toPixels(h(a.options.max,a.dataMax)),f=Math.max(e,c);b.min=Math.min(a.pos,Math.min(e,c)-d);b.max=Math.max(a.pos+a.len,f+d)}}),r.res=!0):r.followTouchMove&&1===f?this.runPointActions(r.normalize(a)):t.length&&(d||(r.selectionMarker=d=F({destroy:n,touch:!0},u.plotBox)),r.pinchTranslate(t,m,p,d,A,g),r.hasPinched=e,r.scaleGroups(p,A),r.res&&(r.res=
|
718
|
+
!1,this.reset(!1,0)))},touch:function(n,r){var u=this.chart,t,m;if(u.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});a.hoverChartIndex=u.index;1===n.touches.length?(n=this.normalize(n),(m=u.isInsidePlot(n.chartX-u.plotLeft,n.chartY-u.plotTop))&&!u.openMenu?(r&&this.runPointActions(n),"touchmove"===n.type&&(r=this.pinchDown,t=r[0]?4<=Math.sqrt(Math.pow(r[0].chartX-n.chartX,2)+Math.pow(r[0].chartY-n.chartY,2)):!1),h(t,!0)&&this.pinch(n)):r&&this.reset()):2===n.touches.length&&
|
719
|
+
this.pinch(n)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(h){E[a.hoverChartIndex]&&E[a.hoverChartIndex].pointer.drop(h)}})})(L);(function(a){var E=a.addEvent,B=a.charts,F=a.css,D=a.doc,n=a.extend,h=a.noop,u=a.Pointer,r=a.removeEvent,x=a.win,t=a.wrap;if(!a.hasTouch&&(x.PointerEvent||x.MSPointerEvent)){var m={},f=!!x.PointerEvent,g=function(){var d=[];d.item=function(a){return this[a]};a.objectEach(m,
|
720
|
+
function(a){d.push({pageX:a.pageX,pageY:a.pageY,target:a.target})});return d},e=function(d,e,b,f){"touch"!==d.pointerType&&d.pointerType!==d.MSPOINTER_TYPE_TOUCH||!B[a.hoverChartIndex]||(f(d),f=B[a.hoverChartIndex].pointer,f[e]({type:b,target:d.currentTarget,preventDefault:h,touches:g()}))};n(u.prototype,{onContainerPointerDown:function(a){e(a,"onContainerTouchStart","touchstart",function(a){m[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){e(a,
|
721
|
+
"onContainerTouchMove","touchmove",function(a){m[a.pointerId]={pageX:a.pageX,pageY:a.pageY};m[a.pointerId].target||(m[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){e(a,"onDocumentTouchEnd","touchend",function(a){delete m[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,f?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,f?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(D,f?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});
|
722
|
+
t(u.prototype,"init",function(a,e,b){a.call(this,e,b);this.hasZoom&&F(e.container,{"-ms-touch-action":"none","touch-action":"none"})});t(u.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(E)});t(u.prototype,"destroy",function(a){this.batchMSEvents(r);a.call(this)})}})(L);(function(a){var E=a.addEvent,B=a.css,F=a.discardElement,D=a.defined,n=a.each,h=a.isFirefox,u=a.marginNames,r=a.merge,x=a.pick,t=a.setAnimation,m=a.stableSort,f=a.win,g=a.wrap;
|
723
|
+
a.Legend=function(a,d){this.init(a,d)};a.Legend.prototype={init:function(a,d){this.chart=a;this.setOptions(d);d.enabled&&(this.render(),E(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(a){var d=x(a.padding,8);this.options=a;this.itemStyle=a.itemStyle;this.itemHiddenStyle=r(this.itemStyle,a.itemHiddenStyle);this.itemMarginTop=a.itemMarginTop||0;this.padding=d;this.initialItemY=d-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=x(a.symbolWidth,16);this.pages=
|
724
|
+
[]},update:function(a,d){var e=this.chart;this.setOptions(r(!0,this.options,a));this.destroy();e.isDirtyLegend=e.isDirtyBox=!0;x(d,!0)&&e.redraw()},colorizeItem:function(e,d){e.legendGroup[d?"removeClass":"addClass"]("highcharts-legend-item-hidden");var f=this.options,b=e.legendItem,g=e.legendLine,m=e.legendSymbol,h=this.itemHiddenStyle.color,f=d?f.itemStyle.color:h,q=d?e.color||h:h,n=e.options&&e.options.marker,c={fill:q};b&&b.css({fill:f,color:f});g&&g.attr({stroke:q});m&&(n&&m.isMarker&&(c=e.pointAttribs(),
|
725
|
+
d||a.objectEach(c,function(a,b){c[b]=h})),m.attr(c))},positionItem:function(a){var d=this.options,e=d.symbolPadding,d=!d.rtl,b=a._legendItemPos,f=b[0],b=b[1],g=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(d?f:this.legendWidth-f-2*e-4,b);g&&(g.x=f,g.y=b)},destroyItem:function(a){var d=a.checkbox;n(["legendItem","legendLine","legendSymbol","legendGroup"],function(d){a[d]&&(a[d]=a[d].destroy())});d&&F(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}n(this.getAllItems(),
|
726
|
+
function(d){n(["legendItem","legendGroup"],a,d)});n("clipRect up down pager nav box title group".split(" "),a,this);this.display=null},positionCheckboxes:function(a){var d=this.group&&this.group.alignAttr,e,b=this.clipHeight||this.legendHeight,f=this.titleHeight;d&&(e=d.translateY,n(this.allItems,function(g){var p=g.checkbox,m;p&&(m=e+f+p.y+(a||0)+3,B(p,{left:d.translateX+g.checkboxOffset+p.x-20+"px",top:m+"px",display:m>e-6&&m<e+b-6?"":"none"}))}))},renderTitle:function(){var a=this.options,d=this.padding,
|
727
|
+
f=a.title,b=0;f.text&&(this.title||(this.title=this.chart.renderer.label(f.text,d-3,d-4,null,null,null,a.useHTML,null,"legend-title").attr({zIndex:1}).css(f.style).add(this.group)),a=this.title.getBBox(),b=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:b}));this.titleHeight=b},setText:function(e){var d=this.options;e.legendItem.attr({text:d.labelFormat?a.format(d.labelFormat,e):d.labelFormatter.call(e)})},renderItem:function(a){var d=this.chart,e=d.renderer,b=this.options,f=
|
728
|
+
"horizontal"===b.layout,g=this.symbolWidth,m=b.symbolPadding,q=this.itemStyle,h=this.itemHiddenStyle,c=this.padding,w=f?x(b.itemDistance,20):0,n=!b.rtl,y=b.width,G=b.itemMarginBottom||0,l=this.itemMarginTop,I=a.legendItem,k=!a.series,z=!k&&a.series.drawLegendSymbol?a.series:a,u=z.options,M=this.createCheckboxForItem&&u&&u.showCheckbox,u=g+m+w+(M?20:0),t=b.useHTML,P=a.options.className;I||(a.legendGroup=e.g("legend-item").addClass("highcharts-"+z.type+"-series highcharts-color-"+a.colorIndex+(P?" "+
|
729
|
+
P:"")+(k?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=I=e.text("",n?g+m:-m,this.baseline||0,t).css(r(a.visible?q:h)).attr({align:n?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(g=q.fontSize,this.fontMetrics=e.fontMetrics(g,I),this.baseline=this.fontMetrics.f+3+l,I.attr("y",this.baseline)),this.symbolHeight=b.symbolHeight||this.fontMetrics.f,z.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,I,t),M&&this.createCheckboxForItem(a));
|
730
|
+
this.colorizeItem(a,a.visible);q.width||I.css({width:(b.itemWidth||d.spacingBox.width)-u});this.setText(a);e=I.getBBox();q=a.checkboxOffset=b.itemWidth||a.legendItemWidth||e.width+u;this.itemHeight=e=Math.round(a.legendItemHeight||e.height||this.symbolHeight);f&&this.itemX-c+q>(y||d.spacingBox.width-2*c-b.x)&&(this.itemX=c,this.itemY+=l+this.lastLineHeight+G,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,q);this.lastItemY=l+this.itemY+G;this.lastLineHeight=Math.max(e,this.lastLineHeight);
|
731
|
+
a._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=q:(this.itemY+=l+e+G,this.lastLineHeight=e);this.offsetWidth=y||Math.max((f?this.itemX-c-w:q)+c,this.offsetWidth)},getAllItems:function(){var a=[];n(this.chart.series,function(d){var e=d&&d.options;d&&x(e.showInLegend,D(e.linkedTo)?!1:void 0,!0)&&(a=a.concat(d.legendItems||("point"===e.legendType?d.data:d)))});return a},adjustMargins:function(a,d){var e=this.chart,b=this.options,f=b.align.charAt(0)+b.verticalAlign.charAt(0)+b.layout.charAt(0);
|
732
|
+
b.floating||n([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(g,p){g.test(f)&&!D(a[p])&&(e[u[p]]=Math.max(e[u[p]],e.legend[(p+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][p]*b[p%2?"x":"y"]+x(b.margin,12)+d[p]))})},render:function(){var a=this,d=a.chart,f=d.renderer,b=a.group,g,h,H,q,u=a.box,c=a.options,w=a.padding;a.itemX=w;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;b||(a.group=b=f.g("legend").attr({zIndex:7}).add(),a.contentGroup=f.g().attr({zIndex:1}).add(b),a.scrollGroup=
|
733
|
+
f.g().add(a.contentGroup));a.renderTitle();g=a.getAllItems();m(g,function(a,c){return(a.options&&a.options.legendIndex||0)-(c.options&&c.options.legendIndex||0)});c.reversed&&g.reverse();a.allItems=g;a.display=h=!!g.length;a.lastLineHeight=0;n(g,function(c){a.renderItem(c)});H=(c.width||a.offsetWidth)+w;q=a.lastItemY+a.lastLineHeight+a.titleHeight;q=a.handleOverflow(q);q+=w;u||(a.box=u=f.rect().addClass("highcharts-legend-box").attr({r:c.borderRadius}).add(b),u.isNew=!0);u.attr({stroke:c.borderColor,
|
734
|
+
"stroke-width":c.borderWidth||0,fill:c.backgroundColor||"none"}).shadow(c.shadow);0<H&&0<q&&(u[u.isNew?"attr":"animate"](u.crisp({x:0,y:0,width:H,height:q},u.strokeWidth())),u.isNew=!1);u[h?"show":"hide"]();a.legendWidth=H;a.legendHeight=q;n(g,function(c){a.positionItem(c)});h&&b.align(r(c,{width:H,height:q}),!0,"spacingBox");d.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var d=this,e=this.chart,b=e.renderer,f=this.options,g=f.y,m=this.padding,e=e.spacingBox.height+("top"===f.verticalAlign?
|
735
|
+
-g:g)-m,g=f.maxHeight,q,h=this.clipRect,c=f.navigation,w=x(c.animation,!0),r=c.arrowSize||12,y=this.nav,G=this.pages,l,I=this.allItems,k=function(a){"number"===typeof a?h.attr({height:a}):h&&(d.clipRect=h.destroy(),d.contentGroup.clip());d.contentGroup.div&&(d.contentGroup.div.style.clip=a?"rect("+m+"px,9999px,"+(m+a)+"px,0)":"auto")};"horizontal"!==f.layout||"middle"===f.verticalAlign||f.floating||(e/=2);g&&(e=Math.min(e,g));G.length=0;a>e&&!1!==c.enabled?(this.clipHeight=q=Math.max(e-20-this.titleHeight-
|
736
|
+
m,0),this.currentPage=x(this.currentPage,1),this.fullHeight=a,n(I,function(a,c){var b=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var d=G.length;if(!d||b-G[d-1]>q&&(l||b)!==G[d-1])G.push(l||b),d++;c===I.length-1&&b+a-G[d-1]>q&&G.push(b);b!==l&&(l=b)}),h||(h=d.clipRect=b.clipRect(0,m,9999,0),d.contentGroup.clip(h)),k(q),y||(this.nav=y=b.g().attr({zIndex:1}).add(this.group),this.up=b.symbol("triangle",0,0,r,r).on("click",function(){d.scroll(-1,w)}).add(y),this.pager=b.text("",15,
|
737
|
+
10).addClass("highcharts-legend-navigation").css(c.style).add(y),this.down=b.symbol("triangle-down",0,0,r,r).on("click",function(){d.scroll(1,w)}).add(y)),d.scroll(0),a=e):y&&(k(),this.nav=y.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,d){var e=this.pages,b=e.length;a=this.currentPage+a;var f=this.clipHeight,g=this.options.navigation,m=this.pager,q=this.padding;a>b&&(a=b);0<a&&(void 0!==d&&t(d,this.chart),this.nav.attr({translateX:q,translateY:f+this.padding+
|
738
|
+
7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),m.attr({text:a+"/"+b}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===b?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),this.up.attr({fill:1===a?g.inactiveColor:g.activeColor}).css({cursor:1===a?"default":"pointer"}),this.down.attr({fill:a===b?g.inactiveColor:g.activeColor}).css({cursor:a===b?"default":"pointer"}),d=-e[a-1]+this.initialItemY,
|
739
|
+
this.scrollGroup.animate({translateY:d}),this.currentPage=a,this.positionCheckboxes(d))}};a.LegendSymbolMixin={drawRectangle:function(a,d){var e=a.symbolHeight,b=a.options.squareSymbol;d.legendSymbol=this.chart.renderer.rect(b?(a.symbolWidth-e)/2:0,a.baseline-e+1,b?e:a.symbolWidth,e,x(a.options.symbolRadius,e/2)).addClass("highcharts-point").attr({zIndex:3}).add(d.legendGroup)},drawLineMarker:function(a){var d=this.options,e=d.marker,b=a.symbolWidth,f=a.symbolHeight,g=f/2,m=this.chart.renderer,q=
|
740
|
+
this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);var h;h={"stroke-width":d.lineWidth||0};d.dashStyle&&(h.dashstyle=d.dashStyle);this.legendLine=m.path(["M",0,a,"L",b,a]).addClass("highcharts-graph").attr(h).add(q);e&&!1!==e.enabled&&(d=Math.min(x(e.radius,g),g),0===this.symbol.indexOf("url")&&(e=r(e,{width:f,height:f}),d=0),this.legendSymbol=e=m.symbol(this.symbol,b/2-d,a-d,2*d,2*d,e).addClass("highcharts-point").add(q),e.isMarker=!0)}};(/Trident\/7\.0/.test(f.navigator.userAgent)||h)&&
|
741
|
+
g(a.Legend.prototype,"positionItem",function(a,d){var e=this,b=function(){d._legendItemPos&&a.call(e,d)};b();setTimeout(b)})})(L);(function(a){var E=a.addEvent,B=a.animate,F=a.animObject,D=a.attr,n=a.doc,h=a.Axis,u=a.createElement,r=a.defaultOptions,x=a.discardElement,t=a.charts,m=a.css,f=a.defined,g=a.each,e=a.extend,d=a.find,p=a.fireEvent,b=a.getStyle,A=a.grep,v=a.isNumber,H=a.isObject,q=a.isString,J=a.Legend,c=a.marginNames,w=a.merge,K=a.objectEach,y=a.Pointer,G=a.pick,l=a.pInt,I=a.removeEvent,
|
742
|
+
k=a.seriesTypes,z=a.splat,Q=a.svg,M=a.syncTimeout,N=a.win,P=a.Renderer,O=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,c,b){return new O(a,c,b)};e(O.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(q(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(c,b){var l,d,k=c.series,e=c.plotOptions||{};c.series=null;l=w(r,c);for(d in l.plotOptions)l.plotOptions[d].tooltip=e[d]&&w(e[d].tooltip)||void 0;l.tooltip.userOptions=
|
743
|
+
c.chart&&c.chart.forExport&&c.tooltip.userOptions||c.tooltip;l.series=c.series=k;this.userOptions=c;c=l.chart;d=c.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=l;this.axes=[];this.series=[];this.hasCartesianSeries=c.showAxes;var f=this;f.index=t.length;t.push(f);a.chartCount++;d&&K(d,function(a,c){E(f,c,a)});f.xAxis=[];f.yAxis=[];f.pointCount=f.colorCounter=f.symbolCounter=0;f.firstRender()},initSeries:function(c){var b=this.options.chart;
|
744
|
+
(b=k[c.type||b.type||b.defaultSeriesType])||a.error(17,!0);b=new b;b.init(this,c);return b},orderSeries:function(a){var c=this.series;for(a=a||0;a<c.length;a++)c[a]&&(c[a].index=a,c[a].name=c[a].name||"Series "+(c[a].index+1))},isInsidePlot:function(a,c,b){var l=b?c:a;a=b?a:c;return 0<=l&&l<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(c){var b=this.axes,l=this.series,d=this.pointer,k=this.legend,f=this.isDirtyLegend,y,m,G=this.hasCartesianSeries,q=this.isDirtyBox,z,h=this.renderer,w=
|
745
|
+
h.isHidden(),I=[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(c,this);w&&this.temporaryDisplay();this.layOutTitles();for(c=l.length;c--;)if(z=l[c],z.options.stacking&&(y=!0,z.isDirty)){m=!0;break}if(m)for(c=l.length;c--;)z=l[c],z.options.stacking&&(z.isDirty=!0);g(l,function(a){a.isDirty&&"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),f=!0);a.isDirtyData&&p(a,"updatedData")});f&&k.options.enabled&&(k.render(),this.isDirtyLegend=!1);y&&this.getStacks();G&&g(b,function(a){a.updateNames();
|
746
|
+
a.setScale()});this.getMargins();G&&(g(b,function(a){a.isDirty&&(q=!0)}),g(b,function(a){var c=a.min+","+a.max;a.extKey!==c&&(a.extKey=c,I.push(function(){p(a,"afterSetExtremes",e(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(q||y)&&a.redraw()}));q&&this.drawChartBox();p(this,"predraw");g(l,function(a){(q||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});d&&d.reset(!0);h.draw();p(this,"redraw");p(this,"render");w&&this.temporaryDisplay(!0);g(I,function(a){a.call()})},get:function(a){function c(c){return c.id===
|
747
|
+
a||c.options&&c.options.id===a}var b,l=this.series,k;b=d(this.axes,c)||d(this.series,c);for(k=0;!b&&k<l.length;k++)b=d(l[k].points||[],c);return b},getAxes:function(){var a=this,c=this.options,b=c.xAxis=z(c.xAxis||{}),c=c.yAxis=z(c.yAxis||{});g(b,function(a,c){a.index=c;a.isX=!0});g(c,function(a,c){a.index=c});b=b.concat(c);g(b,function(c){new h(a,c)})},getSelectedPoints:function(){var a=[];g(this.series,function(c){a=a.concat(A(c.data||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return A(this.series,
|
748
|
+
function(a){return a.selected})},setTitle:function(a,c,b){var l=this,d=l.options,k;k=d.title=w({style:{color:"#333333",fontSize:d.isStock?"16px":"18px"}},d.title,a);d=d.subtitle=w({style:{color:"#666666"}},d.subtitle,c);g([["title",a,k],["subtitle",c,d]],function(a,c){var b=a[0],d=l[b],k=a[1];a=a[2];d&&k&&(l[b]=d=d.destroy());a&&a.text&&!d&&(l[b]=l.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+b,zIndex:a.zIndex||4}).add(),l[b].update=function(a){l.setTitle(!c&&a,c&&
|
749
|
+
a)},l[b].css(a.style))});l.layOutTitles(b)},layOutTitles:function(a){var c=0,b,l=this.renderer,d=this.spacingBox;g(["title","subtitle"],function(a){var b=this[a],k=this.options[a];a="title"===a?-3:k.verticalAlign?0:c+2;var f;b&&(f=k.style.fontSize,f=l.fontMetrics(f,b).b,b.css({width:(k.width||d.width+k.widthAdjust)+"px"}).align(e({y:a+f},k),!1,"spacingBox"),k.floating||k.verticalAlign||(c=Math.ceil(c+b.getBBox(k.useHTML).height)))},this);b=this.titleOffset!==c;this.titleOffset=c;!this.isDirtyBox&&
|
750
|
+
b&&(this.isDirtyBox=b,this.hasRendered&&G(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var c=this.options.chart,l=c.width,c=c.height,d=this.renderTo;f(l)||(this.containerWidth=b(d,"width"));f(c)||(this.containerHeight=b(d,"height"));this.chartWidth=Math.max(0,l||this.containerWidth||600);this.chartHeight=Math.max(0,a.relativeLength(c,this.chartWidth)||this.containerHeight||400)},temporaryDisplay:function(c){var l=this.renderTo;if(c)for(;l&&l.style;)l.hcOrigStyle&&(a.css(l,l.hcOrigStyle),
|
751
|
+
delete l.hcOrigStyle),l=l.parentNode;else for(;l&&l.style;)"none"===b(l,"display",!1)&&(l.hcOrigStyle={display:l.style.display,height:l.style.height,overflow:l.style.overflow},c={display:"block",overflow:"hidden"},l!==this.renderTo&&(c.height=0),a.css(l,c),l.style.setProperty&&l.style.setProperty("display","block","important")),l=l.parentNode},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var c,b=this.options,d=b.chart,k,f;c=this.renderTo;
|
752
|
+
var g=a.uniqueKey(),y;c||(this.renderTo=c=d.renderTo);q(c)&&(this.renderTo=c=n.getElementById(c));c||a.error(13,!0);k=l(D(c,"data-highcharts-chart"));v(k)&&t[k]&&t[k].hasRendered&&t[k].destroy();D(c,"data-highcharts-chart",this.index);c.innerHTML="";d.skipClone||c.offsetWidth||this.temporaryDisplay();this.getChartSize();k=this.chartWidth;f=this.chartHeight;y=e({position:"relative",overflow:"hidden",width:k+"px",height:f+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},
|
753
|
+
d.style);this.container=c=u("div",{id:g},y,c);this._cursor=c.style.cursor;this.renderer=new (a[d.renderer]||P)(c,k,f,null,d.forExport,b.exporting&&b.exporting.allowHTML);this.setClassName(d.className);this.renderer.setStyle(d.style);this.renderer.chartIndex=this.index},getMargins:function(a){var c=this.spacing,b=this.margin,l=this.titleOffset;this.resetMargins();l&&!f(b[0])&&(this.plotTop=Math.max(this.plotTop,l+this.options.title.margin+c[0]));this.legend.display&&this.legend.adjustMargins(b,c);
|
754
|
+
this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||0)+this.extraMargin.value);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],l=a.margin;a.hasCartesianSeries&&g(a.axes,function(a){a.visible&&a.getOffset()});g(c,function(c,d){f(l[d])||(a[c]+=b[d])});a.setChartSize()},reflow:function(a){var c=this,l=c.options.chart,d=c.renderTo,k=f(l.width),e=l.width||b(d,"width"),l=l.height||b(d,
|
755
|
+
"height"),d=a?a.target:N;if(!k&&!c.isPrinting&&e&&l&&(d===N||d===n)){if(e!==c.containerWidth||l!==c.containerHeight)clearTimeout(c.reflowTimeout),c.reflowTimeout=M(function(){c.container&&c.setSize(void 0,void 0,!1)},a?100:0);c.containerWidth=e;c.containerHeight=l}},initReflow:function(){var a=this,c;c=E(N,"resize",function(c){a.reflow(c)});E(a,"destroy",c)},setSize:function(c,b,l){var d=this,k=d.renderer;d.isResizing+=1;a.setAnimation(l,d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;
|
756
|
+
void 0!==c&&(d.options.chart.width=c);void 0!==b&&(d.options.chart.height=b);d.getChartSize();c=k.globalAnimation;(c?B:m)(d.container,{width:d.chartWidth+"px",height:d.chartHeight+"px"},c);d.setChartSize(!0);k.setSize(d.chartWidth,d.chartHeight,l);g(d.axes,function(a){a.isDirty=!0;a.setScale()});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.layOutTitles();d.getMargins();d.redraw(l);d.oldChartHeight=null;p(d,"resize");M(function(){d&&p(d,"endResize",null,function(){--d.isResizing})},F(c).duration)},setChartSize:function(a){function c(a){a=
|
757
|
+
y[a]||0;return Math.max(z||a,a)/2}var b=this.inverted,l=this.renderer,d=this.chartWidth,k=this.chartHeight,f=this.options.chart,e=this.spacing,y=this.clipOffset,m,p,G,q,z;this.plotLeft=m=Math.round(this.plotLeft);this.plotTop=p=Math.round(this.plotTop);this.plotWidth=G=Math.max(0,Math.round(d-m-this.marginRight));this.plotHeight=q=Math.max(0,Math.round(k-p-this.marginBottom));this.plotSizeX=b?q:G;this.plotSizeY=b?G:q;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=l.spacingBox={x:e[3],y:e[0],
|
758
|
+
width:d-e[3]-e[1],height:k-e[0]-e[2]};this.plotBox=l.plotBox={x:m,y:p,width:G,height:q};z=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(c(3));l=Math.ceil(c(0));this.clipBox={x:b,y:l,width:Math.floor(this.plotSizeX-c(1)-b),height:Math.max(0,Math.floor(this.plotSizeY-c(2)-l))};a||g(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this,b=a.options.chart;g(["margin","spacing"],function(c){var l=b[c],d=H(l)?l:[l,l,l,l];g(["Top","Right","Bottom","Left"],function(l,
|
759
|
+
k){a[c][k]=G(b[c+l],d[k])})});g(c,function(c,b){a[c]=G(a.margin[b],a.spacing[b])});a.axisOffset=[0,0,0,0];a.clipOffset=[]},drawChartBox:function(){var a=this.options.chart,c=this.renderer,b=this.chartWidth,l=this.chartHeight,d=this.chartBackground,k=this.plotBackground,e=this.plotBorder,f,g=this.plotBGImage,y=a.backgroundColor,m=a.plotBackgroundColor,p=a.plotBackgroundImage,G,q=this.plotLeft,z=this.plotTop,h=this.plotWidth,w=this.plotHeight,I=this.plotBox,v=this.clipRect,n=this.clipBox,r="animate";
|
760
|
+
d||(this.chartBackground=d=c.rect().addClass("highcharts-background").add(),r="attr");f=a.borderWidth||0;G=f+(a.shadow?8:0);y={fill:y||"none"};if(f||d["stroke-width"])y.stroke=a.borderColor,y["stroke-width"]=f;d.attr(y).shadow(a.shadow);d[r]({x:G/2,y:G/2,width:b-G-f%2,height:l-G-f%2,r:a.borderRadius});r="animate";k||(r="attr",this.plotBackground=k=c.rect().addClass("highcharts-plot-background").add());k[r](I);k.attr({fill:m||"none"}).shadow(a.plotShadow);p&&(g?g.animate(I):this.plotBGImage=c.image(p,
|
761
|
+
q,z,h,w).add());v?v.animate({width:n.width,height:n.height}):this.clipRect=c.clipRect(n);r="animate";e||(r="attr",this.plotBorder=e=c.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());e.attr({stroke:a.plotBorderColor,"stroke-width":a.plotBorderWidth||0,fill:"none"});e[r](e.crisp({x:q,y:z,width:h,height:w},-e.strokeWidth()));this.isDirtyBox=!1},propFromSeries:function(){var a=this,c=a.options.chart,b,l=a.options.series,d,e;g(["inverted","angular","polar"],function(f){b=k[c.type||c.defaultSeriesType];
|
762
|
+
e=c[f]||b&&b.prototype[f];for(d=l&&l.length;!e&&d--;)(b=k[l[d].type])&&b.prototype[f]&&(e=!0);a[f]=e})},linkSeries:function(){var a=this,c=a.series;g(c,function(a){a.linkedSeries.length=0});g(c,function(c){var b=c.options.linkedTo;q(b)&&(b=":previous"===b?a.series[c.index-1]:a.get(b))&&b.linkedParent!==c&&(b.linkedSeries.push(c),c.linkedParent=b,c.visible=G(c.options.visible,b.options.visible,c.visible))})},renderSeries:function(){g(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=
|
763
|
+
this,c=a.options.labels;c.items&&g(c.items,function(b){var d=e(c.style,b.style),k=l(d.left)+a.plotLeft,f=l(d.top)+a.plotTop+12;delete d.left;delete d.top;a.renderer.text(b.html,k,f).attr({zIndex:2}).css(d).add()})},render:function(){var a=this.axes,c=this.renderer,b=this.options,l,d,k;this.setTitle();this.legend=new J(this,b.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();b=this.plotWidth;l=this.plotHeight-=21;g(a,function(a){a.setScale()});this.getAxisMargins();d=
|
764
|
+
1.1<b/this.plotWidth;k=1.05<l/this.plotHeight;if(d||k)g(a,function(a){(a.horiz&&d||!a.horiz&&k)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&g(a,function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=c.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0},addCredits:function(a){var c=this;a=w(!0,this.options.credits,a);a.enabled&&!this.credits&&
|
765
|
+
(this.credits=this.renderer.text(a.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){a.href&&(N.location.href=a.href)}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position),this.credits.update=function(a){c.credits=c.credits.destroy();c.addCredits(a)})},destroy:function(){var c=this,b=c.axes,d=c.series,l=c.container,k,f=l&&l.parentNode;p(c,"destroy");c.renderer.forExport?a.erase(t,c):t[c.index]=void 0;a.chartCount--;c.renderTo.removeAttribute("data-highcharts-chart");
|
766
|
+
I(c);for(k=b.length;k--;)b[k]=b[k].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(k=d.length;k--;)d[k]=d[k].destroy();g("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),function(a){var b=c[a];b&&b.destroy&&(c[a]=b.destroy())});l&&(l.innerHTML="",I(l),f&&x(l));K(c,function(a,b){delete c[b]})},isReadyToRender:function(){var a=this;return Q||N!=N.top||
|
767
|
+
"complete"===n.readyState?!0:(n.attachEvent("onreadystatechange",function(){n.detachEvent("onreadystatechange",a.firstRender);"complete"===n.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,c=a.options;if(a.isReadyToRender()){a.getContainer();p(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();g(c.series||[],function(c){a.initSeries(c)});a.linkSeries();p(a,"beforeRender");y&&(a.pointer=new y(a,c));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();
|
768
|
+
a.temporaryDisplay(!0)}},onload:function(){g([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);p(this,"load");p(this,"render");f(this.index)&&!1!==this.options.chart.reflow&&this.initReflow();this.onload=null}})})(L);(function(a){var E,B=a.each,F=a.extend,D=a.erase,n=a.fireEvent,h=a.format,u=a.isArray,r=a.isNumber,x=a.pick,t=a.removeEvent;a.Point=E=function(){};a.Point.prototype={init:function(a,f,g){this.series=a;this.color=a.color;this.applyOptions(f,
|
769
|
+
g);a.options.colorByPoint?(f=a.options.colors||a.chart.options.colors,this.color=this.color||f[a.colorCounter],f=f.length,g=a.colorCounter,a.colorCounter++,a.colorCounter===f&&(a.colorCounter=0)):g=a.colorIndex;this.colorIndex=x(this.colorIndex,g);a.chart.pointCount++;return this},applyOptions:function(a,f){var g=this.series,e=g.options.pointValKey||g.pointValKey;a=E.prototype.optionsToObject.call(this,a);F(this,a);this.options=this.options?F(this.options,a):a;a.group&&delete this.group;e&&(this.y=
|
770
|
+
this[e]);this.isNull=x(this.isValid&&!this.isValid(),null===this.x||!r(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===f&&g.xAxis&&g.xAxis.hasNames&&(this.x=g.xAxis.nameToX(this));void 0===this.x&&g&&(this.x=void 0===f?g.autoIncrement(this):f);return this},optionsToObject:function(a){var f={},g=this.series,e=g.options.keys,d=e||g.pointArrayMap||["y"],p=d.length,b=0,m=0;if(r(a)||null===a)f[d[0]]=a;else if(u(a))for(!e&&a.length>p&&(g=typeof a[0],"string"===g?f.name=a[0]:"number"===
|
771
|
+
g&&(f.x=a[0]),b++);m<p;)e&&void 0===a[b]||(f[d[m]]=a[b]),b++,m++;else"object"===typeof a&&(f=a,a.dataLabels&&(g._hasPointLabels=!0),a.marker&&(g._hasPointMarkers=!0));return f},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?
|
772
|
+
" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var a=this.series,f=a.zones,a=a.zoneAxis||"y",g=0,e;for(e=f[g];this[a]>=e.value;)e=f[++g];e&&e.color&&!this.options.color&&(this.color=e.color);return e},destroy:function(){var a=this.series.chart,f=a.hoverPoints,g;a.pointCount--;f&&(this.setState(),D(f,this),f.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)t(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);
|
773
|
+
for(g in this)this[g]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],f,g=6;g--;)f=a[g],this[f]&&(this[f]=this[f].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var f=this.series,g=f.tooltipOptions,e=x(g.valueDecimals,""),
|
774
|
+
d=g.valuePrefix||"",p=g.valueSuffix||"";B(f.pointArrayMap||["y"],function(b){b="{point."+b;if(d||p)a=a.replace(b+"}",d+b+"}"+p);a=a.replace(b+"}",b+":,."+e+"f}")});return h(a,{point:this,series:this.series})},firePointEvent:function(a,f,g){var e=this,d=this.series.options;(d.point.events[a]||e.options&&e.options.events&&e.options.events[a])&&this.importEvents();"click"===a&&d.allowPointSelect&&(g=function(a){e.select&&e.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});n(this,a,f,g)},visible:!0}})(L);
|
775
|
+
(function(a){var E=a.addEvent,B=a.animObject,F=a.arrayMax,D=a.arrayMin,n=a.correctFloat,h=a.Date,u=a.defaultOptions,r=a.defaultPlotOptions,x=a.defined,t=a.each,m=a.erase,f=a.extend,g=a.fireEvent,e=a.grep,d=a.isArray,p=a.isNumber,b=a.isString,A=a.merge,v=a.objectEach,H=a.pick,q=a.removeEvent,J=a.splat,c=a.SVGElement,w=a.syncTimeout,K=a.win;a.Series=a.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",radius:4,
|
776
|
+
states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{},
|
777
|
+
halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,c){var b=this,d,k=a.series,e;b.chart=a;b.options=c=b.setOptions(c);b.linkedSeries=[];b.bindAxes();f(b,{name:c.name,state:"",visible:!1!==c.visible,selected:!0===c.selected});d=c.events;v(d,function(a,c){E(b,c,a)});if(d&&
|
778
|
+
d.click||c.point&&c.point.events&&c.point.events.click||c.allowPointSelect)a.runTrackerClick=!0;b.getColor();b.getSymbol();t(b.parallelArrays,function(a){b[a+"Data"]=[]});b.setData(c.data,!1);b.isCartesian&&(a.hasCartesianSeries=!0);k.length&&(e=k[k.length-1]);b._i=H(e&&e._i,-1)+1;a.orderSeries(this.insert(k))},insert:function(a){var c=this.options.index,b;if(p(c)){for(b=a.length;b--;)if(c>=H(a[b].options.index,a[b]._i)){a.splice(b+1,0,this);break}-1===b&&a.unshift(this);b+=1}else a.push(this);return H(b,
|
779
|
+
a.length-1)},bindAxes:function(){var c=this,b=c.options,d=c.chart,e;t(c.axisTypes||[],function(l){t(d[l],function(a){e=a.options;if(b[l]===e.index||void 0!==b[l]&&b[l]===e.id||void 0===b[l]&&0===e.index)c.insert(a.series),c[l]=a,a.isDirty=!0});c[l]||c.optionalAxis===l||a.error(18,!0)})},updateParallelArrays:function(a,c){var b=a.series,d=arguments,k=p(c)?function(d){var l="y"===d&&b.toYData?b.toYData(a):a[d];b[d+"Data"][c]=l}:function(a){Array.prototype[c].apply(b[a+"Data"],Array.prototype.slice.call(d,
|
780
|
+
2))};t(b.parallelArrays,k)},autoIncrement:function(){var a=this.options,c=this.xIncrement,b,d=a.pointIntervalUnit,c=H(c,a.pointStart,0);this.pointInterval=b=H(this.pointInterval,a.pointInterval,1);d&&(a=new h(c),"day"===d?a=+a[h.hcSetDate](a[h.hcGetDate]()+b):"month"===d?a=+a[h.hcSetMonth](a[h.hcGetMonth]()+b):"year"===d&&(a=+a[h.hcSetFullYear](a[h.hcGetFullYear]()+b)),b=a-c);this.xIncrement=c+b;return c},setOptions:function(a){var c=this.chart,b=c.options,d=b.plotOptions,k=(c.userOptions||{}).plotOptions||
|
781
|
+
{},e=d[this.type];this.userOptions=a;c=A(e,d.series,a);this.tooltipOptions=A(u.tooltip,u.plotOptions.series&&u.plotOptions.series.tooltip,u.plotOptions[this.type].tooltip,b.tooltip.userOptions,d.series&&d.series.tooltip,d[this.type].tooltip,a.tooltip);this.stickyTracking=H(a.stickyTracking,k[this.type]&&k[this.type].stickyTracking,k.series&&k.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:c.stickyTracking);null===e.marker&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=
|
782
|
+
(c.zones||[]).slice();!c.negativeColor&&!c.negativeFillColor||c.zones||a.push({value:c[this.zoneAxis+"Threshold"]||c.threshold||0,className:"highcharts-negative",color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&x(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});return c},getCyclic:function(a,c,b){var d,l=this.chart,e=this.userOptions,f=a+"Index",g=a+"Counter",y=b?b.length:H(l.options.chart[a+"Count"],l[a+"Count"]);c||(d=H(e[f],e["_"+f]),x(d)||(l.series.length||
|
783
|
+
(l[g]=0),e["_"+f]=d=l[g]%y,l[g]+=1),b&&(c=b[d]));void 0!==d&&(this[f]=d);this[a]=c},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||r[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(c,e,l,f){var k=this,g=k.points,y=g&&g.length||0,q,m=k.options,h=k.chart,w=null,G=k.xAxis,
|
784
|
+
I=m.turboThreshold,v=this.xData,n=this.yData,r=(q=k.pointArrayMap)&&q.length;c=c||[];q=c.length;e=H(e,!0);if(!1!==f&&q&&y===q&&!k.cropped&&!k.hasGroupedData&&k.visible)t(c,function(a,c){g[c].update&&a!==m.data[c]&&g[c].update(a,!1,null,!1)});else{k.xIncrement=null;k.colorCounter=0;t(this.parallelArrays,function(a){k[a+"Data"].length=0});if(I&&q>I){for(l=0;null===w&&l<q;)w=c[l],l++;if(p(w))for(l=0;l<q;l++)v[l]=this.autoIncrement(),n[l]=c[l];else if(d(w))if(r)for(l=0;l<q;l++)w=c[l],v[l]=w[0],n[l]=w.slice(1,
|
785
|
+
r+1);else for(l=0;l<q;l++)w=c[l],v[l]=w[0],n[l]=w[1];else a.error(12)}else for(l=0;l<q;l++)void 0!==c[l]&&(w={series:k},k.pointClass.prototype.applyOptions.apply(w,[c[l]]),k.updateParallelArrays(w,l));b(n[0])&&a.error(14,!0);k.data=[];k.options.data=k.userOptions.data=c;for(l=y;l--;)g[l]&&g[l].destroy&&g[l].destroy();G&&(G.minRange=G.userMinRange);k.isDirty=h.isDirtyBox=!0;k.isDirtyData=!!g;l=!1}"point"===m.legendType&&(this.processData(),this.generatePoints());e&&h.redraw(l)},processData:function(c){var b=
|
786
|
+
this.xData,d=this.yData,e=b.length,k;k=0;var f,g,y=this.xAxis,p,q=this.options;p=q.cropThreshold;var m=this.getExtremesFromAll||q.getExtremesFromAll,w=this.isCartesian,q=y&&y.val2lin,h=y&&y.isLog,v,n;if(w&&!this.isDirty&&!y.isDirty&&!this.yAxis.isDirty&&!c)return!1;y&&(c=y.getExtremes(),v=c.min,n=c.max);if(w&&this.sorted&&!m&&(!p||e>p||this.forceCrop))if(b[e-1]<v||b[0]>n)b=[],d=[];else if(b[0]<v||b[e-1]>n)k=this.cropData(this.xData,this.yData,v,n),b=k.xData,d=k.yData,k=k.start,f=!0;for(p=b.length||
|
787
|
+
1;--p;)e=h?q(b[p])-q(b[p-1]):b[p]-b[p-1],0<e&&(void 0===g||e<g)?g=e:0>e&&this.requireSorting&&a.error(15);this.cropped=f;this.cropStart=k;this.processedXData=b;this.processedYData=d;this.closestPointRange=g},cropData:function(a,c,b,d){var l=a.length,e=0,f=l,g=H(this.cropShoulder,1),y;for(y=0;y<l;y++)if(a[y]>=b){e=Math.max(0,y-g);break}for(b=y;b<l;b++)if(a[b]>d){f=b+g;break}return{xData:a.slice(e,f),yData:c.slice(e,f),start:e,end:f}},generatePoints:function(){var a=this.options,c=a.data,b=this.data,
|
788
|
+
d,k=this.processedXData,e=this.processedYData,f=this.pointClass,g=k.length,p=this.cropStart||0,q,m=this.hasGroupedData,a=a.keys,w,h=[],v;b||m||(b=[],b.length=c.length,b=this.data=b);a&&m&&(this.options.keys=!1);for(v=0;v<g;v++)q=p+v,m?(w=(new f).init(this,[k[v]].concat(J(e[v]))),w.dataGroup=this.groupMap[v]):(w=b[q])||void 0===c[q]||(b[q]=w=(new f).init(this,c[q],k[v])),w&&(w.index=q,h[v]=w);this.options.keys=a;if(b&&(g!==(d=b.length)||m))for(v=0;v<d;v++)v!==p||m||(v+=g),b[v]&&(b[v].destroyElements(),
|
789
|
+
b[v].plotX=void 0);this.data=b;this.points=h},getExtremes:function(a){var c=this.yAxis,b=this.processedXData,e,k=[],f=0;e=this.xAxis.getExtremes();var g=e.min,y=e.max,q,m,w,h;a=a||this.stackedYData||this.processedYData||[];e=a.length;for(h=0;h<e;h++)if(m=b[h],w=a[h],q=(p(w,!0)||d(w))&&(!c.positiveValuesOnly||w.length||0<w),m=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(b[h]||m)>=g&&(b[h]||m)<=y,q&&m)if(q=w.length)for(;q--;)null!==w[q]&&(k[f++]=w[q]);else k[f++]=w;this.dataMin=
|
790
|
+
D(k);this.dataMax=F(k)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,c=a.stacking,b=this.xAxis,d=b.categories,k=this.yAxis,e=this.points,f=e.length,g=!!this.modifyValue,q=a.pointPlacement,m="between"===q||p(q),w=a.threshold,h=a.startFromThreshold?w:0,v,r,K,A,u=Number.MAX_VALUE;"between"===q&&(q=.5);p(q)&&(q*=H(a.pointRange||b.pointRange));for(a=0;a<f;a++){var t=e[a],J=t.x,B=t.y;r=t.low;var D=c&&k.stacks[(this.negStacks&&B<(h?0:w)?"-":"")+this.stackKey],
|
791
|
+
E;k.positiveValuesOnly&&null!==B&&0>=B&&(t.isNull=!0);t.plotX=v=n(Math.min(Math.max(-1E5,b.translate(J,0,0,0,1,q,"flags"===this.type)),1E5));c&&this.visible&&!t.isNull&&D&&D[J]&&(A=this.getStackIndicator(A,J,this.index),E=D[J],B=E.points[A.key],r=B[0],B=B[1],r===h&&A.key===D[J].base&&(r=H(w,k.min)),k.positiveValuesOnly&&0>=r&&(r=null),t.total=t.stackTotal=E.total,t.percentage=E.total&&t.y/E.total*100,t.stackY=B,E.setOffset(this.pointXOffset||0,this.barW||0));t.yBottom=x(r)?k.translate(r,0,1,0,1):
|
792
|
+
null;g&&(B=this.modifyValue(B,t));t.plotY=r="number"===typeof B&&Infinity!==B?Math.min(Math.max(-1E5,k.translate(B,0,1,0,1)),1E5):void 0;t.isInside=void 0!==r&&0<=r&&r<=k.len&&0<=v&&v<=b.len;t.clientX=m?n(b.translate(J,0,0,0,1,q)):v;t.negative=t.y<(w||0);t.category=d&&void 0!==d[t.x]?d[t.x]:t.x;t.isNull||(void 0!==K&&(u=Math.min(u,Math.abs(v-K))),K=v);t.zone=this.zones.length&&t.getZone()}this.closestPointRangePx=u},getValidPoints:function(a,c){var b=this.chart;return e(a||this.points||[],function(a){return c&&
|
793
|
+
!b.isInsidePlot(a.plotX,a.plotY,b.inverted)?!1:!a.isNull})},setClip:function(a){var c=this.chart,b=this.options,d=c.renderer,k=c.inverted,e=this.clipBox,f=e||c.clipBox,g=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,f.height,b.xAxis,b.yAxis].join(),p=c[g],q=c[g+"m"];p||(a&&(f.width=0,c[g+"m"]=q=d.clipRect(-99,k?-c.plotLeft:-c.plotTop,99,k?c.chartWidth:c.chartHeight)),c[g]=p=d.clipRect(f),p.count={length:0});a&&!p.count[this.index]&&(p.count[this.index]=!0,p.count.length+=1);!1!==b.clip&&
|
794
|
+
(this.group.clip(a||e?p:c.clipRect),this.markerGroup.clip(q),this.sharedClipKey=g);a||(p.count[this.index]&&(delete p.count[this.index],--p.count.length),0===p.count.length&&g&&c[g]&&(e||(c[g]=c[g].destroy()),c[g+"m"]&&(c[g+"m"]=c[g+"m"].destroy())))},animate:function(a){var c=this.chart,b=B(this.options.animation),d;a?this.setClip(b):(d=this.sharedClipKey,(a=c[d])&&a.animate({width:c.plotSizeX},b),c[d+"m"]&&c[d+"m"].animate({width:c.plotSizeX+99},b),this.animate=null)},afterAnimate:function(){this.setClip();
|
795
|
+
g(this,"afterAnimate")},drawPoints:function(){var a=this.points,c=this.chart,b,d,k,e,f=this.options.marker,g,q,m,w,h=this[this.specialGroup]||this.markerGroup,v=H(f.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*f.radius);if(!1!==f.enabled||this._hasPointMarkers)for(d=0;d<a.length;d++)k=a[d],b=k.plotY,e=k.graphic,g=k.marker||{},q=!!k.marker,m=v&&void 0===g.enabled||g.enabled,w=k.isInside,m&&p(b)&&null!==k.y?(b=H(g.symbol,this.symbol),k.hasImage=0===b.indexOf("url"),m=this.markerAttribs(k,
|
796
|
+
k.selected&&"select"),e?e[w?"show":"hide"](!0).animate(m):w&&(0<m.width||k.hasImage)&&(k.graphic=e=c.renderer.symbol(b,m.x,m.y,m.width,m.height,q?g:f).add(h)),e&&e.attr(this.pointAttribs(k,k.selected&&"select")),e&&e.addClass(k.getClassName(),!0)):e&&(k.graphic=e.destroy())},markerAttribs:function(a,c){var b=this.options.marker,d=a.marker||{},k=H(d.radius,b.radius);c&&(b=b.states[c],c=d.states&&d.states[c],k=H(c&&c.radius,b&&b.radius,k+(b&&b.radiusPlus||0)));a.hasImage&&(k=0);a={x:Math.floor(a.plotX)-
|
797
|
+
k,y:a.plotY-k};k&&(a.width=a.height=2*k);return a},pointAttribs:function(a,c){var b=this.options.marker,d=a&&a.options,k=d&&d.marker||{},e=this.color,f=d&&d.color,g=a&&a.color,d=H(k.lineWidth,b.lineWidth);a=a&&a.zone&&a.zone.color;e=f||a||g||e;a=k.fillColor||b.fillColor||e;e=k.lineColor||b.lineColor||e;c&&(b=b.states[c],c=k.states&&k.states[c]||{},d=H(c.lineWidth,b.lineWidth,d+H(c.lineWidthPlus,b.lineWidthPlus,0)),a=c.fillColor||b.fillColor||a,e=c.lineColor||b.lineColor||e);return{stroke:e,"stroke-width":d,
|
798
|
+
fill:a}},destroy:function(){var a=this,b=a.chart,d=/AppleWebKit\/533/.test(K.navigator.userAgent),e,k,f=a.data||[],p,w;g(a,"destroy");q(a);t(a.axisTypes||[],function(c){(w=a[c])&&w.series&&(m(w.series,a),w.isDirty=w.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(k=f.length;k--;)(p=f[k])&&p.destroy&&p.destroy();a.points=null;clearTimeout(a.animationTimeout);v(a,function(a,b){a instanceof c&&!a.survive&&(e=d&&"group"===b?"hide":"destroy",a[e]())});b.hoverSeries===a&&(b.hoverSeries=
|
799
|
+
null);m(b.series,a);b.orderSeries();v(a,function(c,b){delete a[b]})},getGraphPath:function(a,c,b){var d=this,l=d.options,e=l.step,f,g=[],p=[],q;a=a||d.points;(f=a.reversed)&&a.reverse();(e={right:1,center:2}[e]||e&&3)&&f&&(e=4-e);!l.connectNulls||c||b||(a=this.getValidPoints(a));t(a,function(k,f){var m=k.plotX,w=k.plotY,h=a[f-1];(k.leftCliff||h&&h.rightCliff)&&!b&&(q=!0);k.isNull&&!x(c)&&0<f?q=!l.connectNulls:k.isNull&&!c?q=!0:(0===f||q?f=["M",k.plotX,k.plotY]:d.getPointSpline?f=d.getPointSpline(a,
|
800
|
+
k,f):e?(f=1===e?["L",h.plotX,w]:2===e?["L",(h.plotX+m)/2,h.plotY,"L",(h.plotX+m)/2,w]:["L",m,h.plotY],f.push("L",m,w)):f=["L",m,w],p.push(k.x),e&&p.push(k.x),g.push.apply(g,f),q=!1)});g.xMap=p;return d.graphPath=g},drawGraph:function(){var a=this,c=this.options,b=(this.gappedPath||this.getGraphPath).call(this),d=[["graph","highcharts-graph",c.lineColor||this.color,c.dashStyle]];t(this.zones,function(b,l){d.push(["zone-graph-"+l,"highcharts-graph highcharts-zone-graph-"+l+" "+(b.className||""),b.color||
|
801
|
+
a.color,b.dashStyle||c.dashStyle])});t(d,function(d,l){var k=d[0],e=a[k];e?(e.endX=b.xMap,e.animate({d:b})):b.length&&(a[k]=a.chart.renderer.path(b).addClass(d[1]).attr({zIndex:1}).add(a.group),e={stroke:d[2],"stroke-width":c.lineWidth,fill:a.fillGraph&&a.color||"none"},d[3]?e.dashstyle=d[3]:"square"!==c.linecap&&(e["stroke-linecap"]=e["stroke-linejoin"]="round"),e=a[k].attr(e).shadow(2>l&&c.shadow));e&&(e.startX=b.xMap,e.isArea=b.isArea)})},applyZones:function(){var a=this,c=this.chart,b=c.renderer,
|
802
|
+
d=this.zones,k,e,f=this.clips||[],g,p=this.graph,q=this.area,m=Math.max(c.chartWidth,c.chartHeight),w=this[(this.zoneAxis||"y")+"Axis"],h,v,n=c.inverted,r,K,A,u,J=!1;d.length&&(p||q)&&w&&void 0!==w.min&&(v=w.reversed,r=w.horiz,p&&p.hide(),q&&q.hide(),h=w.getExtremes(),t(d,function(d,l){k=v?r?c.plotWidth:0:r?0:w.toPixels(h.min);k=Math.min(Math.max(H(e,k),0),m);e=Math.min(Math.max(Math.round(w.toPixels(H(d.value,h.max),!0)),0),m);J&&(k=e=w.toPixels(h.max));K=Math.abs(k-e);A=Math.min(k,e);u=Math.max(k,
|
803
|
+
e);w.isXAxis?(g={x:n?u:A,y:0,width:K,height:m},r||(g.x=c.plotHeight-g.x)):(g={x:0,y:n?u:A,width:m,height:K},r&&(g.y=c.plotWidth-g.y));n&&b.isVML&&(g=w.isXAxis?{x:0,y:v?A:u,height:g.width,width:c.chartWidth}:{x:g.y-c.plotLeft-c.spacingBox.x,y:0,width:g.height,height:c.chartHeight});f[l]?f[l].animate(g):(f[l]=b.clipRect(g),p&&a["zone-graph-"+l].clip(f[l]),q&&a["zone-area-"+l].clip(f[l]));J=d.value>h.max}),this.clips=f)},invertGroups:function(a){function c(){t(["group","markerGroup"],function(c){b[c]&&
|
804
|
+
(d.renderer.isVML&&b[c].attr({width:b.yAxis.len,height:b.xAxis.len}),b[c].width=b.yAxis.len,b[c].height=b.xAxis.len,b[c].invert(a))})}var b=this,d=b.chart,k;b.xAxis&&(k=E(d,"resize",c),E(b,"destroy",k),c(a),b.invertGroups=c)},plotGroup:function(a,c,b,d,k){var l=this[a],e=!l;e&&(this[a]=l=this.chart.renderer.g().attr({zIndex:d||.1}).add(k));l.addClass("highcharts-"+c+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||""),
|
805
|
+
!0);l.attr({visibility:b})[e?"attr":"animate"](this.getPlotBox());return l},getPlotBox:function(){var a=this.chart,c=this.xAxis,b=this.yAxis;a.inverted&&(c=b,b=this.xAxis);return{translateX:c?c.left:a.plotLeft,translateY:b?b.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,c=a.chart,b,d=a.options,k=!!a.animate&&c.renderer.isSVG&&B(d.animation).duration,e=a.visible?"inherit":"hidden",f=d.zIndex,g=a.hasRendered,p=c.seriesGroup,q=c.inverted;b=a.plotGroup("group","series",e,f,p);a.markerGroup=
|
806
|
+
a.plotGroup("markerGroup","markers",e,f,p);k&&a.animate(!0);b.inverted=a.isCartesian?q:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(q);!1===d.clip||a.sharedClipKey||g||b.clip(c.clipRect);k&&a.animate();g||(a.animationTimeout=w(function(){a.afterAnimate()},k));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,c=this.isDirty||this.isDirtyData,
|
807
|
+
b=this.group,d=this.xAxis,k=this.yAxis;b&&(a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight}),b.animate({translateX:H(d&&d.left,a.plotLeft),translateY:H(k&&k.top,a.plotTop)}));this.translate();this.render();c&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,c){var b=this.xAxis,d=this.yAxis,k=this.chart.inverted;return this.searchKDTree({clientX:k?b.len-a.chartY+b.pos:a.chartX-b.pos,plotY:k?d.len-a.chartX+d.pos:a.chartY-d.pos},c)},buildKDTree:function(){function a(b,
|
808
|
+
d,l){var k,e;if(e=b&&b.length)return k=c.kdAxisArray[d%l],b.sort(function(a,c){return a[k]-c[k]}),e=Math.floor(e/2),{point:b[e],left:a(b.slice(0,e),d+1,l),right:a(b.slice(e+1),d+1,l)}}this.buildingKdTree=!0;var c=this,b=-1<c.options.findNearestPointBy.indexOf("y")?2:1;delete c.kdTree;w(function(){c.kdTree=a(c.getValidPoints(null,!c.directTouch),b,b);c.buildingKdTree=!1},c.options.kdNow?0:1)},searchKDTree:function(a,c){function b(a,c,l,g){var p=c.point,q=d.kdAxisArray[l%g],m,w,h=p;w=x(a[k])&&x(p[k])?
|
809
|
+
Math.pow(a[k]-p[k],2):null;m=x(a[e])&&x(p[e])?Math.pow(a[e]-p[e],2):null;m=(w||0)+(m||0);p.dist=x(m)?Math.sqrt(m):Number.MAX_VALUE;p.distX=x(w)?Math.sqrt(w):Number.MAX_VALUE;q=a[q]-p[q];m=0>q?"left":"right";w=0>q?"right":"left";c[m]&&(m=b(a,c[m],l+1,g),h=m[f]<h[f]?m:p);c[w]&&Math.sqrt(q*q)<h[f]&&(a=b(a,c[w],l+1,g),h=a[f]<h[f]?a:h);return h}var d=this,k=this.kdAxisArray[0],e=this.kdAxisArray[1],f=c?"distX":"dist";c=-1<d.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||
|
810
|
+
this.buildKDTree();if(this.kdTree)return b(a,this.kdTree,c,c)}})})(L);(function(a){function E(a,f,g,e,d){var p=a.chart.inverted;this.axis=a;this.isNegative=g;this.options=f;this.x=e;this.total=null;this.points={};this.stack=d;this.rightCliff=this.leftCliff=0;this.alignOptions={align:f.align||(p?g?"left":"right":"center"),verticalAlign:f.verticalAlign||(p?"middle":g?"bottom":"top"),y:t(f.y,p?4:g?14:-6),x:t(f.x,p?g?-6:6:0)};this.textAlign=f.textAlign||(p?g?"right":"left":"center")}var B=a.Axis,F=a.Chart,
|
811
|
+
D=a.correctFloat,n=a.defined,h=a.destroyObjectProperties,u=a.each,r=a.format,x=a.objectEach,t=a.pick;a=a.Series;E.prototype={destroy:function(){h(this,this.axis)},render:function(a){var f=this.options,g=f.format,g=g?r(g,this):f.formatter.call(this);this.label?this.label.attr({text:g,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(g,null,null,f.useHTML).css(f.style).attr({align:this.textAlign,rotation:f.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,f){var g=this.axis,e=
|
812
|
+
g.chart,d=e.inverted,p=g.reversed,p=this.isNegative&&!p||!this.isNegative&&p,b=g.translate(g.usePercentage?100:this.total,0,0,0,1),g=g.translate(0),g=Math.abs(b-g);a=e.xAxis[0].translate(this.x)+a;var m=e.plotHeight,d={x:d?p?b:b-g:a,y:d?m-a-f:p?m-b-g:m-b,width:d?g:f,height:d?f:g};if(f=this.label)f.align(this.alignOptions,null,d),d=f.alignAttr,f[!1===this.options.crop||e.isInsidePlot(d.x,d.y)?"show":"hide"](!0)}};F.prototype.getStacks=function(){var a=this;u(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&
|
813
|
+
(a.oldStacks=a.stacks)});u(a.series,function(f){!f.options.stacking||!0!==f.visible&&!1!==a.options.chart.ignoreHiddenSeries||(f.stackKey=f.type+t(f.options.stack,""))})};B.prototype.buildStacks=function(){var a=this.series,f,g=t(this.options.reversedStacks,!0),e=a.length,d;if(!this.isXAxis){this.usePercentage=!1;for(d=e;d--;)a[g?d:e-d-1].setStackedPoints();for(d=e;d--;)f=a[g?d:e-d-1],f.setStackCliffs&&f.setStackCliffs();if(this.usePercentage)for(d=0;d<e;d++)a[d].setPercentStacks()}};B.prototype.renderStackTotals=
|
814
|
+
function(){var a=this.chart,f=a.renderer,g=this.stacks,e=this.stackTotalGroup;e||(this.stackTotalGroup=e=f.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());e.translate(a.plotLeft,a.plotTop);x(g,function(a){x(a,function(a){a.render(e)})})};B.prototype.resetStacks=function(){var a=this,f=a.stacks;a.isXAxis||x(f,function(f){x(f,function(e,d){e.touched<a.stacksTouched?(e.destroy(),delete f[d]):(e.total=null,e.cum=null)})})};B.prototype.cleanStacks=function(){var a;this.isXAxis||(this.oldStacks&&
|
815
|
+
(a=this.stacks=this.oldStacks),x(a,function(a){x(a,function(a){a.cum=a.total})}))};a.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a=this.processedXData,f=this.processedYData,g=[],e=f.length,d=this.options,p=d.threshold,b=d.startFromThreshold?p:0,h=d.stack,d=d.stacking,v=this.stackKey,r="-"+v,q=this.negStacks,u=this.yAxis,c=u.stacks,w=u.oldStacks,K,y,G,l,I,k,z;u.stacksTouched+=1;for(I=0;I<e;I++)k=a[I],z=f[I],
|
816
|
+
K=this.getStackIndicator(K,k,this.index),l=K.key,G=(y=q&&z<(b?0:p))?r:v,c[G]||(c[G]={}),c[G][k]||(w[G]&&w[G][k]?(c[G][k]=w[G][k],c[G][k].total=null):c[G][k]=new E(u,u.options.stackLabels,y,k,h)),G=c[G][k],null!==z&&(G.points[l]=G.points[this.index]=[t(G.cum,b)],n(G.cum)||(G.base=l),G.touched=u.stacksTouched,0<K.index&&!1===this.singleStacks&&(G.points[l][0]=G.points[this.index+","+k+",0"][0])),"percent"===d?(y=y?v:r,q&&c[y]&&c[y][k]?(y=c[y][k],G.total=y.total=Math.max(y.total,G.total)+Math.abs(z)||
|
817
|
+
0):G.total=D(G.total+(Math.abs(z)||0))):G.total=D(G.total+(z||0)),G.cum=t(G.cum,b)+(z||0),null!==z&&(G.points[l].push(G.cum),g[I]=G.cum);"percent"===d&&(u.usePercentage=!0);this.stackedYData=g;u.oldStacks={}}};a.prototype.setPercentStacks=function(){var a=this,f=a.stackKey,g=a.yAxis.stacks,e=a.processedXData,d;u([f,"-"+f],function(f){for(var b=e.length,p,h;b--;)if(p=e[b],d=a.getStackIndicator(d,p,a.index,f),p=(h=g[f]&&g[f][p])&&h.points[d.key])h=h.total?100/h.total:0,p[0]=D(p[0]*h),p[1]=D(p[1]*h),
|
818
|
+
a.stackedYData[b]=p[1]})};a.prototype.getStackIndicator=function(a,f,g,e){!n(a)||a.x!==f||e&&a.key!==e?a={x:f,index:0,key:e}:a.index++;a.key=[g,f,a.index].join();return a}})(L);(function(a){var E=a.addEvent,B=a.animate,F=a.Axis,D=a.createElement,n=a.css,h=a.defined,u=a.each,r=a.erase,x=a.extend,t=a.fireEvent,m=a.inArray,f=a.isNumber,g=a.isObject,e=a.isArray,d=a.merge,p=a.objectEach,b=a.pick,A=a.Point,v=a.Series,H=a.seriesTypes,q=a.setAnimation,J=a.splat;x(a.Chart.prototype,{addSeries:function(a,d,
|
819
|
+
e){var c,f=this;a&&(d=b(d,!0),t(f,"addSeries",{options:a},function(){c=f.initSeries(a);f.isDirtyLegend=!0;f.linkSeries();d&&f.redraw(e)}));return c},addAxis:function(a,e,f,g){var c=e?"xAxis":"yAxis",l=this.options;a=d(a,{index:this[c].length,isX:e});new F(this,a);l[c]=J(l[c]||{});l[c].push(a);b(f,!0)&&this.redraw(g)},showLoading:function(a){var c=this,b=c.options,d=c.loadingDiv,e=b.loading,l=function(){d&&n(d,{left:c.plotLeft+"px",top:c.plotTop+"px",width:c.plotWidth+"px",height:c.plotHeight+"px"})};
|
820
|
+
d||(c.loadingDiv=d=D("div",{className:"highcharts-loading highcharts-loading-hidden"},null,c.container),c.loadingSpan=D("span",{className:"highcharts-loading-inner"},null,d),E(c,"redraw",l));d.className="highcharts-loading";c.loadingSpan.innerHTML=a||b.lang.loading;n(d,x(e.style,{zIndex:10}));n(c.loadingSpan,e.labelStyle);c.loadingShown||(n(d,{opacity:0,display:""}),B(d,{opacity:e.style.opacity||.5},{duration:e.showDuration||0}));c.loadingShown=!0;l()},hideLoading:function(){var a=this.options,b=
|
821
|
+
this.loadingDiv;b&&(b.className="highcharts-loading highcharts-loading-hidden",B(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){n(b,{display:"none"})}}));this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions tooltip".split(" "),
|
822
|
+
update:function(a,e){var c=this,g={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},q=a.chart,l,w;if(q){d(!0,c.options.chart,q);"className"in q&&c.setClassName(q.className);if("inverted"in q||"polar"in q)c.propFromSeries(),l=!0;"alignTicks"in q&&(l=!0);p(q,function(a,b){-1!==m("chart."+b,c.propsRequireUpdateSeries)&&(w=!0);-1!==m(b,c.propsRequireDirtyBox)&&(c.isDirtyBox=!0)});"style"in q&&c.renderer.setStyle(q.style)}a.colors&&(this.options.colors=a.colors);a.plotOptions&&d(!0,this.options.plotOptions,
|
823
|
+
a.plotOptions);p(a,function(a,b){if(c[b]&&"function"===typeof c[b].update)c[b].update(a,!1);else if("function"===typeof c[g[b]])c[g[b]](a);"chart"!==b&&-1!==m(b,c.propsRequireUpdateSeries)&&(w=!0)});u("xAxis yAxis zAxis series colorAxis pane".split(" "),function(b){a[b]&&u(J(a[b]),function(a,d){(d=h(a.id)&&c.get(a.id)||c[b][d])&&d.coll===b&&d.update(a,!1)})});l&&u(c.axes,function(a){a.update({},!1)});w&&u(c.series,function(a){a.update({},!1)});a.loading&&d(!0,c.options.loading,a.loading);l=q&&q.width;
|
824
|
+
q=q&&q.height;f(l)&&l!==c.chartWidth||f(q)&&q!==c.chartHeight?c.setSize(l,q):b(e,!0)&&c.redraw()},setSubtitle:function(a){this.setTitle(void 0,a)}});x(A.prototype,{update:function(a,d,e,f){function c(){l.applyOptions(a);null===l.y&&k&&(l.graphic=k.destroy());g(a,!0)&&(k&&k.element&&a&&a.marker&&a.marker.symbol&&(l.graphic=k.destroy()),a&&a.dataLabels&&l.dataLabel&&(l.dataLabel=l.dataLabel.destroy()));q=l.index;p.updateParallelArrays(l,q);w.data[q]=g(w.data[q],!0)||g(a,!0)?l.options:a;p.isDirty=p.isDirtyData=
|
825
|
+
!0;!p.fixedBox&&p.hasCartesianSeries&&(h.isDirtyBox=!0);"point"===w.legendType&&(h.isDirtyLegend=!0);d&&h.redraw(e)}var l=this,p=l.series,k=l.graphic,q,h=p.chart,w=p.options;d=b(d,!0);!1===f?c():l.firePointEvent("update",{options:a},c)},remove:function(a,b){this.series.removePoint(m(this,this.series.data),a,b)}});x(v.prototype,{addPoint:function(a,d,e,f){var c=this.options,l=this.data,g=this.chart,k=this.xAxis,k=k&&k.hasNames&&k.names,p=c.data,q,h,m=this.xData,w,v;d=b(d,!0);q={series:this};this.pointClass.prototype.applyOptions.apply(q,
|
826
|
+
[a]);v=q.x;w=m.length;if(this.requireSorting&&v<m[w-1])for(h=!0;w&&m[w-1]>v;)w--;this.updateParallelArrays(q,"splice",w,0,0);this.updateParallelArrays(q,w);k&&q.name&&(k[v]=q.name);p.splice(w,0,a);h&&(this.data.splice(w,0,null),this.processData());"point"===c.legendType&&this.generatePoints();e&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(q,"shift"),p.shift()));this.isDirtyData=this.isDirty=!0;d&&g.redraw(f)},removePoint:function(a,d,e){var c=this,f=c.data,l=f[a],g=c.points,
|
827
|
+
k=c.chart,p=function(){g&&g.length===f.length&&g.splice(a,1);f.splice(a,1);c.options.data.splice(a,1);c.updateParallelArrays(l||{series:c},"splice",a,1);l&&l.destroy();c.isDirty=!0;c.isDirtyData=!0;d&&k.redraw()};q(e,k);d=b(d,!0);l?l.firePointEvent("remove",null,p):p()},remove:function(a,d,e){function c(){f.destroy();l.isDirtyLegend=l.isDirtyBox=!0;l.linkSeries();b(a,!0)&&l.redraw(d)}var f=this,l=f.chart;!1!==e?t(f,"remove",null,c):c()},update:function(a,e){var c=this,f=c.chart,g=c.userOptions,l=
|
828
|
+
c.oldType||c.type,p=a.type||g.type||f.options.chart.type,k=H[l].prototype,q=["group","markerGroup","dataLabelsGroup"],h;if(Object.keys&&"data"===Object.keys(a).toString())return this.setData(a.data,e);if(p&&p!==l||void 0!==a.zIndex)q.length=0;u(q,function(a){q[a]=c[a];delete c[a]});a=d(g,{animation:!1,index:c.index,pointStart:c.xData[0]},{data:c.options.data},a);c.remove(!1,null,!1);for(h in k)c[h]=void 0;x(c,H[p||l].prototype);u(q,function(a){c[a]=q[a]});c.init(f,a);c.oldType=l;f.linkSeries();b(e,
|
829
|
+
!0)&&f.redraw(!1)}});x(F.prototype,{update:function(a,e){var c=this.chart;a=c.options[this.coll][this.options.index]=d(this.userOptions,a);this.destroy(!0);this.init(c,x(a,{events:void 0}));c.isDirtyBox=!0;b(e,!0)&&c.redraw()},remove:function(a){for(var c=this.chart,d=this.coll,f=this.series,g=f.length;g--;)f[g]&&f[g].remove(!1);r(c.axes,this);r(c[d],this);e(c.options[d])?c.options[d].splice(this.options.index,1):delete c.options[d];u(c[d],function(a,c){a.options.index=c});this.destroy();c.isDirtyBox=
|
830
|
+
!0;b(a,!0)&&c.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(L);(function(a){var E=a.color,B=a.each,F=a.map,D=a.pick,n=a.Series,h=a.seriesType;h("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var h=[],n=[],x=this.xAxis,t=this.yAxis,m=t.stacks[this.stackKey],f={},g=this.points,e=this.index,d=t.series,p=d.length,b,A=D(t.options.reversedStacks,!0)?1:-1,v;if(this.options.stacking){for(v=
|
831
|
+
0;v<g.length;v++)f[g[v].x]=g[v];a.objectEach(m,function(a,b){null!==a.total&&n.push(b)});n.sort(function(a,b){return a-b});b=F(d,function(){return this.visible});B(n,function(a,d){var g=0,c,q;if(f[a]&&!f[a].isNull)h.push(f[a]),B([-1,1],function(g){var h=1===g?"rightNull":"leftNull",w=0,l=m[n[d+g]];if(l)for(v=e;0<=v&&v<p;)c=l.points[v],c||(v===e?f[a][h]=!0:b[v]&&(q=m[a].points[v])&&(w-=q[1]-q[0])),v+=A;f[a][1===g?"rightCliff":"leftCliff"]=w});else{for(v=e;0<=v&&v<p;){if(c=m[a].points[v]){g=c[1];break}v+=
|
832
|
+
A}g=t.translate(g,0,1,0,1);h.push({isNull:!0,plotX:x.translate(a,0,0,0,1),x:a,plotY:g,yBottom:g})}})}return h},getGraphPath:function(a){var h=n.prototype.getGraphPath,u=this.options,t=u.stacking,m=this.yAxis,f,g,e=[],d=[],p=this.index,b,A=m.stacks[this.stackKey],v=u.threshold,H=m.getThreshold(u.threshold),q,u=u.connectNulls||"percent"===t,J=function(c,f,g){var q=a[c];c=t&&A[q.x].points[p];var h=q[g+"Null"]||0;g=q[g+"Cliff"]||0;var l,w,q=!0;g||h?(l=(h?c[0]:c[1])+g,w=c[0]+g,q=!!h):!t&&a[f]&&a[f].isNull&&
|
833
|
+
(l=w=v);void 0!==l&&(d.push({plotX:b,plotY:null===l?H:m.getThreshold(l),isNull:q,isCliff:!0}),e.push({plotX:b,plotY:null===w?H:m.getThreshold(w),doCurve:!1}))};a=a||this.points;t&&(a=this.getStackPoints());for(f=0;f<a.length;f++)if(g=a[f].isNull,b=D(a[f].rectPlotX,a[f].plotX),q=D(a[f].yBottom,H),!g||u)u||J(f,f-1,"left"),g&&!t&&u||(d.push(a[f]),e.push({x:f,plotX:b,plotY:q})),u||J(f,f+1,"right");f=h.call(this,d,!0,!0);e.reversed=!0;g=h.call(this,e,!0,!0);g.length&&(g[0]="L");g=f.concat(g);h=h.call(this,
|
834
|
+
d,!1,u);g.xMap=f.xMap;this.areaPath=g;return h},drawGraph:function(){this.areaPath=[];n.prototype.drawGraph.apply(this);var a=this,h=this.areaPath,x=this.options,t=[["area","highcharts-area",this.color,x.fillColor]];B(this.zones,function(h,f){t.push(["zone-area-"+f,"highcharts-area highcharts-zone-area-"+f+" "+h.className,h.color||a.color,h.fillColor||x.fillColor])});B(t,function(m){var f=m[0],g=a[f];g?(g.endX=h.xMap,g.animate({d:h})):(g=a[f]=a.chart.renderer.path(h).addClass(m[1]).attr({fill:D(m[3],
|
835
|
+
E(m[2]).setOpacity(D(x.fillOpacity,.75)).get()),zIndex:0}).add(a.group),g.isArea=!0);g.startX=h.xMap;g.shiftUnit=x.step?2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(L);(function(a){var E=a.pick;a=a.seriesType;a("spline","line",{},{getPointSpline:function(a,F,D){var n=F.plotX,h=F.plotY,u=a[D-1];D=a[D+1];var r,x,t,m;if(u&&!u.isNull&&!1!==u.doCurve&&!F.isCliff&&D&&!D.isNull&&!1!==D.doCurve&&!F.isCliff){a=u.plotY;t=D.plotX;D=D.plotY;var f=0;r=(1.5*n+u.plotX)/2.5;x=(1.5*h+a)/2.5;t=(1.5*
|
836
|
+
n+t)/2.5;m=(1.5*h+D)/2.5;t!==r&&(f=(m-x)*(t-n)/(t-r)+h-m);x+=f;m+=f;x>a&&x>h?(x=Math.max(a,h),m=2*h-x):x<a&&x<h&&(x=Math.min(a,h),m=2*h-x);m>D&&m>h?(m=Math.max(D,h),x=2*h-m):m<D&&m<h&&(m=Math.min(D,h),x=2*h-m);F.rightContX=t;F.rightContY=m}F=["C",E(u.rightContX,u.plotX),E(u.rightContY,u.plotY),E(r,n),E(x,h),n,h];u.rightContX=u.rightContY=null;return F}})})(L);(function(a){var E=a.seriesTypes.area.prototype,B=a.seriesType;B("areaspline","spline",a.defaultPlotOptions.area,{getStackPoints:E.getStackPoints,
|
837
|
+
getGraphPath:E.getGraphPath,setStackCliffs:E.setStackCliffs,drawGraph:E.drawGraph,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(L);(function(a){var E=a.animObject,B=a.color,F=a.each,D=a.extend,n=a.isNumber,h=a.merge,u=a.pick,r=a.Series,x=a.seriesType,t=a.svg;x("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1,shadow:!1},select:{color:"#cccccc",borderColor:"#000000",shadow:!1}},
|
838
|
+
dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){r.prototype.init.apply(this,arguments);var a=this,f=a.chart;f.hasRendered&&F(f.series,function(f){f.type===a.type&&(f.isDirty=!0)})},getColumnMetrics:function(){var a=this,f=a.options,g=a.xAxis,e=a.yAxis,d=g.reversed,p,b={},h=0;!1===f.grouping?
|
839
|
+
h=1:F(a.chart.series,function(d){var c=d.options,f=d.yAxis,g;d.type!==a.type||!d.visible&&a.chart.options.chart.ignoreHiddenSeries||e.len!==f.len||e.pos!==f.pos||(c.stacking?(p=d.stackKey,void 0===b[p]&&(b[p]=h++),g=b[p]):!1!==c.grouping&&(g=h++),d.columnIndex=g)});var v=Math.min(Math.abs(g.transA)*(g.ordinalSlope||f.pointRange||g.closestPointRange||g.tickInterval||1),g.len),n=v*f.groupPadding,q=(v-2*n)/(h||1),f=Math.min(f.maxPointWidth||g.len,u(f.pointWidth,q*(1-2*f.pointPadding)));a.columnMetrics=
|
840
|
+
{width:f,offset:(q-f)/2+(n+((a.columnIndex||0)+(d?1:0))*q-v/2)*(d?-1:1)};return a.columnMetrics},crispCol:function(a,f,g,e){var d=this.chart,p=this.borderWidth,b=-(p%2?.5:0),p=p%2?.5:1;d.inverted&&d.renderer.isVML&&(p+=1);this.options.crisp&&(g=Math.round(a+g)+b,a=Math.round(a)+b,g-=a);e=Math.round(f+e)+p;b=.5>=Math.abs(f)&&.5<e;f=Math.round(f)+p;e-=f;b&&e&&(--f,e+=1);return{x:a,y:f,width:g,height:e}},translate:function(){var a=this,f=a.chart,g=a.options,e=a.dense=2>a.closestPointRange*a.xAxis.transA,
|
841
|
+
e=a.borderWidth=u(g.borderWidth,e?0:1),d=a.yAxis,p=a.translatedThreshold=d.getThreshold(g.threshold),b=u(g.minPointLength,5),h=a.getColumnMetrics(),v=h.width,n=a.barW=Math.max(v,1+2*e),q=a.pointXOffset=h.offset;f.inverted&&(p-=.5);g.pointPadding&&(n=Math.ceil(n));r.prototype.translate.apply(a);F(a.points,function(e){var c=u(e.yBottom,p),g=999+Math.abs(c),g=Math.min(Math.max(-g,e.plotY),d.len+g),h=e.plotX+q,m=n,r=Math.min(g,c),l,I=Math.max(g,c)-r;Math.abs(I)<b&&b&&(I=b,l=!d.reversed&&!e.negative||
|
842
|
+
d.reversed&&e.negative,r=Math.abs(r-p)>b?c-b:p-(l?b:0));e.barX=h;e.pointWidth=v;e.tooltipPos=f.inverted?[d.len+d.pos-f.plotLeft-g,a.xAxis.len-h-m/2,I]:[h+m/2,g+d.pos-f.plotTop,I];e.shapeType="rect";e.shapeArgs=a.crispCol.apply(a,e.isNull?[h,p,m,0]:[h,r,m,I])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(a,f){var g=this.options,e,d=this.pointAttrToOptions||{};
|
843
|
+
e=d.stroke||"borderColor";var p=d["stroke-width"]||"borderWidth",b=a&&a.color||this.color,m=a[e]||g[e]||this.color||b,v=a[p]||g[p]||this[p]||0,d=g.dashStyle;a&&this.zones.length&&(b=a.getZone(),b=a.options.color||b&&b.color||this.color);f&&(a=h(g.states[f],a.options.states&&a.options.states[f]||{}),f=a.brightness,b=a.color||void 0!==f&&B(b).brighten(a.brightness).get()||b,m=a[e]||m,v=a[p]||v,d=a.dashStyle||d);e={fill:b,stroke:m,"stroke-width":v};g.borderRadius&&(e.r=g.borderRadius);d&&(e.dashstyle=
|
844
|
+
d);return e},drawPoints:function(){var a=this,f=this.chart,g=a.options,e=f.renderer,d=g.animationLimit||250,p;F(a.points,function(b){var m=b.graphic;if(n(b.plotY)&&null!==b.y){p=b.shapeArgs;if(m)m[f.pointCount<d?"animate":"attr"](h(p));else b.graphic=m=e[b.shapeType](p).add(b.group||a.group);m.attr(a.pointAttribs(b,b.selected&&"select")).shadow(g.shadow,null,g.stacking&&!g.borderRadius);m.addClass(b.getClassName(),!0)}else m&&(b.graphic=m.destroy())})},animate:function(a){var f=this,g=this.yAxis,
|
845
|
+
e=f.options,d=this.chart.inverted,p={};t&&(a?(p.scaleY=.001,a=Math.min(g.pos+g.len,Math.max(g.pos,g.toPixels(e.threshold))),d?p.translateX=a-g.len:p.translateY=a,f.group.attr(p)):(p[d?"translateX":"translateY"]=g.pos,f.group.animate(p,D(E(f.options.animation),{step:function(a,d){f.group.attr({scaleY:Math.max(.001,d.pos)})}})),f.animate=null))},remove:function(){var a=this,f=a.chart;f.hasRendered&&F(f.series,function(f){f.type===a.type&&(f.isDirty=!0)});r.prototype.remove.apply(a,arguments)}})})(L);
|
846
|
+
(function(a){a=a.seriesType;a("bar","column",null,{inverted:!0})})(L);(function(a){var E=a.Series;a=a.seriesType;a("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cspan style\x3d"font-size: 0.85em"\x3e {series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,
|
847
|
+
trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&E.prototype.drawGraph.call(this)}})})(L);(function(a){var E=a.pick,B=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,D=this.chart,n=2*(a.slicedOffset||0),h=D.plotWidth-2*n,D=D.plotHeight-2*n,u=a.center,u=[E(u[0],"50%"),E(u[1],"50%"),a.size||"100%",a.innerSize||0],r=Math.min(h,D),x,t;for(x=0;4>x;++x)t=u[x],a=2>x||2===x&&/%$/.test(t),u[x]=B(t,[h,
|
848
|
+
D,r,u[2]][x])+(a?n:0);u[3]>u[2]&&(u[3]=u[2]);return u}}})(L);(function(a){var E=a.addEvent,B=a.defined,F=a.each,D=a.extend,n=a.inArray,h=a.noop,u=a.pick,r=a.Point,x=a.Series,t=a.seriesType,m=a.setAnimation;t("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},
|
849
|
+
borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1,shadow:!1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var f=this,e=f.points,d=f.startAngleRad;a||(F(e,function(a){var b=a.graphic,e=a.shapeArgs;b&&(b.attr({r:a.startR||f.center[3]/2,start:d,end:d}),b.animate({r:e.r,start:e.start,end:e.end},f.options.animation))}),f.animate=null)},
|
850
|
+
updateTotals:function(){var a,g=0,e=this.points,d=e.length,p,b=this.options.ignoreHiddenPoint;for(a=0;a<d;a++)p=e[a],g+=b&&!p.visible?0:p.isNull?0:p.y;this.total=g;for(a=0;a<d;a++)p=e[a],p.percentage=0<g&&(p.visible||!b)?p.y/g*100:0,p.total=g},generatePoints:function(){x.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var f=0,e=this.options,d=e.slicedOffset,p=d+(e.borderWidth||0),b,h,v,m=e.startAngle||0,q=this.startAngleRad=Math.PI/180*(m-90),m=
|
851
|
+
(this.endAngleRad=Math.PI/180*(u(e.endAngle,m+360)-90))-q,n=this.points,c,w=e.dataLabels.distance,e=e.ignoreHiddenPoint,r,y=n.length,t;a||(this.center=a=this.getCenter());this.getX=function(c,b,d){v=Math.asin(Math.min((c-a[1])/(a[2]/2+d.labelDistance),1));return a[0]+(b?-1:1)*Math.cos(v)*(a[2]/2+d.labelDistance)};for(r=0;r<y;r++){t=n[r];t.labelDistance=u(t.options.dataLabels&&t.options.dataLabels.distance,w);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,t.labelDistance);b=q+f*m;if(!e||t.visible)f+=
|
852
|
+
t.percentage/100;h=q+f*m;t.shapeType="arc";t.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1E3*b)/1E3,end:Math.round(1E3*h)/1E3};v=(h+b)/2;v>1.5*Math.PI?v-=2*Math.PI:v<-Math.PI/2&&(v+=2*Math.PI);t.slicedTranslation={translateX:Math.round(Math.cos(v)*d),translateY:Math.round(Math.sin(v)*d)};h=Math.cos(v)*a[2]/2;c=Math.sin(v)*a[2]/2;t.tooltipPos=[a[0]+.7*h,a[1]+.7*c];t.half=v<-Math.PI/2||v>Math.PI/2?1:0;t.angle=v;b=Math.min(p,t.labelDistance/5);t.labelPos=[a[0]+h+Math.cos(v)*t.labelDistance,
|
853
|
+
a[1]+c+Math.sin(v)*t.labelDistance,a[0]+h+Math.cos(v)*b,a[1]+c+Math.sin(v)*b,a[0]+h,a[1]+c,0>t.labelDistance?"center":t.half?"right":"left",v]}},drawGraph:null,drawPoints:function(){var a=this,g=a.chart.renderer,e,d,p,b,h=a.options.shadow;h&&!a.shadowGroup&&(a.shadowGroup=g.g("shadow").add(a.group));F(a.points,function(f){if(!f.isNull){d=f.graphic;b=f.shapeArgs;e=f.getTranslate();var m=f.shadowGroup;h&&!m&&(m=f.shadowGroup=g.g("shadow").add(a.shadowGroup));m&&m.attr(e);p=a.pointAttribs(f,f.selected&&
|
854
|
+
"select");d?d.setRadialReference(a.center).attr(p).animate(D(b,e)):(f.graphic=d=g[f.shapeType](b).setRadialReference(a.center).attr(e).add(a.group),f.visible||d.attr({visibility:"hidden"}),d.attr(p).attr({"stroke-linejoin":"round"}).shadow(h,m));d.addClass(f.getClassName())}})},searchPoint:h,sortByAngle:function(a,g){a.sort(function(a,d){return void 0!==a.angle&&(d.angle-a.angle)*g})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:h},{init:function(){r.prototype.init.apply(this,
|
855
|
+
arguments);var a=this,g;a.name=u(a.name,"Slice");g=function(e){a.slice("select"===e.type)};E(a,"select",g);E(a,"unselect",g);return a},isValid:function(){return a.isNumber(this.y,!0)&&0<=this.y},setVisible:function(a,g){var e=this,d=e.series,f=d.chart,b=d.options.ignoreHiddenPoint;g=u(g,b);a!==e.visible&&(e.visible=e.options.visible=a=void 0===a?!e.visible:a,d.options.data[n(e,d.data)]=e.options,F(["graphic","dataLabel","connector","shadowGroup"],function(b){if(e[b])e[b][a?"show":"hide"](!0)}),e.legendItem&&
|
856
|
+
f.legend.colorizeItem(e,a),a||"hover"!==e.state||e.setState(""),b&&(d.isDirty=!0),g&&f.redraw())},slice:function(a,g,e){var d=this.series;m(e,d.chart);u(g,!0);this.sliced=this.options.sliced=B(a)?a:!this.sliced;d.options.data[n(this,d.data)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var f=this.shapeArgs;return this.sliced||
|
857
|
+
!this.visible?[]:this.series.chart.renderer.symbols.arc(f.x,f.y,f.r+a,f.r+a,{innerR:this.shapeArgs.r,start:f.start,end:f.end})}})})(L);(function(a){var E=a.addEvent,B=a.arrayMax,F=a.defined,D=a.each,n=a.extend,h=a.format,u=a.map,r=a.merge,x=a.noop,t=a.pick,m=a.relativeLength,f=a.Series,g=a.seriesTypes,e=a.stableSort;a.distribute=function(a,f){function b(a,b){return a.target-b.target}var d,g=!0,p=a,q=[],h;h=0;for(d=a.length;d--;)h+=a[d].size;if(h>f){e(a,function(a,b){return(b.rank||0)-(a.rank||0)});
|
858
|
+
for(h=d=0;h<=f;)h+=a[d].size,d++;q=a.splice(d-1,a.length)}e(a,b);for(a=u(a,function(a){return{size:a.size,targets:[a.target]}});g;){for(d=a.length;d--;)g=a[d],h=(Math.min.apply(0,g.targets)+Math.max.apply(0,g.targets))/2,g.pos=Math.min(Math.max(0,h-g.size/2),f-g.size);d=a.length;for(g=!1;d--;)0<d&&a[d-1].pos+a[d-1].size>a[d].pos&&(a[d-1].size+=a[d].size,a[d-1].targets=a[d-1].targets.concat(a[d].targets),a[d-1].pos+a[d-1].size>f&&(a[d-1].pos=f-a[d-1].size),a.splice(d,1),g=!0)}d=0;D(a,function(a){var c=
|
859
|
+
0;D(a.targets,function(){p[d].pos=a.pos+c;c+=p[d].size;d++})});p.push.apply(p,q);e(p,b)};f.prototype.drawDataLabels=function(){var d=this,e=d.options,b=e.dataLabels,f=d.points,g,m,q=d.hasRendered||0,n,c,w=t(b.defer,!!e.animation),u=d.chart.renderer;if(b.enabled||d._hasPointLabels)d.dlProcessOptions&&d.dlProcessOptions(b),c=d.plotGroup("dataLabelsGroup","data-labels",w&&!q?"hidden":"visible",b.zIndex||6),w&&(c.attr({opacity:+q}),q||E(d,"afterAnimate",function(){d.visible&&c.show(!0);c[e.animation?
|
860
|
+
"animate":"attr"]({opacity:1},{duration:200})})),m=b,D(f,function(f){var q,l=f.dataLabel,p,k,w=f.connector,v=!l,y;g=f.dlOptions||f.options&&f.options.dataLabels;if(q=t(g&&g.enabled,m.enabled)&&null!==f.y)b=r(m,g),p=f.getLabelConfig(),n=b.format?h(b.format,p):b.formatter.call(p,b),y=b.style,p=b.rotation,y.color=t(b.color,y.color,d.color,"#000000"),"contrast"===y.color&&(f.contrastColor=u.getContrast(f.color||d.color),y.color=b.inside||0>t(f.labelDistance,b.distance)||e.stacking?f.contrastColor:"#000000"),
|
861
|
+
e.cursor&&(y.cursor=e.cursor),k={fill:b.backgroundColor,stroke:b.borderColor,"stroke-width":b.borderWidth,r:b.borderRadius||0,rotation:p,padding:b.padding,zIndex:1},a.objectEach(k,function(a,c){void 0===a&&delete k[c]});!l||q&&F(n)?q&&F(n)&&(l?k.text=n:(l=f.dataLabel=u[p?"text":"label"](n,0,-9999,b.shape,null,null,b.useHTML,null,"data-label"),l.addClass("highcharts-data-label-color-"+f.colorIndex+" "+(b.className||"")+(b.useHTML?"highcharts-tracker":""))),l.attr(k),l.css(y).shadow(b.shadow),l.added||
|
862
|
+
l.add(c),d.alignDataLabel(f,l,b,null,v)):(f.dataLabel=l=l.destroy(),w&&(f.connector=w.destroy()))})};f.prototype.alignDataLabel=function(a,e,b,f,g){var d=this.chart,q=d.inverted,h=t(a.plotX,-9999),c=t(a.plotY,-9999),p=e.getBBox(),m,v=b.rotation,r=b.align,l=this.visible&&(a.series.forceDL||d.isInsidePlot(h,Math.round(c),q)||f&&d.isInsidePlot(h,q?f.x+1:f.y+f.height-1,q)),I="justify"===t(b.overflow,"justify");if(l&&(m=b.style.fontSize,m=d.renderer.fontMetrics(m,e).b,f=n({x:q?d.plotWidth-c:h,y:Math.round(q?
|
863
|
+
d.plotHeight-h:c),width:0,height:0},f),n(b,{width:p.width,height:p.height}),v?(I=!1,h=d.renderer.rotCorr(m,v),h={x:f.x+b.x+f.width/2+h.x,y:f.y+b.y+{top:0,middle:.5,bottom:1}[b.verticalAlign]*f.height},e[g?"attr":"animate"](h).attr({align:r}),c=(v+720)%360,c=180<c&&360>c,"left"===r?h.y-=c?p.height:0:"center"===r?(h.x-=p.width/2,h.y-=p.height/2):"right"===r&&(h.x-=p.width,h.y-=c?0:p.height)):(e.align(b,null,f),h=e.alignAttr),I?a.isLabelJustified=this.justifyDataLabel(e,b,h,p,f,g):t(b.crop,!0)&&(l=d.isInsidePlot(h.x,
|
864
|
+
h.y)&&d.isInsidePlot(h.x+p.width,h.y+p.height)),b.shape&&!v))e[g?"attr":"animate"]({anchorX:q?d.plotWidth-a.plotY:a.plotX,anchorY:q?d.plotHeight-a.plotX:a.plotY});l||(e.attr({y:-9999}),e.placed=!1)};f.prototype.justifyDataLabel=function(a,e,b,f,g,h){var d=this.chart,p=e.align,c=e.verticalAlign,m,n,v=a.box?0:a.padding||0;m=b.x+v;0>m&&("right"===p?e.align="left":e.x=-m,n=!0);m=b.x+f.width-v;m>d.plotWidth&&("left"===p?e.align="right":e.x=d.plotWidth-m,n=!0);m=b.y+v;0>m&&("bottom"===c?e.verticalAlign=
|
865
|
+
"top":e.y=-m,n=!0);m=b.y+f.height-v;m>d.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=d.plotHeight-m,n=!0);n&&(a.placed=!h,a.align(e,null,g));return n};g.pie&&(g.pie.prototype.drawDataLabels=function(){var d=this,e=d.data,b,g=d.chart,h=d.options.dataLabels,m=t(h.connectorPadding,10),q=t(h.connectorWidth,1),n=g.plotWidth,c=g.plotHeight,w,r=d.center,y=r[2]/2,u=r[1],l,I,k,z,x=[[],[]],M,N,E,O,C=[0,0,0,0];d.visible&&(h.enabled||d._hasPointLabels)&&(D(e,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&
|
866
|
+
(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),f.prototype.drawDataLabels.apply(d),D(e,function(a){a.dataLabel&&a.visible&&(x[a.half].push(a),a.dataLabel._pos=null)}),D(x,function(e,f){var q,p,w=e.length,v=[],t;if(w)for(d.sortByAngle(e,f-.5),0<d.maxLabelDistance&&(q=Math.max(0,u-y-d.maxLabelDistance),p=Math.min(u+y+d.maxLabelDistance,g.plotHeight),D(e,function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,u-y-a.labelDistance),a.bottom=
|
867
|
+
Math.min(u+y+a.labelDistance,g.plotHeight),t=a.dataLabel.getBBox().height||21,a.positionsIndex=v.push({target:a.labelPos[1]-a.top+t/2,size:t,rank:a.y})-1)}),a.distribute(v,p+t-q)),O=0;O<w;O++)b=e[O],p=b.positionsIndex,k=b.labelPos,l=b.dataLabel,E=!1===b.visible?"hidden":"inherit",q=k[1],v&&F(v[p])?void 0===v[p].pos?E="hidden":(z=v[p].size,N=b.top+v[p].pos):N=q,delete b.positionIndex,M=h.justify?r[0]+(f?-1:1)*(y+b.labelDistance):d.getX(N<b.top+2||N>b.bottom-2?q:N,f,b),l._attr={visibility:E,align:k[6]},
|
868
|
+
l._pos={x:M+h.x+({left:m,right:-m}[k[6]]||0),y:N+h.y-10},k.x=M,k.y=N,I=l.getBBox().width,q=null,M-I<m?(q=Math.round(I-M+m),C[3]=Math.max(q,C[3])):M+I>n-m&&(q=Math.round(M+I-n+m),C[1]=Math.max(q,C[1])),0>N-z/2?C[0]=Math.max(Math.round(-N+z/2),C[0]):N+z/2>c&&(C[2]=Math.max(Math.round(N+z/2-c),C[2])),l.sideOverflow=q}),0===B(C)||this.verifyDataLabelOverflow(C))&&(this.placeDataLabels(),q&&D(this.points,function(a){var c;w=a.connector;if((l=a.dataLabel)&&l._pos&&a.visible&&0<a.labelDistance){E=l._attr.visibility;
|
869
|
+
if(c=!w)a.connector=w=g.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex).add(d.dataLabelsGroup),w.attr({"stroke-width":q,stroke:h.connectorColor||a.color||"#666666"});w[c?"attr":"animate"]({d:d.connectorPath(a.labelPos)});w.attr("visibility",E)}else w&&(a.connector=w.destroy())}))},g.pie.prototype.connectorPath=function(a){var d=a.x,b=a.y;return t(this.options.dataLabels.softConnector,!0)?["M",d+("left"===a[6]?5:-5),b,"C",d,b,2*a[2]-a[4],2*a[3]-a[5],a[2],
|
870
|
+
a[3],"L",a[4],a[5]]:["M",d+("left"===a[6]?5:-5),b,"L",a[2],a[3],"L",a[4],a[5]]},g.pie.prototype.placeDataLabels=function(){D(this.points,function(a){var d=a.dataLabel;d&&a.visible&&((a=d._pos)?(d.sideOverflow&&(d._attr.width=d.getBBox().width-d.sideOverflow,d.css({width:d._attr.width+"px",textOverflow:"ellipsis"}),d.shortened=!0),d.attr(d._attr),d[d.moved?"animate":"attr"](a),d.moved=!0):d&&d.attr({y:-9999}))},this)},g.pie.prototype.alignDataLabel=x,g.pie.prototype.verifyDataLabelOverflow=function(a){var d=
|
871
|
+
this.center,b=this.options,e=b.center,f=b.minSize||80,g,h=null!==b.size;h||(null!==e[0]?g=Math.max(d[2]-Math.max(a[1],a[3]),f):(g=Math.max(d[2]-a[1]-a[3],f),d[0]+=(a[3]-a[1])/2),null!==e[1]?g=Math.max(Math.min(g,d[2]-Math.max(a[0],a[2])),f):(g=Math.max(Math.min(g,d[2]-a[0]-a[2]),f),d[1]+=(a[0]-a[2])/2),g<d[2]?(d[2]=g,d[3]=Math.min(m(b.innerSize||0,g),g),this.translate(d),this.drawDataLabels&&this.drawDataLabels()):h=!0);return h});g.column&&(g.column.prototype.alignDataLabel=function(a,e,b,g,h){var d=
|
872
|
+
this.chart.inverted,q=a.series,p=a.dlBox||a.shapeArgs,c=t(a.below,a.plotY>t(this.translatedThreshold,q.yAxis.len)),m=t(b.inside,!!this.options.stacking);p&&(g=r(p),0>g.y&&(g.height+=g.y,g.y=0),p=g.y+g.height-q.yAxis.len,0<p&&(g.height-=p),d&&(g={x:q.yAxis.len-g.y-g.height,y:q.xAxis.len-g.x-g.width,width:g.height,height:g.width}),m||(d?(g.x+=c?0:g.width,g.width=0):(g.y+=c?g.height:0,g.height=0)));b.align=t(b.align,!d||m?"center":c?"right":"left");b.verticalAlign=t(b.verticalAlign,d||m?"middle":c?"top":
|
873
|
+
"bottom");f.prototype.alignDataLabel.call(this,a,e,b,g,h);a.isLabelJustified&&a.contrastColor&&a.dataLabel.css({color:a.contrastColor})})})(L);(function(a){var E=a.Chart,B=a.each,F=a.pick,D=a.addEvent;E.prototype.callbacks.push(function(a){function h(){var h=[];B(a.series||[],function(a){var n=a.options.dataLabels,r=a.dataLabelCollections||["dataLabel"];(n.enabled||a._hasPointLabels)&&!n.allowOverlap&&a.visible&&B(r,function(m){B(a.points,function(a){a[m]&&(a[m].labelrank=F(a.labelrank,a.shapeArgs&&
|
874
|
+
a.shapeArgs.height),h.push(a[m]))})})});a.hideOverlappingLabels(h)}h();D(a,"redraw",h)});E.prototype.hideOverlappingLabels=function(a){var h=a.length,n,r,x,t,m,f,g,e,d,p=function(a,d,e,f,g,h,c,p){return!(g>a+e||g+c<a||h>d+f||h+p<d)};for(r=0;r<h;r++)if(n=a[r])n.oldOpacity=n.opacity,n.newOpacity=1;a.sort(function(a,d){return(d.labelrank||0)-(a.labelrank||0)});for(r=0;r<h;r++)for(x=a[r],n=r+1;n<h;++n)if(t=a[n],x&&t&&x!==t&&x.placed&&t.placed&&0!==x.newOpacity&&0!==t.newOpacity&&(m=x.alignAttr,f=t.alignAttr,
|
875
|
+
g=x.parentGroup,e=t.parentGroup,d=2*(x.box?0:x.padding),m=p(m.x+g.translateX,m.y+g.translateY,x.width-d,x.height-d,f.x+e.translateX,f.y+e.translateY,t.width-d,t.height-d)))(x.labelrank<t.labelrank?x:t).newOpacity=0;B(a,function(a){var b,d;a&&(d=a.newOpacity,a.oldOpacity!==d&&a.placed&&(d?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=d,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)),a.isOld=!0)})}})(L);(function(a){var E=a.addEvent,B=a.Chart,F=a.createElement,D=a.css,n=a.defaultOptions,h=
|
876
|
+
a.defaultPlotOptions,u=a.each,r=a.extend,x=a.fireEvent,t=a.hasTouch,m=a.inArray,f=a.isObject,g=a.Legend,e=a.merge,d=a.pick,p=a.Point,b=a.Series,A=a.seriesTypes,v=a.svg,H;H=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart.pointer,c=function(a){var c=b.getPointFromEvent(a);void 0!==c&&(b.isDirectTouch=!0,c.onMouseOver(a))};u(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.div?a.dataLabel.div.point=a:a.dataLabel.element.point=a)});a._hasTracking||
|
877
|
+
(u(a.trackerGroups,function(d){if(a[d]){a[d].addClass("highcharts-tracker").on("mouseover",c).on("mouseout",function(a){b.onTrackerMouseOut(a)});if(t)a[d].on("touchstart",c);a.options.cursor&&a[d].css(D).css({cursor:a.options.cursor})}}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,g=f.pointer,l=f.renderer,h=f.options.tooltip.snap,k=a.tracker,p,m=function(){if(f.hoverSeries!==a)a.onMouseOver()},n=
|
878
|
+
"rgba(192,192,192,"+(v?.0001:.002)+")";if(e&&!c)for(p=e+1;p--;)"M"===d[p]&&d.splice(p+1,0,d[p+1]-h,d[p+2],"L"),(p&&"M"===d[p]||p===e)&&d.splice(p,0,"L",d[p-2]+h,d[p-1]);k?k.attr({d:d}):a.graph&&(a.tracker=l.path(d).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:n,fill:c?n:"none","stroke-width":a.graph.strokeWidth()+(c?0:2*h),zIndex:2}).add(a.group),u([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",m).on("mouseout",function(a){g.onTrackerMouseOut(a)});
|
879
|
+
b.cursor&&a.css({cursor:b.cursor});if(t)a.on("touchstart",m)}))}};A.column&&(A.column.prototype.drawTracker=H.drawTrackerPoint);A.pie&&(A.pie.prototype.drawTracker=H.drawTrackerPoint);A.scatter&&(A.scatter.prototype.drawTracker=H.drawTrackerPoint);r(g.prototype,{setItemEvents:function(a,b,c){var d=this,f=d.chart.renderer.boxWrapper,g="highcharts-legend-"+(a.series?"point":"series")+"-active";(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");f.addClass(g);b.css(d.options.itemHoverStyle)}).on("mouseout",
|
880
|
+
function(){b.css(e(a.visible?d.itemStyle:d.itemHiddenStyle));f.removeClass(g);a.setState()}).on("click",function(c){var b=function(){a.setVisible&&a.setVisible()};c={browserEvent:c};a.firePointEvent?a.firePointEvent("legendItemClick",c,b):x(a,"legendItemClick",c,b)})},createCheckboxForItem:function(a){a.checkbox=F("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);E(a.checkbox,"click",function(b){x(a.series||a,"checkboxClick",
|
881
|
+
{checked:b.target.checked,item:a},function(){a.select()})})}});n.legend.itemStyle.cursor="pointer";r(B.prototype,{showResetZoom:function(){var a=this,b=n.lang,c=a.options.chart.resetZoomButton,d=c.theme,e=d.states,f="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,title:b.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(c.position,!1,f)},zoomOut:function(){var a=this;
|
882
|
+
x(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,c=this.pointer,e=!1,g;!a||a.resetSelection?u(this.axes,function(a){b=a.zoom()}):u(a.xAxis.concat(a.yAxis),function(a){var d=a.axis;c[d.isXAxis?"zoomX":"zoomY"]&&(b=d.zoom(a.min,a.max),d.displayBtn&&(e=!0))});g=this.resetZoomButton;e&&!g?this.showResetZoom():!e&&f(g)&&(this.resetZoomButton=g.destroy());b&&this.redraw(d(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,
|
883
|
+
e;d&&u(d,function(a){a.setState()});u("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,l=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",f=c[d],k=(b.pointRange||0)/2,g=b.getExtremes(),h=b.toValue(f-l,!0)+k,k=b.toValue(f+b.len-l,!0)-k,p=k<h,f=p?k:h,h=p?h:k,k=Math.min(g.dataMin,b.toValue(b.toPixels(g.min)-b.minPixelPadding)),p=Math.max(g.dataMax,b.toValue(b.toPixels(g.max)+b.minPixelPadding)),q;q=k-f;0<q&&(h+=q,f=k);q=h-p;0<q&&(h=p,f-=q);b.series.length&&f!==g.min&&h!==g.max&&
|
884
|
+
(b.setExtremes(f,h,!1,!1,{trigger:"pan"}),e=!0);c[d]=l});e&&c.redraw(!1);D(c.container,{cursor:"move"})}});r(p.prototype,{select:function(a,b){var c=this,e=c.series,f=e.chart;a=d(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a;e.options.data[m(c,e.data)]=c.options;c.setState(a&&"select");b||u(f.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=a.options.selected=!1,e.options.data[m(a,e.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},
|
885
|
+
onMouseOver:function(a){var b=this.series.chart,c=b.pointer;a=a?c.normalize(a):c.getChartCoordinatesFromPoint(this,b.inverted);c.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart;this.firePointEvent("mouseOut");u(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var b=this,d=e(b.series.options.point,b.options).events;b.events=d;a.objectEach(d,function(a,d){E(b,d,a)});this.hasImportedEvents=!0}},setState:function(a,
|
886
|
+
b){var c=Math.floor(this.plotX),e=this.plotY,f=this.series,g=f.options.states[a]||{},p=h[f.type].marker&&f.options.marker,l=p&&!1===p.enabled,q=p&&p.states&&p.states[a]||{},k=!1===q.enabled,m=f.stateMarkerGraphic,n=this.marker||{},v=f.chart,t=f.halo,u,x=p&&f.markerAttribs;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===g.enabled||a&&(k||l&&!1===q.enabled)||a&&n.states&&n.states[a]&&!1===n.states[a].enabled)){x&&(u=f.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+
|
887
|
+
this.state),a&&this.graphic.addClass("highcharts-point-"+a),this.graphic.attr(f.pointAttribs(this,a)),u&&this.graphic.animate(u,d(v.options.chart.animation,q.animation,p.animation)),m&&m.hide();else{if(a&&q){p=n.symbol||f.symbol;m&&m.currentSymbol!==p&&(m=m.destroy());if(m)m[b?"animate":"attr"]({x:u.x,y:u.y});else p&&(f.stateMarkerGraphic=m=v.renderer.symbol(p,u.x,u.y,u.width,u.height).add(f.markerGroup),m.currentSymbol=p);m&&m.attr(f.pointAttribs(this,a))}m&&(m[a&&v.isInsidePlot(c,e,v.inverted)?
|
888
|
+
"show":"hide"](),m.element.point=this)}(c=g.halo)&&c.size?(t||(f.halo=t=v.renderer.path().add((this.graphic||m).parentGroup)),t[b?"animate":"attr"]({d:this.haloPath(c.size)}),t.attr({"class":"highcharts-halo highcharts-color-"+d(this.colorIndex,f.colorIndex)}),t.point=this,t.attr(r({fill:this.color||f.color,"fill-opacity":c.opacity,zIndex:-1},c.attributes))):t&&t.point&&t.point.haloPath&&t.animate({d:t.point.haloPath(0)});this.state=a}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-
|
889
|
+
a,this.plotY-a,2*a,2*a)}});r(b.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&x(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&x(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this,
|
890
|
+
c=b.options,e=b.graph,f=c.states,g=c.lineWidth,c=0;a=a||"";if(b.state!==a&&(u([b.group,b.markerGroup,b.dataLabelsGroup],function(c){c&&(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a,!f[a]||!1!==f[a].enabled)&&(a&&(g=f[a].lineWidth||g+(f[a].lineWidthPlus||0)),e&&!e.dashstyle))for(g={"stroke-width":g},e.animate(g,d(b.chart.options.chart.animation,f[a]&&f[a].animation));b["zone-graph-"+c];)b["zone-graph-"+c].attr(g),c+=1},setVisible:function(a,
|
891
|
+
b){var c=this,d=c.chart,e=c.legendItem,f,g=d.options.chart.ignoreHiddenSeries,l=c.visible;f=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!l:a)?"show":"hide";u(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][f]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&u(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});u(c.linkedSeries,function(c){c.setVisible(a,
|
892
|
+
!1)});g&&(d.isDirtyBox=!0);!1!==b&&d.redraw();x(c,f)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=void 0===a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);x(this,a?"select":"unselect")},drawTracker:H.drawTrackerGraph})})(L);(function(a){var E=a.Chart,B=a.each,F=a.inArray,D=a.isArray,n=a.isObject,h=a.pick,u=a.splat;E.prototype.setResponsive=function(h){var n=this.options.responsive,r=[],m=this.currentResponsive;n&&n.rules&&
|
893
|
+
B(n.rules,function(f){void 0===f._id&&(f._id=a.uniqueKey());this.matchResponsiveRule(f,r,h)},this);var f=a.merge.apply(0,a.map(r,function(f){return a.find(n.rules,function(a){return a._id===f}).chartOptions})),r=r.toString()||void 0;r!==(m&&m.ruleIds)&&(m&&this.update(m.undoOptions,h),r?(this.currentResponsive={ruleIds:r,mergedOptions:f,undoOptions:this.currentOptions(f)},this.update(f,h)):this.currentResponsive=void 0)};E.prototype.matchResponsiveRule=function(a,n){var r=a.condition;(r.callback||
|
894
|
+
function(){return this.chartWidth<=h(r.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=h(r.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=h(r.minWidth,0)&&this.chartHeight>=h(r.minHeight,0)}).call(this)&&n.push(a._id)};E.prototype.currentOptions=function(h){function r(h,f,g,e){var d;a.objectEach(h,function(a,b){if(!e&&-1<F(b,["series","xAxis","yAxis"]))for(h[b]=u(h[b]),g[b]=[],d=0;d<h[b].length;d++)f[b][d]&&(g[b][d]={},r(a[d],f[b][d],g[b][d],e+1));else n(a)?(g[b]=D(a)?[]:{},r(a,f[b]||{},g[b],e+1)):g[b]=
|
895
|
+
f[b]||null})}var t={};r(h,this.options,t,0);return t}})(L);(function(a){var E=a.addEvent,B=a.Axis,F=a.Chart,D=a.css,n=a.dateFormat,h=a.defined,u=a.each,r=a.extend,x=a.noop,t=a.timeUnits,m=a.wrap;m(a.Series.prototype,"init",function(a){var f;a.apply(this,Array.prototype.slice.call(arguments,1));(f=this.xAxis)&&f.options.ordinal&&E(this,"updatedData",function(){delete f.ordinalIndex})});m(B.prototype,"getTimeTicks",function(a,g,e,d,p,b,m,v){var f=0,q,r,c={},w,u,y,x=[],l=-Number.MAX_VALUE,I=this.options.tickPixelInterval;
|
896
|
+
if(!this.options.ordinal&&!this.options.breaks||!b||3>b.length||void 0===e)return a.call(this,g,e,d,p);u=b.length;for(q=0;q<u;q++){y=q&&b[q-1]>d;b[q]<e&&(f=q);if(q===u-1||b[q+1]-b[q]>5*m||y){if(b[q]>l){for(r=a.call(this,g,b[f],b[q],p);r.length&&r[0]<=l;)r.shift();r.length&&(l=r[r.length-1]);x=x.concat(r)}f=q+1}if(y)break}a=r.info;if(v&&a.unitRange<=t.hour){q=x.length-1;for(f=1;f<q;f++)n("%d",x[f])!==n("%d",x[f-1])&&(c[x[f]]="day",w=!0);w&&(c[x[0]]="day");a.higherRanks=c}x.info=a;if(v&&h(I)){v=a=x.length;
|
897
|
+
q=[];var k;for(w=[];v--;)f=this.translate(x[v]),k&&(w[v]=k-f),q[v]=k=f;w.sort();w=w[Math.floor(w.length/2)];w<.6*I&&(w=null);v=x[a-1]>d?a-1:a;for(k=void 0;v--;)f=q[v],d=Math.abs(k-f),k&&d<.8*I&&(null===w||d<.8*w)?(c[x[v]]&&!c[x[v+1]]?(d=v+1,k=f):d=v,x.splice(d,1)):k=f}return x});r(B.prototype,{beforeSetTickPositions:function(){var a,g=[],e=!1,d,h=this.getExtremes(),b=h.min,m=h.max,n,r=this.isXAxis&&!!this.options.breaks,h=this.options.ordinal,q=this.chart.options.chart.ignoreHiddenSeries;if(h||r){u(this.series,
|
898
|
+
function(b,c){if(!(q&&!1===b.visible||!1===b.takeOrdinalPosition&&!r)&&(g=g.concat(b.processedXData),a=g.length,g.sort(function(a,c){return a-c}),a))for(c=a-1;c--;)g[c]===g[c+1]&&g.splice(c,1)});a=g.length;if(2<a){d=g[1]-g[0];for(n=a-1;n--&&!e;)g[n+1]-g[n]!==d&&(e=!0);!this.options.keepOrdinalPadding&&(g[0]-b>d||m-g[g.length-1]>d)&&(e=!0)}e?(this.ordinalPositions=g,d=this.ordinal2lin(Math.max(b,g[0]),!0),n=Math.max(this.ordinal2lin(Math.min(m,g[g.length-1]),!0),1),this.ordinalSlope=m=(m-b)/(n-d),
|
899
|
+
this.ordinalOffset=b-d*m):this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0}this.isOrdinal=h&&e;this.groupIntervalFactor=null},val2lin:function(a,g){var e=this.ordinalPositions;if(e){var d=e.length,f,b;for(f=d;f--;)if(e[f]===a){b=f;break}for(f=d-1;f--;)if(a>e[f]||0===f){a=(a-e[f])/(e[f+1]-e[f]);b=f+a;break}g=g?b:this.ordinalSlope*(b||0)+this.ordinalOffset}else g=a;return g},lin2val:function(a,g){var e=this.ordinalPositions;if(e){var d=this.ordinalSlope,f=this.ordinalOffset,b=e.length-
|
900
|
+
1,h;if(g)0>a?a=e[0]:a>b?a=e[b]:(b=Math.floor(a),h=a-b);else for(;b--;)if(g=d*b+f,a>=g){d=d*(b+1)+f;h=(a-g)/(d-g);break}return void 0!==h&&void 0!==e[b]?e[b]+(h?h*(e[b+1]-e[b]):0):a}return a},getExtendedPositions:function(){var a=this.chart,g=this.series[0].currentDataGrouping,e=this.ordinalIndex,d=g?g.count+g.unitName:"raw",h=this.getExtremes(),b,m;e||(e=this.ordinalIndex={});e[d]||(b={series:[],chart:a,getExtremes:function(){return{min:h.dataMin,max:h.dataMax}},options:{ordinal:!0},val2lin:B.prototype.val2lin,
|
901
|
+
ordinal2lin:B.prototype.ordinal2lin},u(this.series,function(d){m={xAxis:b,xData:d.xData,chart:a,destroyGroupedData:x};m.options={dataGrouping:g?{enabled:!0,forced:!0,approximation:"open",units:[[g.unitName,[g.count]]]}:{enabled:!1}};d.processData.apply(m);b.series.push(m)}),this.beforeSetTickPositions.apply(b),e[d]=b.ordinalPositions);return e[d]},getGroupIntervalFactor:function(a,g,e){var d;e=e.processedXData;var f=e.length,b=[];d=this.groupIntervalFactor;if(!d){for(d=0;d<f-1;d++)b[d]=e[d+1]-e[d];
|
902
|
+
b.sort(function(a,b){return a-b});b=b[Math.floor(f/2)];a=Math.max(a,e[0]);g=Math.min(g,e[f-1]);this.groupIntervalFactor=d=f*b/(g-a)}return d},postProcessTickInterval:function(a){var f=this.ordinalSlope;return f?this.options.breaks?this.closestPointRange:a/(f/this.closestPointRange):a}});B.prototype.ordinal2lin=B.prototype.val2lin;m(F.prototype,"pan",function(a,g){var e=this.xAxis[0],d=g.chartX,f=!1;if(e.options.ordinal&&e.series.length){var b=this.mouseDownX,h=e.getExtremes(),m=h.dataMax,n=h.min,
|
903
|
+
q=h.max,r=this.hoverPoints,c=e.closestPointRange,b=(b-d)/(e.translationSlope*(e.ordinalSlope||c)),w={ordinalPositions:e.getExtendedPositions()},c=e.lin2val,t=e.val2lin,y;w.ordinalPositions?1<Math.abs(b)&&(r&&u(r,function(a){a.setState()}),0>b?(r=w,y=e.ordinalPositions?e:w):(r=e.ordinalPositions?e:w,y=w),w=y.ordinalPositions,m>w[w.length-1]&&w.push(m),this.fixedRange=q-n,b=e.toFixedRange(null,null,c.apply(r,[t.apply(r,[n,!0])+b,!0]),c.apply(y,[t.apply(y,[q,!0])+b,!0])),b.min>=Math.min(h.dataMin,n)&&
|
904
|
+
b.max<=Math.max(m,q)&&e.setExtremes(b.min,b.max,!0,!1,{trigger:"pan"}),this.mouseDownX=d,D(this.container,{cursor:"move"})):f=!0}else f=!0;f&&a.apply(this,Array.prototype.slice.call(arguments,1))})})(L);(function(a){function E(){return Array.prototype.slice.call(arguments,1)}function B(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,F(this.pointArrayMap,["y"]))}var F=a.pick,D=a.wrap,n=a.each,h=a.extend,u=a.isArray,r=a.fireEvent,x=a.Axis,t=a.Series;h(x.prototype,{isInBreak:function(a,
|
905
|
+
f){var g=a.repeat||Infinity,e=a.from,d=a.to-a.from;f=f>=e?(f-e)%g:g-(e-f)%g;return a.inclusive?f<=d:f<d&&0!==f},isInAnyBreak:function(a,f){var g=this.options.breaks,e=g&&g.length,d,h,b;if(e){for(;e--;)this.isInBreak(g[e],a)&&(d=!0,h||(h=F(g[e].showPoints,this.isXAxis?!1:!0)));b=d&&f?d&&!h:d}return b}});D(x.prototype,"setTickPositions",function(a){a.apply(this,Array.prototype.slice.call(arguments,1));if(this.options.breaks){var f=this.tickPositions,g=this.tickPositions.info,e=[],d;for(d=0;d<f.length;d++)this.isInAnyBreak(f[d])||
|
906
|
+
e.push(f[d]);this.tickPositions=e;this.tickPositions.info=g}});D(x.prototype,"init",function(a,f,g){var e=this;g.breaks&&g.breaks.length&&(g.ordinal=!1);a.call(this,f,g);a=this.options.breaks;e.isBroken=u(a)&&!!a.length;e.isBroken&&(e.val2lin=function(a){var d=a,b,f;for(f=0;f<e.breakArray.length;f++)if(b=e.breakArray[f],b.to<=a)d-=b.len;else if(b.from>=a)break;else if(e.isInBreak(b,a)){d-=a-b.from;break}return d},e.lin2val=function(a){var d,b;for(b=0;b<e.breakArray.length&&!(d=e.breakArray[b],d.from>=
|
907
|
+
a);b++)d.to<a?a+=d.len:e.isInBreak(d,a)&&(a+=d.len);return a},e.setExtremes=function(a,e,b,f,g){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(e);)e-=this.closestPointRange;x.prototype.setExtremes.call(this,a,e,b,f,g)},e.setAxisTranslation=function(a){x.prototype.setAxisTranslation.call(this,a);a=e.options.breaks;var d=[],b=[],f=0,g,h,m=e.userMin||e.min,u=e.userMax||e.max,c=F(e.pointRangePadding,0),w,t;n(a,function(a){h=a.repeat||Infinity;e.isInBreak(a,m)&&(m+=a.to%h-
|
908
|
+
m%h);e.isInBreak(a,u)&&(u-=u%h-a.from%h)});n(a,function(a){w=a.from;for(h=a.repeat||Infinity;w-h>m;)w-=h;for(;w<m;)w+=h;for(t=w;t<u;t+=h)d.push({value:t,move:"in"}),d.push({value:t+(a.to-a.from),move:"out",size:a.breakSize})});d.sort(function(a,c){return a.value===c.value?("in"===a.move?0:1)-("in"===c.move?0:1):a.value-c.value});g=0;w=m;n(d,function(a){g+="in"===a.move?1:-1;1===g&&"in"===a.move&&(w=a.value);0===g&&(b.push({from:w,to:a.value,len:a.value-w-(a.size||0)}),f+=a.value-w-(a.size||0))});
|
909
|
+
e.breakArray=b;e.unitLength=u-m-f+c;r(e,"afterBreaks");e.options.staticScale?e.transA=e.options.staticScale:e.unitLength&&(e.transA*=(u-e.min+c)/e.unitLength);c&&(e.minPixelPadding=e.transA*e.minPointOffset);e.min=m;e.max=u})});D(t.prototype,"generatePoints",function(a){a.apply(this,E(arguments));var f=this.xAxis,g=this.yAxis,e=this.points,d,h=e.length,b=this.options.connectNulls,m;if(f&&g&&(f.options.breaks||g.options.breaks))for(;h--;)d=e[h],m=null===d.y&&!1===b,m||!f.isInAnyBreak(d.x,!0)&&!g.isInAnyBreak(d.y,
|
910
|
+
!0)||(e.splice(h,1),this.data[h]&&this.data[h].destroyElements())});a.Series.prototype.drawBreaks=function(a,f){var g=this,e=g.points,d,h,b,m;a&&n(f,function(f){d=a.breakArray||[];h=a.isXAxis?a.min:F(g.options.threshold,a.min);n(e,function(e){m=F(e["stack"+f.toUpperCase()],e[f]);n(d,function(d){b=!1;if(h<d.from&&m>d.to||h>d.from&&m<d.from)b="pointBreak";else if(h<d.from&&m>d.from&&m<d.to||h>d.from&&m>d.to&&m<d.from)b="pointInBreak";b&&r(a,b,{point:e,brk:d})})})})};a.Series.prototype.gappedPath=function(){var a=
|
911
|
+
this.options.gapSize,f=this.points.slice(),g=f.length-1;if(a&&0<g)for(;g--;)f[g+1].x-f[g].x>this.closestPointRange*a&&f.splice(g+1,0,{isNull:!0});return this.getGraphPath(f)};D(a.seriesTypes.column.prototype,"drawPoints",B);D(a.Series.prototype,"drawPoints",B)})(L);(function(a){var E=a.arrayMax,B=a.arrayMin,F=a.Axis,D=a.defaultPlotOptions,n=a.defined,h=a.each,u=a.extend,r=a.format,x=a.isNumber,t=a.merge,m=a.pick,f=a.Point,g=a.Tooltip,e=a.wrap,d=a.Series.prototype,p=d.processData,b=d.generatePoints,
|
912
|
+
A=d.destroy,v={approximation:"average",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"]}},
|
913
|
+
H={line:{},spline:{},area:{},areaspline:{},column:{approximation:"sum",groupPixelWidth:10},arearange:{approximation:"range"},areasplinerange:{approximation:"range"},columnrange:{approximation:"range",groupPixelWidth:10},candlestick:{approximation:"ohlc",groupPixelWidth:10},ohlc:{approximation:"ohlc",groupPixelWidth:5}},q=a.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",
|
914
|
+
[1]],["month",[1,3,6]],["year",null]],J={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=J.sum(a);x(a)&&c&&(a/=c);return a},averages:function(){var a=[];h(arguments,function(c){a.push(J.average(c))});return a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?E(a):a.hasNulls?null:void 0},low:function(a){return a.length?B(a):a.hasNulls?null:void 0},close:function(a){return a.length?
|
915
|
+
a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,b,d,e){a=J.open(a);b=J.high(b);d=J.low(d);e=J.close(e);if(x(a)||x(b)||x(d)||x(e))return[a,b,d,e]},range:function(a,b){a=J.low(a);b=J.high(b);if(x(a)||x(b))return[a,b];if(null===a&&null===b)return null}};d.groupData=function(a,b,d,e){var c=this.data,f=this.options.data,g=[],k=[],p=[],m=a.length,n,q,r=!!b,w=[];e="function"===typeof e?e:J[e]||H[this.type]&&J[H[this.type].approximation]||J[v.approximation];var u=this.pointArrayMap,t=u&&u.length,y=
|
916
|
+
0;q=0;var K,A;t?h(u,function(){w.push([])}):w.push([]);K=t||1;for(A=0;A<=m&&!(a[A]>=d[0]);A++);for(A;A<=m;A++){for(;void 0!==d[y+1]&&a[A]>=d[y+1]||A===m;){n=d[y];this.dataGroupInfo={start:q,length:w[0].length};q=e.apply(this,w);void 0!==q&&(g.push(n),k.push(q),p.push(this.dataGroupInfo));q=A;for(n=0;n<K;n++)w[n].length=0,w[n].hasNulls=!1;y+=1;if(A===m)break}if(A===m)break;if(u){n=this.cropStart+A;var B=c&&c[n]||this.pointClass.prototype.applyOptions.apply({series:this},[f[n]]),D;for(n=0;n<t;n++)D=
|
917
|
+
B[u[n]],x(D)?w[n].push(D):null===D&&(w[n].hasNulls=!0)}else n=r?b[A]:null,x(n)?w[0].push(n):null===n&&(w[0].hasNulls=!0)}return[g,k,p]};d.processData=function(){var a=this.chart,b=this.options.dataGrouping,e=!1!==this.allowDG&&b&&m(b.enabled,a.options.isStock),f=this.visible||!a.options.chart.ignoreHiddenSeries,g;this.forceCrop=e;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==p.apply(this,arguments)&&e){this.destroyGroupedData();var l=this.processedXData,h=this.processedYData,k=a.plotSizeX,
|
918
|
+
a=this.xAxis,v=a.options.ordinal,r=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(r){this.isDirty=g=!0;this.points=null;var u=a.getExtremes(),e=u.min,u=u.max,v=v&&a.getGroupIntervalFactor(e,u,this)||1,k=r*(u-e)/k*v,r=a.getTimeTicks(a.normalizeTimeTickInterval(k,b.units||q),Math.min(e,l[0]),Math.max(u,l[l.length-1]),a.options.startOfWeek,l,this.closestPointRange),l=d.groupData.apply(this,[l,h,r,b.approximation]),h=l[0],v=l[1];if(b.smoothed){b=h.length-1;for(h[b]=Math.min(h[b],
|
919
|
+
u);b--&&0<b;)h[b]+=k/2;h[0]=Math.max(h[0],e)}this.currentDataGrouping=r.info;this.closestPointRange=r.info.totalRange;this.groupMap=l[2];n(h[0])&&h[0]<a.dataMin&&f&&(a.min===a.dataMin&&(a.min=h[0]),a.dataMin=h[0]);this.processedXData=h;this.processedYData=v}else this.currentDataGrouping=this.groupMap=null;this.hasGroupedData=g}};d.destroyGroupedData=function(){var a=this.groupedData;h(a||[],function(c,b){c&&(a[b]=c.destroy?c.destroy():null)});this.groupedData=null};d.generatePoints=function(){b.apply(this);
|
920
|
+
this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};e(f.prototype,"update",function(c){this.dataGroup?a.error(24):c.apply(this,[].slice.call(arguments,1))});e(g.prototype,"tooltipFooterHeaderFormatter",function(c,b,d){var e=b.series,f=e.tooltipOptions,l=e.options.dataGrouping,g=f.xDateFormat,k,h=e.xAxis,p=a.dateFormat;return h&&"datetime"===h.options.type&&l&&x(b.key)?(c=e.currentDataGrouping,l=l.dateTimeLabelFormats,c?(h=l[c.unitName],1===c.count?g=h[0]:(g=h[1],k=h[2])):
|
921
|
+
!g&&l&&(g=this.getXDateFormat(b,f,h)),g=p(g,b.key),k&&(g+=p(k,b.key+c.totalRange-1)),r(f[(d?"footer":"header")+"Format"],{point:u(b.point,{key:g}),series:e})):c.call(this,b,d)});d.destroy=function(){for(var a=this.groupedData||[],b=a.length;b--;)a[b]&&a[b].destroy();A.apply(this)};e(d,"setOptions",function(a,b){a=a.call(this,b);var c=this.type,d=this.chart.options.plotOptions,e=D[c].dataGrouping;H[c]&&(e||(e=t(v,H[c])),a.dataGrouping=t(e,d.series&&d.series.dataGrouping,d[c].dataGrouping,b.dataGrouping));
|
922
|
+
this.chart.options.isStock&&(this.requireSorting=!0);return a});e(F.prototype,"setScale",function(a){a.call(this);h(this.series,function(a){a.hasProcessed=!1})});F.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,d,e=0,f=!1,l;for(d=b;d--;)(l=a[d].options.dataGrouping)&&(e=Math.max(e,l.groupPixelWidth));for(d=b;d--;)(l=a[d].options.dataGrouping)&&a[d].hasProcessed&&(b=(a[d].processedXData||a[d].data).length,a[d].groupPixelWidth||b>this.chart.plotSizeX/e||b&&l.forced)&&(f=!0);return f?
|
923
|
+
e:0};F.prototype.setDataGrouping=function(a,b){var c;b=m(b,!0);a||(a={forced:!1,units:null});if(this instanceof F)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else h(this.chart.options.series,function(c){c.dataGrouping=a},!1);b&&this.chart.redraw()}})(L);(function(a){var E=a.each,B=a.Point,F=a.seriesType,D=a.seriesTypes;F("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eOpen: {point.open}\x3cbr/\x3eHigh: {point.high}\x3cbr/\x3eLow: {point.low}\x3cbr/\x3eClose: {point.close}\x3cbr/\x3e'},
|
924
|
+
threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointAttribs:function(a,h){h=D.column.prototype.pointAttribs.call(this,a,h);var n=this.options;delete h.fill;!a.options.color&&n.upColor&&a.open<a.close&&(h.stroke=n.upColor);return h},translate:function(){var a=this,h=a.yAxis,u=!!a.modifyValue,
|
925
|
+
r=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];D.column.prototype.translate.apply(a);E(a.points,function(n){E([n.open,n.high,n.low,n.close,n.low],function(t,m){null!==t&&(u&&(t=a.modifyValue(t)),n[r[m]]=h.toPixels(t,!0))});n.tooltipPos[1]=n.plotHigh+h.pos-a.chart.plotTop})},drawPoints:function(){var a=this,h=a.chart;E(a.points,function(n){var r,u,t,m,f=n.graphic,g,e=!f;void 0!==n.plotY&&(f||(n.graphic=f=h.renderer.path().add(a.group)),f.attr(a.pointAttribs(n,n.selected&&"select")),u=f.strokeWidth()%
|
926
|
+
2/2,g=Math.round(n.plotX)-u,t=Math.round(n.shapeArgs.width/2),m=["M",g,Math.round(n.yBottom),"L",g,Math.round(n.plotHigh)],null!==n.open&&(r=Math.round(n.plotOpen)+u,m.push("M",g,r,"L",g-t,r)),null!==n.close&&(r=Math.round(n.plotClose)+u,m.push("M",g,r,"L",g+t,r)),f[e?"attr":"animate"]({d:m}).addClass(n.getClassName(),!0))})},animate:null},{getClassName:function(){return B.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(L);(function(a){var E=
|
927
|
+
a.defaultPlotOptions,B=a.each,F=a.merge,D=a.seriesType,n=a.seriesTypes;D("candlestick","ohlc",F(E.column,{states:{hover:{lineWidth:2}},tooltip:E.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),{pointAttribs:function(a,u){var h=n.column.prototype.pointAttribs.call(this,a,u),x=this.options,t=a.open<a.close,m=x.lineColor||this.color;h["stroke-width"]=x.lineWidth;h.fill=a.options.color||(t?x.upColor||this.color:this.color);h.stroke=a.lineColor||(t?x.upLineColor||
|
928
|
+
m:m);u&&(a=x.states[u],h.fill=a.color||h.fill,h.stroke=a.lineColor||h.stroke,h["stroke-width"]=a.lineWidth||h["stroke-width"]);return h},drawPoints:function(){var a=this,n=a.chart;B(a.points,function(h){var r=h.graphic,t,m,f,g,e,d,p,b=!r;void 0!==h.plotY&&(r||(h.graphic=r=n.renderer.path().add(a.group)),r.attr(a.pointAttribs(h,h.selected&&"select")).shadow(a.options.shadow),e=r.strokeWidth()%2/2,d=Math.round(h.plotX)-e,t=h.plotOpen,m=h.plotClose,f=Math.min(t,m),t=Math.max(t,m),p=Math.round(h.shapeArgs.width/
|
929
|
+
2),m=Math.round(f)!==Math.round(h.plotHigh),g=t!==h.yBottom,f=Math.round(f)+e,t=Math.round(t)+e,e=[],e.push("M",d-p,t,"L",d-p,f,"L",d+p,f,"L",d+p,t,"Z","M",d,f,"L",d,m?Math.round(h.plotHigh):f,"M",d,t,"L",d,g?Math.round(h.yBottom):t),r[b?"attr":"animate"]({d:e}).addClass(h.getClassName(),!0))})}})})(L);(function(a){var E=a.addEvent,B=a.each,F=a.merge,D=a.noop,n=a.Renderer,h=a.seriesType,u=a.seriesTypes,r=a.TrackerMixin,x=a.VMLRenderer,t=a.SVGRenderer.prototype.symbols,m=a.stableSort;h("flags","column",
|
930
|
+
{pointRange:0,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}\x3cbr/\x3e"},threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}},style:{fontSize:"11px",fontWeight:"bold"}},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:a.Series.prototype.init,pointAttribs:function(a,g){var e=this.options,d=a&&a.color||this.color,f=e.lineColor,b=a&&a.lineWidth;
|
931
|
+
a=a&&a.fillColor||e.fillColor;g&&(a=e.states[g].fillColor,f=e.states[g].lineColor,b=e.states[g].lineWidth);return{fill:a||d,stroke:f||d,"stroke-width":b||e.lineWidth||0}},translate:function(){u.column.prototype.translate.apply(this);var a=this.options,g=this.chart,e=this.points,d=e.length-1,h,b,n=a.onSeries;h=n&&g.get(n);var a=a.onKey||"y",n=h&&h.options.step,v=h&&h.points,r=v&&v.length,q=this.xAxis,t=this.yAxis,c=q.getExtremes(),w=0,x,y,G;if(h&&h.visible&&r)for(w=(h.pointXOffset||0)+(h.barW||0)/
|
932
|
+
2,h=h.currentDataGrouping,y=v[r-1].x+(h?h.totalRange:0),m(e,function(a,c){return a.x-c.x}),a="plot"+a[0].toUpperCase()+a.substr(1);r--&&e[d]&&!(h=e[d],x=v[r],x.x<=h.x&&void 0!==x[a]&&(h.x<=y&&(h.plotY=x[a],x.x<h.x&&!n&&(G=v[r+1])&&void 0!==G[a]&&(h.plotY+=(h.x-x.x)/(G.x-x.x)*(G[a]-x[a]))),d--,r++,0>d)););B(e,function(a,d){var f;void 0===a.plotY&&(a.x>=c.min&&a.x<=c.max?a.plotY=g.chartHeight-q.bottom-(q.opposite?q.height:0)+q.offset-t.top:a.shapeArgs={});a.plotX+=w;(b=e[d-1])&&b.plotX===a.plotX&&(void 0===
|
933
|
+
b.stackIndex&&(b.stackIndex=0),f=b.stackIndex+1);a.stackIndex=f})},drawPoints:function(){var f=this.points,g=this.chart,e=g.renderer,d,h,b=this.options,m=b.y,n,r,q,t,c,w,u,y=this.yAxis;for(r=f.length;r--;)q=f[r],u=q.plotX>this.xAxis.len,d=q.plotX,t=q.stackIndex,n=q.options.shape||b.shape,h=q.plotY,void 0!==h&&(h=q.plotY+m-(void 0!==t&&t*b.stackDistance)),c=t?void 0:q.plotX,w=t?void 0:q.plotY,t=q.graphic,void 0!==h&&0<=d&&!u?(t||(t=q.graphic=e.label("",null,null,n,null,null,b.useHTML).attr(this.pointAttribs(q)).css(F(b.style,
|
934
|
+
q.style)).attr({align:"flag"===n?"left":"center",width:b.width,height:b.height,"text-align":b.textAlign}).addClass("highcharts-point").add(this.markerGroup),q.graphic.div&&(q.graphic.div.point=q),t.shadow(b.shadow)),0<d&&(d-=t.strokeWidth()%2),t.attr({text:q.options.title||b.title||"A",x:d,y:h,anchorX:c,anchorY:w}),q.tooltipPos=g.inverted?[y.len+y.pos-g.plotLeft-h,this.xAxis.len-d]:[d,h+y.pos-g.plotTop]):t&&(q.graphic=t.destroy());b.useHTML&&a.wrap(this.markerGroup,"on",function(c){return a.SVGElement.prototype.on.apply(c.apply(this,
|
935
|
+
[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var a=this.points;r.drawTrackerPoint.apply(this);B(a,function(f){var e=f.graphic;e&&E(e.element,"mouseover",function(){0<f.stackIndex&&!f.raised&&(f._y=e.y,e.attr({y:f._y-8}),f.raised=!0);B(a,function(a){a!==f&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:D,buildKDTree:D,setClip:D});t.flag=function(a,g,e,d,h){return["M",h&&h.anchorX||a,h&&h.anchorY||g,"L",a,g+d,a,g,a+e,g,a+e,g+d,a,g+d,"Z"]};
|
936
|
+
B(["circle","square"],function(a){t[a+"pin"]=function(f,e,d,h,b){var g=b&&b.anchorX;b=b&&b.anchorY;"circle"===a&&h>d&&(f-=Math.round((h-d)/2),d=h);f=t[a](f,e,d,h);g&&b&&f.push("M",g,e>b?e:e+h,"L",g,b);return f}});n===x&&B(["flag","circlepin","squarepin"],function(a){x.prototype.symbols[a]=t[a]})})(L);(function(a){function E(a,b,d){this.init(a,b,d)}var B=a.addEvent,F=a.Axis,D=a.correctFloat,n=a.defaultOptions,h=a.defined,u=a.destroyObjectProperties,r=a.doc,x=a.each,t=a.fireEvent,m=a.hasTouch,f=a.isTouchDevice,
|
937
|
+
g=a.merge,e=a.pick,d=a.removeEvent,p=a.wrap,b,A={height:f?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!f,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};n.scrollbar=g(!0,A,n.scrollbar);a.swapXY=b=function(a,b){var d=
|
938
|
+
a.length,e;if(b)for(b=0;b<d;b+=3)e=a[b+1],a[b+1]=a[b+2],a[b+2]=e;return a};E.prototype={init:function(a,b,d){this.scrollbarButtons=[];this.renderer=a;this.userOptions=b;this.options=g(A,b);this.chart=d;this.size=e(this.options.size,this.options.height);b.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,d=this.options,e=this.size,f;this.group=f=a.g("scrollbar").attr({zIndex:d.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,
|
939
|
+
r:d.trackBorderRadius||0,height:e,width:e}).add(f);this.track.attr({fill:d.trackBackgroundColor,stroke:d.trackBorderColor,"stroke-width":d.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(f);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:e,width:e,r:d.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(b(["M",-3,e/4,"L",-3,2*e/3,"M",0,e/4,"L",0,2*e/3,"M",
|
940
|
+
3,e/4,"L",3,2*e/3],d.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);this.scrollbar.attr({fill:d.barBackgroundColor,stroke:d.barBorderColor,"stroke-width":d.barBorderWidth});this.scrollbarRifles.attr({stroke:d.rifleColor,"stroke-width":1});this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)},position:function(a,b,d,e){var c=
|
941
|
+
this.options.vertical,f=0,g=this.rendered?"animate":"attr";this.x=a;this.y=b+this.trackBorderWidth;this.width=d;this.xOffset=this.height=e;this.yOffset=f;c?(this.width=this.yOffset=d=f=this.size,this.xOffset=b=0,this.barWidth=e-2*d,this.x=a+=this.options.margin):(this.height=this.xOffset=e=b=this.size,this.barWidth=d-2*e,this.y+=this.options.margin);this.group[g]({translateX:a,translateY:this.y});this.track[g]({width:d,height:e});this.scrollbarButtons[1][g]({translateX:c?0:d-b,translateY:c?e-f:0})},
|
942
|
+
drawScrollbarButton:function(a){var d=this.renderer,e=this.scrollbarButtons,f=this.options,c=this.size,g;g=d.g().add(this.group);e.push(g);g=d.rect().addClass("highcharts-scrollbar-button").add(g);g.attr({stroke:f.buttonBorderColor,"stroke-width":f.buttonBorderWidth,fill:f.buttonBackgroundColor});g.attr(g.crisp({x:-.5,y:-.5,width:c+1,height:c+1,r:f.buttonBorderRadius},g.strokeWidth()));g=d.path(b(["M",c/2+(a?-1:1),c/2-3,"L",c/2+(a?-1:1),c/2+3,"L",c/2+(a?2:-2),c/2],f.vertical)).addClass("highcharts-scrollbar-arrow").add(e[a]);
|
943
|
+
g.attr({fill:f.buttonArrowColor})},setRange:function(a,b){var d=this.options,e=d.vertical,c=d.minWidth,f=this.barWidth,g,m,n=this.rendered&&!this.hasDragged?"animate":"attr";h(f)&&(a=Math.max(a,0),g=Math.ceil(f*a),this.calculatedWidth=m=D(f*Math.min(b,1)-g),m<c&&(g=(f-c+m)*a,m=c),c=Math.floor(g+this.xOffset+this.yOffset),f=m/2-.5,this.from=a,this.to=b,e?(this.scrollbarGroup[n]({translateY:c}),this.scrollbar[n]({height:m}),this.scrollbarRifles[n]({translateY:f}),this.scrollbarTop=c,this.scrollbarLeft=
|
944
|
+
0):(this.scrollbarGroup[n]({translateX:c}),this.scrollbar[n]({width:m}),this.scrollbarRifles[n]({translateX:f}),this.scrollbarLeft=c,this.scrollbarTop=0),12>=m?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===d.showFull&&(0>=a&&1<=b?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var d=a.chart.pointer.normalize(b),e=a.options.vertical?"chartY":"chartX",c=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][e]||
|
945
|
+
(d=a.cursorToScrollbarPosition(d)[e],e=a[e],e=d-e,a.hasDragged=!0,a.updatePosition(c[0]+e,c[1]+e),a.hasDragged&&t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=function(b){b=a.chart.pointer.normalize(b);b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY;
|
946
|
+
a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var d=D(a.to-a.from)*a.options.step;a.updatePosition(D(a.from-d),D(a.to-d));t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var d=(a.to-a.from)*a.options.step;a.updatePosition(a.from+d,a.to+d);t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var d=a.chart.pointer.normalize(b),e=a.to-a.from,c=a.y+a.scrollbarTop,f=a.x+a.scrollbarLeft;
|
947
|
+
a.options.vertical&&d.chartY>c||!a.options.vertical&&d.chartX>f?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})}},cursorToScrollbarPosition:function(a){var b=this.options,b=b.minWidth>this.calculatedWidth?b.minWidth:0;return{chartX:(a.chartX-this.x-this.xOffset)/(this.barWidth-b),chartY:(a.chartY-this.y-this.yOffset)/(this.barWidth-b)}},updatePosition:function(a,b){1<b&&(a=D(1-D(b-a)),b=1);0>a&&(b=D(b-a),a=0);
|
948
|
+
this.from=a;this.to=b},update:function(a){this.destroy();this.init(this.chart.renderer,g(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,d=this.scrollbarGroup.element,e=this.mouseDownHandler,c=this.mouseMoveHandler,f=this.mouseUpHandler,a=[[b[a[0]].element,"click",this.buttonToMinClick],[b[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[d,"mousedown",e],[r,"mousemove",c],[r,"mouseup",f]];
|
949
|
+
m&&a.push([d,"touchstart",e],[r,"touchmove",c],[r,"touchend",f]);x(a,function(a){B.apply(null,a)});this._events=a},removeEvents:function(){x(this._events,function(a){d.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();x(["track","scrollbarRifles","scrollbar","scrollbarGroup","group"],function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,u(a.scrollbarButtons))}};p(F.prototype,"init",function(a){var b=
|
950
|
+
this;a.apply(b,Array.prototype.slice.call(arguments,1));b.options.scrollbar&&b.options.scrollbar.enabled&&(b.options.scrollbar.vertical=!b.horiz,b.options.startOnTick=b.options.endOnTick=!1,b.scrollbar=new E(b.chart.renderer,b.options.scrollbar,b.chart),B(b.scrollbar,"changed",function(a){var d=Math.min(e(b.options.min,b.min),b.min,b.dataMin),c=Math.max(e(b.options.max,b.max),b.max,b.dataMax)-d,f;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(f=d+c*this.to,d+=c*this.from):(f=d+c*(1-this.from),d+=c*(1-
|
951
|
+
this.to));b.setExtremes(d,f,!0,!1,a)}))});p(F.prototype,"render",function(a){var b=Math.min(e(this.options.min,this.min),this.min,this.dataMin),d=Math.max(e(this.options.max,this.max),this.max,this.dataMax),f=this.scrollbar,c=this.titleOffset||0;a.apply(this,Array.prototype.slice.call(arguments,1));if(f){this.horiz?(f.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:c+this.axisTitleMargin+this.offset),this.width,this.height),c=1):(f.position(this.left+this.width+
|
952
|
+
2+this.chart.scrollbarsOffsets[0]+(this.opposite?c+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),c=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[c]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(b)||isNaN(d)||!h(this.min)||!h(this.max)?f.setRange(0,0):(c=(this.min-b)/(d-b),b=(this.max-b)/(d-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?f.setRange(c,b):f.setRange(1-b,1-c))}});p(F.prototype,"getOffset",function(a){var b=
|
953
|
+
this.horiz?2:1,d=this.scrollbar;a.apply(this,Array.prototype.slice.call(arguments,1));d&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=d.size+d.options.margin)});p(F.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,1))});a.Scrollbar=E})(L);(function(a){function E(a){this.init(a)}var B=a.addEvent,F=a.Axis,D=a.Chart,n=a.color,h=a.defaultOptions,u=a.defined,r=a.destroyObjectProperties,x=a.doc,t=
|
954
|
+
a.each,m=a.erase,f=a.error,g=a.extend,e=a.grep,d=a.hasTouch,p=a.isNumber,b=a.isObject,A=a.merge,v=a.pick,H=a.removeEvent,q=a.Scrollbar,J=a.Series,c=a.seriesTypes,w=a.wrap,K=a.swapXY,y=[].concat(a.defaultDataGroupingUnits),G=function(a){var b=e(arguments,p);if(b.length)return Math[a].apply(0,b)};y[4]=["day",[1,2,3,4]];y[5]=["week",[1,2,3]];c=void 0===c.areaspline?"line":"areaspline";g(h,{navigator:{height:40,margin:25,maskInside:!0,handles:{backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:n("#6685c2").setOpacity(.3).get(),
|
955
|
+
outlineColor:"#cccccc",outlineWidth:1,series:{type:c,color:"#335cad",fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:y},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,shadow:!1,threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,
|
956
|
+
labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});E.prototype={drawHandle:function(a,b,c,d){this.handles[b][d](c?{translateX:Math.round(this.left+this.height/2-8),translateY:Math.round(this.top+parseInt(a,10)+.5)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+
|
957
|
+
this.height/2-8)})},getHandlePath:function(a){return K(["M",-4.5,.5,"L",3.5,.5,"L",3.5,15.5,"L",-4.5,15.5,"L",-4.5,.5,"M",-1.5,4,"L",-1.5,12,"M",.5,4,"L",.5,12],a)},drawOutline:function(a,b,c,d){var e=this.navigatorOptions.maskInside,f=this.outline.strokeWidth(),l=f/2,f=f%2/2,k=this.outlineHeight,g=this.scrollbarHeight,h=this.size,m=this.left-g,n=this.top;c?(m-=l,c=n+b+f,b=n+a+f,a=["M",m+k,n-g-f,"L",m+k,c,"L",m,c,"L",m,b,"L",m+k,b,"L",m+k,n+h+g].concat(e?["M",m+k,c-l,"L",m+k,b+l]:[])):(a+=m+g-f,b+=
|
958
|
+
m+g-f,n+=l,a=["M",m,n,"L",a,n,"L",a,n+k,"L",b,n+k,"L",b,n,"L",m+h+2*g,n].concat(e?["M",a-l,n,"L",b+l,n]:[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var e=this.left,f=this.top,l=this.height,k,g,h,m;c?(h=[e,e,e],m=[f,f+a,f+b],g=[l,l,l],k=[a,b-a,this.size-b]):(h=[e,e+a,e+b],m=[f,f,f],g=[a,b-a,this.size-b],k=[l,l,l]);t(this.shades,function(a,b){a[d]({x:h[b],y:m[b],width:g[b],height:k[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,e=d.inverted,f=
|
959
|
+
d.renderer,g;a.navigatorGroup=g=f.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();var h={cursor:e?"ns-resize":"ew-resize"};t([!c,c,!c],function(c,d){a.shades[d]=f.rect().addClass("highcharts-navigator-mask"+(1===d?"-inside":"-outside")).attr({fill:c?b.maskFill:"rgba(0,0,0,0)"}).css(1===d&&h).add(g)});a.outline=f.path().addClass("highcharts-navigator-outline").attr({"stroke-width":b.outlineWidth,stroke:b.outlineColor}).add(g);t([0,1],function(c){a.handles[c]=f.path(a.getHandlePath(e)).attr({zIndex:7-
|
960
|
+
c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(g);var d=b.handles;a.handles[c].attr({fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":1}).css(h)})},update:function(a){this.destroy();A(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,b,c,d){var e=this.chart,f,l,k=this.scrollbarHeight,g,h=this.xAxis;f=h.fake?e.xAxis[0]:h;var m=this.navigatorEnabled,n,q=this.rendered;l=e.inverted;var r=e.xAxis[0].minRange;
|
961
|
+
if(!this.hasDragged||u(c)){if(!p(a)||!p(b))if(q)c=0,d=h.width;else return;this.left=v(h.left,e.plotLeft+k+(l?e.plotWidth:0));this.size=n=g=v(h.len,(l?e.plotHeight:e.plotWidth)-2*k);e=l?k:g+2*k;c=v(c,h.toPixels(a,!0));d=v(d,h.toPixels(b,!0));p(c)&&Infinity!==Math.abs(c)||(c=0,d=e);a=h.toValue(c,!0);b=h.toValue(d,!0);if(Math.abs(b-a)<r)if(this.grabbedLeft)c=h.toPixels(b-r,!0);else if(this.grabbedRight)d=h.toPixels(a+r,!0);else return;this.zoomedMax=Math.min(Math.max(c,d,0),n);this.zoomedMin=Math.min(Math.max(this.fixedWidth?
|
962
|
+
this.zoomedMax-this.fixedWidth:Math.min(c,d),0),n);this.range=this.zoomedMax-this.zoomedMin;n=Math.round(this.zoomedMax);c=Math.round(this.zoomedMin);m&&(this.navigatorGroup.attr({visibility:"visible"}),q=q&&!this.hasDragged?"animate":"attr",this.drawMasks(c,n,l,q),this.drawOutline(c,n,l,q),this.drawHandle(c,0,l,q),this.drawHandle(n,1,l,q));this.scrollbar&&(l?(l=this.top-k,f=this.left-k+(m||!f.opposite?0:(f.titleOffset||0)+f.axisTitleMargin),k=g+2*k):(l=this.top+(m?this.height:-k),f=this.left-k),
|
963
|
+
this.scrollbar.position(f,l,e,k),this.scrollbar.setRange(this.zoomedMin/g,this.zoomedMax/g));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,c=b.container,e=[],f,g;a.mouseMoveHandler=f=function(b){a.onMouseMove(b)};a.mouseUpHandler=g=function(b){a.onMouseUp(b)};e=a.getPartsEvents("mousedown");e.push(B(c,"mousemove",f),B(x,"mouseup",g));d&&(e.push(B(c,"touchmove",f),B(x,"touchend",g)),e.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=e;a.series&&a.series[0]&&e.push(B(a.series[0].xAxis,
|
964
|
+
"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,c=[];t(["shades","handles"],function(d){t(b[d],function(e,f){c.push(B(e.element,a,function(a){b[d+"Mousedown"](a,f)}))})});return c},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var c=this.chart,d=this.xAxis,e=this.zoomedMin,f=this.left,l=this.size,g=this.range,h=a.chartX,m;c.inverted&&(h=a.chartY,f=this.top);1===b?(this.grabbedCenter=h,this.fixedWidth=g,this.dragOffset=
|
965
|
+
h-e):(a=h-f-g/2,0===b?a=Math.max(0,a):2===b&&a+g>=l&&(a=l-g,m=this.getUnionExtremes().dataMax),a!==e&&(this.fixedWidth=g,b=d.toFixedRange(a,a+g,null,m),c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(a,b){this.chart.pointer.normalize(a);a=this.chart;var c=a.xAxis[0],d=a.inverted&&!c.reversed||!a.inverted&&c.reversed;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?c.min:c.max):(this.grabbedRight=
|
966
|
+
!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?c.max:c.min);a.fixedRange=null},onMouseMove:function(a){var b=this,c=b.chart,d=b.left,e=b.navigatorSize,f=b.range,l=b.dragOffset,g=c.inverted;a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,g&&(d=b.top,c=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,c-d,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,c-d)):b.grabbedCenter&&(b.hasDragged=!0,c<l?c=l:c>e+l-f&&(c=e+l-f),b.render(0,
|
967
|
+
0,c-l,c-l+f)),b.hasDragged&&b.scrollbar&&b.scrollbar.options.liveRedraw&&(a.DOMType=a.type,setTimeout(function(){b.onMouseUp(a)},0)))},onMouseUp:function(a){var b=this.chart,c=this.xAxis,d=this.scrollbar,e,f,l=a.DOMEvent||a;(!this.hasDragged||d&&d.hasDragged)&&"scrollbar"!==a.trigger||(this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(f=this.fixedExtreme),this.zoomedMax===this.size&&(f=this.getUnionExtremes().dataMax),c=c.toFixedRange(this.zoomedMin,this.zoomedMax,
|
968
|
+
e,f),u(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:l}));"mousemove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(t(this.eventsToUnbind,function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=
|
969
|
+
this.baseSeries||[];this.navigatorEnabled&&a[0]&&!1!==this.navigatorOptions.adaptToUpdatedData&&(t(a,function(a){H(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&H(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,c=b.navigator,d=c.enabled,e=b.scrollbar,f=e.enabled,b=d?c.height:0,l=f?e.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=l;this.scrollbarEnabled=f;this.navigatorEnabled=d;this.navigatorOptions=
|
970
|
+
c;this.scrollbarOptions=e;this.outlineHeight=b+l;this.opposite=v(c.opposite,!d&&a.inverted);var g=this,e=g.baseSeries,f=a.xAxis.length,h=a.yAxis.length,m=e&&e[0]&&e[0].xAxis||a.xAxis[0];a.extraMargin={type:g.opposite?"plotTop":"marginBottom",value:(d||!a.inverted?g.outlineHeight:0)+c.margin};a.inverted&&(a.extraMargin.type=g.opposite?"marginRight":"plotLeft");a.isDirtyBox=!0;g.navigatorEnabled?(g.xAxis=new F(a,A({breaks:m.options.breaks,ordinal:m.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",
|
971
|
+
isX:!0,type:"datetime",index:f,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[l,0,-l,0],width:b}:{offsets:[0,-l,0,l],height:b})),g.yAxis=new F(a,A(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:h,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||c.series.data?g.addBaseSeries():0===a.series.length&&w(a,"redraw",function(b,c){0<a.series.length&&!g.series&&(g.setBaseSeries(),a.redraw=b);b.call(a,c)}),g.renderElements(),
|
972
|
+
g.addMouseEvents()):g.xAxis={translate:function(b,c){var d=a.xAxis[0],e=d.getExtremes(),f=d.len-2*l,k=G("min",d.options.min,e.dataMin),d=G("max",d.options.max,e.dataMax)-k;return c?b*d/f+k:f*(b-k)/d},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:F.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=g.scrollbar=new q(a.renderer,A(a.options.scrollbar,{margin:g.navigatorEnabled?0:10,vertical:a.inverted}),a),B(g.scrollbar,
|
973
|
+
"changed",function(b){var c=g.size,d=c*this.to,c=c*this.from;g.hasDragged=g.scrollbar.hasDragged;g.render(0,0,c,d);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType)&&setTimeout(function(){g.onMouseUp(b)})}));g.addBaseSeriesEvents();g.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],c=this.xAxis,d=c.options,e=b.options,f;a&&null===b.dataMin||(f={dataMin:v(d&&d.min,G("min",e.min,b.dataMin,c.dataMin,c.min)),dataMax:v(d&&d.max,G("max",e.max,b.dataMax,c.dataMax,c.max))});
|
974
|
+
return f},setBaseSeries:function(a){var b=this.chart,c;a=a||b.options&&b.options.navigator.baseSeries||0;this.series&&(this.removeBaseSeriesEvents(),t(this.series,function(a){a.destroy()}));c=this.baseSeries=[];t(b.series||[],function(b,d){(b.options.showInNavigator||(d===a||b.options.id===a)&&!1!==b.options.showInNavigator)&&c.push(b)});this.xAxis&&!this.xAxis.fake&&this.addBaseSeries()},addBaseSeries:function(){var a=this,b=a.chart,c=a.series=[],d=a.baseSeries,e,f,g=a.navigatorOptions.series,h,
|
975
|
+
m={enableMouseTracking:!1,index:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,visible:!0};d?t(d,function(d,k){m.name="Navigator "+(k+1);e=d.options||{};h=e.navigatorOptions||{};f=A(e,m,g,h);k=h.data||g.data;a.hasNavigatorData=a.hasNavigatorData||!!k;f.data=k||e.data&&e.data.slice(0);d.navigatorSeries=b.initSeries(f);c.push(d.navigatorSeries)}):(f=A(g,m),f.data=g.data,a.hasNavigatorData=!!f.data,c.push(b.initSeries(f)));this.addBaseSeriesEvents()},
|
976
|
+
addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&B(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);!1!==this.navigatorOptions.adaptToUpdatedData&&t(b,function(b){b.xAxis&&B(b,"updatedData",this.updatedDataHandler);B(b,"remove",function(){this.navigatorSeries&&(m(a.series,this.navigatorSeries),this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;a.getExtremes&&(!(b=this.getUnionExtremes(!0))||
|
977
|
+
b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,b=this.getExtremes(),c=b.dataMin,d=b.dataMax,b=b.max-b.min,e=a.stickToMin,f=a.stickToMax,g,h,m=a.series&&a.series[0],n=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(e&&(h=c,g=h+b),f&&(g=d,e||(h=Math.max(g-b,m&&m.xData?m.xData[0]:-Number.MAX_VALUE))),n&&(e||f)&&p(h)&&(this.min=this.userMin=h,this.max=this.userMax=g));a.stickToMin=
|
978
|
+
a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries;a.stickToMin=p(this.xAxis.min)&&this.xAxis.min<=this.xData[0];a.stickToMax=Math.round(a.zoomedMax)>=Math.round(a.size);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){B(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,
|
979
|
+
b.max)})},destroy:function(){this.removeEvents();this.xAxis&&(m(this.chart.xAxis,this.xAxis),m(this.chart.axes,this.xAxis));this.yAxis&&(m(this.chart.yAxis,this.yAxis),m(this.chart.axes,this.yAxis));t(this.series||[],function(a){a.destroy&&a.destroy()});t("series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);t([this.handles],function(a){r(a)},this)}};
|
980
|
+
a.Navigator=E;w(F.prototype,"zoom",function(a,b,c){var d=this.chart,e=d.options,f=e.chart.zoomType,g=e.navigator,e=e.rangeSelector,k;this.isXAxis&&(g&&g.enabled||e&&e.enabled)&&("x"===f?d.resetZoomButton="blocked":"y"===f?k=!1:"xy"===f&&(d=this.previousZoom,u(b)?this.previousZoom=[this.min,this.max]:d&&(b=d[0],c=d[1],delete this.previousZoom)));return void 0!==k?k:a.call(this,b,c)});w(D.prototype,"init",function(a,b,c){B(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=
|
981
|
+
this.navigator=new E(this)});a.call(this,b,c)});w(D.prototype,"setChartSize",function(a){var b=this.legend,c=this.navigator,d,e,f,g;a.apply(this,[].slice.call(arguments,1));c&&(e=b.options,f=c.xAxis,g=c.yAxis,d=c.scrollbarHeight,this.inverted?(c.left=c.opposite?this.chartWidth-d-c.height:this.spacing[3]+d,c.top=this.plotTop+d):(c.left=this.plotLeft+d,c.top=c.navigatorOptions.top||this.chartHeight-c.height-d-this.spacing[2]-("bottom"===e.verticalAlign&&e.enabled&&!e.floating?b.legendHeight+v(e.margin,
|
982
|
+
10):0)),f&&g&&(this.inverted?f.options.left=g.options.left=c.left:f.options.top=g.options.top=c.top,f.setAxisSize(),g.setAxisSize()))});w(J.prototype,"addPoint",function(a,c,d,e,g){var k=this.options.turboThreshold;k&&this.xData.length>k&&b(c,!0)&&this.chart.navigator&&f(20,!0);a.call(this,c,d,e,g)});w(D.prototype,"addSeries",function(a,b,c,d){a=a.call(this,b,!1,d);this.navigator&&this.navigator.setBaseSeries();v(c,!0)&&this.redraw();return a});w(J.prototype,"update",function(a,b,c){a.call(this,b,
|
983
|
+
!1);this.chart.navigator&&this.chart.navigator.setBaseSeries();v(c,!0)&&this.chart.redraw()});D.prototype.callbacks.push(function(a){var b=a.navigator;b&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))})})(L);(function(a){function E(a){this.init(a)}var B=a.addEvent,F=a.Axis,D=a.Chart,n=a.css,h=a.createElement,u=a.dateFormat,r=a.defaultOptions,x=r.global.useUTC,t=a.defined,m=a.destroyObjectProperties,f=a.discardElement,g=a.each,e=a.extend,d=a.fireEvent,p=a.Date,b=a.isNumber,A=a.merge,v=a.pick,H=
|
984
|
+
a.pInt,q=a.splat,J=a.wrap;e(r,{rangeSelector:{buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},height:35,inputPosition:{align:"right"},labelStyle:{color:"#666666"}}});r.lang=A(r.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});E.prototype={clickButton:function(a,d){var c=this,e=c.chart,f=c.buttonOptions[a],h=e.xAxis[0],m=e.scroller&&e.scroller.getUnionExtremes()||h||{},k=m.dataMin,n=m.dataMax,p,r=h&&Math.round(Math.min(h.max,v(n,h.max))),t=f.type,
|
985
|
+
u,m=f._range,w,C,A,D=f.dataGrouping;if(null!==k&&null!==n){e.fixedRange=m;D&&(this.forcedDataGrouping=!0,F.prototype.setDataGrouping.call(h||{chart:this.chart},D,!1));if("month"===t||"year"===t)h?(t={range:f,max:r,dataMin:k,dataMax:n},p=h.minFromRange.call(t),b(t.newMax)&&(r=t.newMax)):m=f;else if(m)p=Math.max(r-m,k),r=Math.min(p+m,n);else if("ytd"===t)if(h)void 0===n&&(k=Number.MAX_VALUE,n=Number.MIN_VALUE,g(e.series,function(a){a=a.xData;k=Math.min(a[0],k);n=Math.max(a[a.length-1],n)}),d=!1),r=
|
986
|
+
c.getYTDExtremes(n,k,x),p=w=r.min,r=r.max;else{B(e,"beforeRender",function(){c.clickButton(a)});return}else"all"===t&&h&&(p=k,r=n);c.setSelected(a);h?h.setExtremes(p,r,v(d,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:f}):(u=q(e.options.xAxis)[0],A=u.range,u.range=m,C=u.min,u.min=w,B(e,"load",function(){u.range=A;u.min=C}))}},setSelected:function(a){this.selected=this.options.selected=a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,
|
987
|
+
text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(a){var b=this,c=a.options.rangeSelector,e=c.buttons||[].concat(b.defaultButtons),f=c.selected,h=function(){var a=b.minInput,c=b.maxInput;a&&a.blur&&d(a,"blur");c&&c.blur&&d(c,"blur")};b.chart=a;b.options=c;b.buttons=[];a.extraTopMargin=c.height;b.buttonOptions=e;this.unMouseDown=B(a.container,"mousedown",h);this.unResize=B(a,"resize",h);g(e,b.computeButtonRange);void 0!==f&&e[f]&&this.clickButton(f,
|
988
|
+
!1);B(a,"load",function(){B(a.xAxis[0],"setExtremes",function(c){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==c.trigger&&"updatedData"!==c.trigger&&b.forcedDataGrouping&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this.chart,d=a.xAxis[0],e=Math.round(d.max-d.min),f=!d.hasVisibleSeries,a=a.scroller&&a.scroller.getUnionExtremes()||d,h=a.dataMin,l=a.dataMax,a=this.getYTDExtremes(l,h,x),m=a.min,k=a.max,n=this.selected,p=b(n),q=this.options.allButtonsEnabled,r=this.buttons;
|
989
|
+
g(this.buttonOptions,function(a,b){var c=a._range,g=a.type,t=a.count||1;a=r[b];var u=0;b=b===n;var w=c>l-h,v=c<d.minRange,x=!1,y=!1,c=c===e;("month"===g||"year"===g)&&e>=864E5*{month:28,year:365}[g]*t&&e<=864E5*{month:31,year:366}[g]*t?c=!0:"ytd"===g?(c=k-m===e,x=!b):"all"===g&&(c=d.max-d.min>=l-h,y=!b&&p&&c);g=!q&&(w||v||y||f);c=b&&c||c&&!p&&!x;g?u=3:c&&(p=!0,u=2);a.state!==u&&a.setState(u)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,
|
990
|
+
day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this[a+"Input"];t(b)&&(d.previousValue=d.HCTime,d.HCTime=b);d.value=u(c.inputEditDateFormat||"%Y-%m-%d",d.HCTime);this[a+"DateBox"].attr({text:u(c.inputDateFormat||"%b %e, %Y",d.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];n(this[a+"Input"],{left:b.translateX+c.x+"px",top:b.translateY+
|
991
|
+
"px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})},hideInput:function(a){n(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(a){function c(){var a=q.value,c=(m.inputDateParser||Date.parse)(a),e=f.xAxis[0],g=f.scroller&&f.scroller.xAxis?f.scroller.xAxis:e,k=g.dataMin,g=g.dataMax;c!==q.previousValue&&(q.previousValue=c,b(c)||(c=a.split("-"),c=Date.UTC(H(c[0]),H(c[1])-1,H(c[2]))),b(c)&&(x||(c+=6E4*(new Date).getTimezoneOffset()),
|
992
|
+
p?c>d.maxInput.HCTime?c=void 0:c<k&&(c=k):c<d.minInput.HCTime?c=void 0:c>g&&(c=g),void 0!==c&&e.setExtremes(p?c:e.min,p?e.max:c,void 0,void 0,{trigger:"rangeSelectorInput"})))}var d=this,f=d.chart,g=f.renderer.style||{},l=f.renderer,m=f.options.rangeSelector,k=d.div,p="min"===a,q,t,u=this.inputGroup;this[a+"Label"]=t=l.label(r.lang[p?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(u);u.offset+=t.width+5;this[a+"DateBox"]=l=l.label("",
|
993
|
+
u.offset).addClass("highcharts-range-input").attr({padding:2,width:m.inputBoxWidth||90,height:m.inputBoxHeight||17,stroke:m.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click",function(){d.showInput(a);d[a+"Input"].focus()}).add(u);u.offset+=l.width+(p?10:0);this[a+"Input"]=q=h("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:f.plotTop+"px"},k);t.css(A(g,m.labelStyle));l.css(A({color:"#333333"},g,m.inputStyle));n(q,e({position:"absolute",border:0,
|
994
|
+
width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:g.fontSize,fontFamily:g.fontFamily,left:"-9em"},m.inputStyle));q.onfocus=function(){d.showInput(a)};q.onblur=function(){d.hideInput(a)};q.onchange=c;q.onkeypress=function(a){13===a.keyCode&&c()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a=v((b.buttonPosition||{}).y,a.plotTop-a.axisOffset[0]-b.height);return{buttonTop:a,inputTop:a-10}},getYTDExtremes:function(a,b,d){var c=new p(a),e=c[p.hcGetFullYear]();d=d?p.UTC(e,
|
995
|
+
0,1):+new p(e,0,1);b=Math.max(b||0,d);c=c.getTime();return{max:Math.min(a||c,c),min:b}},render:function(a,b){var c=this,d=c.chart,f=d.renderer,l=d.container,m=d.options,k=m.exporting&&!1!==m.exporting.enabled&&m.navigation&&m.navigation.buttonOptions,n=m.rangeSelector,p=c.buttons,m=r.lang,q=c.div,q=c.inputGroup,u=n.buttonTheme,w=n.buttonPosition||{},x=n.inputEnabled,C=u&&u.states,A=d.plotLeft,B,D=this.getPosition(),E=c.group,F=c.rendered;!1!==n.enabled&&(F||(c.group=E=f.g("range-selector-buttons").add(),
|
996
|
+
c.zoomText=f.text(m.rangeSelectorZoom,v(w.x,A),15).css(n.labelStyle).add(E),B=v(w.x,A)+c.zoomText.getBBox().width+5,g(c.buttonOptions,function(a,b){p[b]=f.button(a.text,B,0,function(){c.clickButton(b);c.isActive=!0},u,C&&C.hover,C&&C.select,C&&C.disabled).attr({"text-align":"center"}).add(E);B+=p[b].width+v(n.buttonSpacing,5)}),!1!==x&&(c.div=q=h("div",null,{position:"relative",height:0,zIndex:1}),l.parentNode.insertBefore(q,l),c.inputGroup=q=f.g("input-group").add(),q.offset=0,c.drawInput("min"),
|
997
|
+
c.drawInput("max"))),c.updateButtonStates(),E[F?"animate":"attr"]({translateY:D.buttonTop}),!1!==x&&(q.align(e({y:D.inputTop,width:q.offset,x:k&&D.inputTop<(k.y||0)+k.height-d.spacing[0]?-40:0},n.inputPosition),!0,d.spacingBox),t(x)||(d=E.getBBox(),q[q.alignAttr.translateX<d.x+d.width+10?"hide":"show"]()),c.setInputValue("min",a),c.setInputValue("max",b)),c.rendered=!0)},update:function(a){var b=this.chart;A(!0,b.options.rangeSelector,a);this.destroy();this.init(b)},destroy:function(){var b=this,
|
998
|
+
d=b.minInput,e=b.maxInput;b.unMouseDown();b.unResize();m(b.buttons);d&&(d.onfocus=d.onblur=d.onchange=null);e&&(e.onfocus=e.onblur=e.onchange=null);a.objectEach(b,function(a,c){a&&"chart"!==c&&(a.destroy?a.destroy():a.nodeType&&f(this[c]));a!==E.prototype[c]&&(b[c]=null)},this)}};F.prototype.toFixedRange=function(a,d,e,f){var c=this.chart&&this.chart.fixedRange;a=v(e,this.translate(a,!0,!this.horiz));d=v(f,this.translate(d,!0,!this.horiz));e=c&&(d-a)/c;.7<e&&1.3>e&&(f?a=d-c:d=a+c);b(a)||(a=d=void 0);
|
999
|
+
return{min:a,max:d}};F.prototype.minFromRange=function(){var a=this.range,d={month:"Month",year:"FullYear"}[a.type],e,f=this.max,g,h,m=function(a,b){var c=new Date(a),e=c["get"+d]();c["set"+d](e+b);e===c["get"+d]()&&c.setDate(0);return c.getTime()-a};b(a)?(e=f-a,h=a):(e=f+m(f,-a.count),this.chart&&(this.chart.fixedRange=f-e));g=v(this.dataMin,Number.MIN_VALUE);b(e)||(e=g);e<=g&&(e=g,void 0===h&&(h=m(e,a.count)),this.newMax=Math.min(e+h,this.dataMax));b(f)||(e=void 0);return e};J(D.prototype,"init",
|
1000
|
+
function(a,b,d){B(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new E(this))});a.call(this,b,d)});D.prototype.callbacks.push(function(a){function c(){d=a.xAxis[0].getExtremes();b(d.min)&&e.render(d.min,d.max)}var d,e=a.rangeSelector,f,g;e&&(g=B(a.xAxis[0],"afterSetExtremes",function(a){e.render(a.min,a.max)}),f=B(a,"redraw",c),c());B(a,"destroy",function(){e&&(f(),g())})});a.RangeSelector=E})(L);(function(a){var E=a.arrayMax,B=a.arrayMin,F=a.Axis,D=a.Chart,n=a.defined,
|
1001
|
+
h=a.each,u=a.extend,r=a.format,x=a.grep,t=a.inArray,m=a.isNumber,f=a.isString,g=a.map,e=a.merge,d=a.pick,p=a.Point,b=a.Renderer,A=a.Series,v=a.splat,H=a.SVGRenderer,q=a.VMLRenderer,J=a.wrap,c=A.prototype,w=c.init,K=c.processData,y=p.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(b,c,h){var k=f(b)||b.nodeName,l=arguments[k?1:0],m=l.series,n=a.getOptions(),p,q=d(l.navigator&&l.navigator.enabled,n.navigator.enabled,!0),r=q?{startOnTick:!1,endOnTick:!1}:null,t={marker:{enabled:!1,radius:2}},
|
1002
|
+
u={shadow:!1,borderWidth:0};l.xAxis=g(v(l.xAxis||{}),function(a){return e({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},n.xAxis,a,{type:"datetime",categories:null},r)});l.yAxis=g(v(l.yAxis||{}),function(a){p=d(a.opposite,!0);return e({labels:{y:-2},opposite:p,showLastLabel:!1,title:{text:null}},n.yAxis,a)});l.series=null;l=e({chart:{panning:!0,pinchType:"x"},navigator:{enabled:q},scrollbar:{enabled:d(n.scrollbar.enabled,!0)},rangeSelector:{enabled:d(n.rangeSelector.enabled,
|
1003
|
+
!0)},title:{text:null},tooltip:{shared:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:t,spline:t,area:t,areaspline:t,arearange:t,areasplinerange:t,column:u,columnrange:u,candlestick:u,ohlc:u}},l,{isStock:!0});l.series=m;return k?new D(b,l,h):new D(l,c)};J(F.prototype,"autoLabelAlign",function(a){var b=this.chart,c=this.options,b=b._labelPanes=b._labelPanes||{},d=this.options.labels;return this.chart.options.isStock&&"yAxis"===this.coll&&(c=c.top+","+c.height,!b[c]&&d.enabled)?(15===d.x&&
|
1004
|
+
(d.x=0),void 0===d.align&&(d.align="right"),b[c]=this,"right"):a.call(this,[].slice.call(arguments,1))});J(F.prototype,"destroy",function(a){var b=this.chart,c=this.options&&this.options.top+","+this.options.height;c&&b._labelPanes&&b._labelPanes[c]===this&&delete b._labelPanes[c];return a.call(this,Array.prototype.slice.call(arguments,1))});J(F.prototype,"getPlotLinePath",function(b,c,e,k,p,q){var l=this,r=this.isLinked&&!this.series?this.linkedParent.series:this.series,u=l.chart,v=u.renderer,w=
|
1005
|
+
l.left,x=l.top,z,y,A,B,G=[],D=[],E,I;if("xAxis"!==l.coll&&"yAxis"!==l.coll)return b.apply(this,[].slice.call(arguments,1));D=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=l.options[b];return m(a)?[u[b][a]]:f(a)?[u.get(a)]:g(r,function(a){return a[b]})}(l.coll);h(l.isXAxis?u.yAxis:u.xAxis,function(a){if(n(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=n(a.options[b])?u[b][a.options[b]]:u[b][0];l===b&&D.push(a)}});E=D.length?[]:[l.isXAxis?u.yAxis[0]:u.xAxis[0]];
|
1006
|
+
h(D,function(b){-1!==t(b,E)||a.find(E,function(a){return a.pos===b.pos&&a.len&&b.len})||E.push(b)});I=d(q,l.translate(c,null,null,k));m(I)&&(l.horiz?h(E,function(a){var b;y=a.pos;B=y+a.len;z=A=Math.round(I+l.transB);if(z<w||z>w+l.width)p?z=A=Math.min(Math.max(w,z),w+l.width):b=!0;b||G.push("M",z,y,"L",A,B)}):h(E,function(a){var b;z=a.pos;A=z+a.len;y=B=Math.round(x+l.height-I);if(y<x||y>x+l.height)p?y=B=Math.min(Math.max(x,y),l.top+l.height):b=!0;b||G.push("M",z,y,"L",A,B)}));return 0<G.length?v.crispPolyLine(G,
|
1007
|
+
e||1):null});F.prototype.getPlotBandPath=function(a,b){b=this.getPlotLinePath(b,null,null,!0);a=this.getPlotLinePath(a,null,null,!0);var c=[],d;if(a&&b)if(a.toString()===b.toString())c=a,c.flat=!0;else for(d=0;d<a.length;d+=6)c.push("M",a[d+1],a[d+2],"L",a[d+4],a[d+5],b[d+4],b[d+5],b[d+1],b[d+2],"z");else c=null;return c};H.prototype.crispPolyLine=function(a,b){var c;for(c=0;c<a.length;c+=6)a[c+1]===a[c+4]&&(a[c+1]=a[c+4]=Math.round(a[c+1])-b%2/2),a[c+2]===a[c+5]&&(a[c+2]=a[c+5]=Math.round(a[c+2])+
|
1008
|
+
b%2/2);return a};b===q&&(q.prototype.crispPolyLine=H.prototype.crispPolyLine);J(F.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});J(F.prototype,"drawCrosshair",function(a,b,c){var e,f;a.call(this,b,c);if(n(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){a=this.chart;var g=this.options.crosshair.label,h=this.horiz;e=this.opposite;f=this.left;var l=this.top,m=this.crossLabel,p,q=g.format,t="",v="inside"===this.options.tickPosition,
|
1009
|
+
w=!1!==this.crosshair.snap,x=0;b||(b=this.cross&&this.cross.e);p=h?"center":e?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";m||(m=this.crossLabel=a.renderer.label(null,null,null,g.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:g.align||p,padding:d(g.padding,8),r:d(g.borderRadius,3),zIndex:2}).add(this.labelGroup),m.attr({fill:g.backgroundColor||this.series[0]&&this.series[0].color||
|
1010
|
+
"#666666",stroke:g.borderColor||"","stroke-width":g.borderWidth||0}).css(u({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},g.style)));h?(p=w?c.plotX+f:b.chartX,l+=e?0:this.height):(p=e?this.width+f:0,l=w?c.plotY+l:b.chartY);q||g.formatter||(this.isDatetimeAxis&&(t="%b %d, %Y"),q="{value"+(t?":"+t:"")+"}");b=w?c[this.isXAxis?"x":"y"]:this.toValue(h?b.chartX:b.chartY);m.attr({text:q?r(q,{value:b}):g.formatter.call(this,b),x:p,y:l,visibility:"visible"});b=m.getBBox();if(h){if(v&&
|
1011
|
+
!e||!v&&e)l=m.y-b.height}else l=m.y-b.height/2;h?(e=f-b.x,f=f+this.width-b.x):(e="left"===this.labelAlign?f:0,f="right"===this.labelAlign?f+this.width:a.chartWidth);m.translateX<e&&(x=e-m.translateX);m.translateX+b.width>=f&&(x=-(m.translateX+b.width-f));m.attr({x:p+x,y:l,anchorX:h?p:this.opposite?0:a.chartWidth,anchorY:h?this.opposite?a.chartHeight:0:l+b.height/2})}});c.init=function(){w.apply(this,arguments);this.setCompare(this.options.compare)};c.setCompare=function(a){this.modifyValue="value"===
|
1012
|
+
a||"percent"===a?function(b,c){var d=this.compareValue;if(void 0!==b&&void 0!==d)return b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};c.processData=function(){var a,b=-1,c,d,e,f;K.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,e=d.length,this.pointArrayMap&&(b=t("close",this.pointArrayMap),-1===b&&(b=t(this.pointValKey||"y",this.pointArrayMap))),
|
1013
|
+
a=0;a<e-1;a++)if(f=d[a]&&-1<b?d[a][b]:d[a],m(f)&&c[a+1]>=this.xAxis.min&&0!==f){this.compareValue=f;break}};J(c,"getExtremes",function(a){var b;a.apply(this,[].slice.call(arguments,1));this.modifyValue&&(b=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)],this.dataMin=B(b),this.dataMax=E(b))});F.prototype.setCompare=function(a,b){this.isXAxis||(h(this.series,function(b){b.setCompare(a)}),d(b,!0)&&this.chart.redraw())};p.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",
|
1014
|
+
(0<this.change?"+":"")+a.numberFormat(this.change,d(this.series.tooltipOptions.changeDecimals,2)));return y.apply(this,[b])};J(A.prototype,"render",function(a){this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(!this.clipBox&&this.animate?(this.clipBox=e(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len):this.chart[this.sharedClipKey]?this.chart[this.sharedClipKey].attr({width:this.xAxis.len,height:this.yAxis.len}):this.clipBox&&
|
1015
|
+
(this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len));a.call(this)});J(D.prototype,"getSelectedPoints",function(a){var b=a.call(this);h(this.series,function(a){a.hasGroupedData&&(b=b.concat(x(a.points||[],function(a){return a.selected})))});return b});J(D.prototype,"update",function(a,b){"scrollbar"in b&&this.navigator&&(e(!0,this.options.scrollbar,b.scrollbar),this.navigator.update({},!1),delete b.scrollbar);return a.apply(this,Array.prototype.slice.call(arguments,1))})})(L);return L});
|
1016
|
+
|
1017
|
+
/* END highstock.js*/
|
1018
|
+
|
1019
|
+
|
1020
|
+
var event = document.createEvent("HTMLEvents");
|
1021
|
+
event.initEvent("load_highcharts", false, false);
|
1022
|
+
window.dispatchEvent(event);
|
1023
|
+
console.log("Finish loading highchartsjs");
|
1024
|
+
|
1025
|
+
|
1026
|
+
</script>
|
1027
|
+
</head>
|
1028
|
+
<body>
|
1029
|
+
<div id="main">
|
1030
|
+
|
1031
|
+
<h1>Highcharts examples</h1>
|
1032
|
+
|
1033
|
+
<div style="margin-top: 100px; margin-bottom: 100px">
|
1034
|
+
<h3>Line example</h3>
|
1035
|
+
<p>
|
1036
|
+
|
1037
|
+
<b>Data : </b>
|
1038
|
+
[{:name=>"Installation", :data=>[43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]}, {:name=>"Manufacturing", :data=>[24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]}, {:name=>"Sales & Distribution", :data=>[11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]}, {:name=>"Project Development", :data=>[nil, nil, 7988, 12169, 15112, 22452, 34400, 34227]}, {:name=>"Other", :data=>[12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]}]
|
1039
|
+
|
1040
|
+
</p>
|
1041
|
+
<p> <script type="text/javascript">
|
1042
|
+
(function() {
|
1043
|
+
|
1044
|
+
var onload = window.onload;
|
1045
|
+
window.onload = function(){
|
1046
|
+
if (typeof onload == "function") onload();
|
1047
|
+
var options = { "chart": { "defaultSeriesType": "line","height": 600,"width": 900,"renderTo": "qovzwmhljxi" },"title": { "text": "Solar Employment Growth by Sector, 2010-2016" },"subtitle": { "text": "Source: thesolarfoundation.com" },"yAxis": { "title": { "text": "Number of Employees" } },"legend": { "layout": "vertical","align": "right","verticalAlign": "middle" },"series": [{ "name": "Installation","data": [ 43934,52503,57177,69658,97031,119931,137133,154175 ] },{ "name": "Manufacturing","data": [ 24916,24064,29742,29851,32490,30282,38121,40434 ] },{ "name": "Sales & Distribution","data": [ 11744,17722,16005,19771,20185,24377,32147,39387 ] },{ "name": "Project Development","data": [ null,null,7988,12169,15112,22452,34400,34227 ] },{ "name": "Other","data": [ 12908,5948,8105,11248,8989,11816,18274,18111 ] }] };
|
1048
|
+
|
1049
|
+
window.chart_qovzwmhljxi = new Highcharts.Chart(options);
|
1050
|
+
|
1051
|
+
};
|
1052
|
+
})()
|
1053
|
+
</script>
|
1054
|
+
|
1055
|
+
<div id="qovzwmhljxi"></div></p>
|
1056
|
+
</div>
|
1057
|
+
|
1058
|
+
|
1059
|
+
|
1060
|
+
<div style="margin-top: 100px; margin-bottom: 100px">
|
1061
|
+
<h3>Line example Drag and zoom</h3>
|
1062
|
+
<p>
|
1063
|
+
|
1064
|
+
<b>Data : </b>
|
1065
|
+
[{:type=>"area", :name=>"USD to EUR", :data=>[["201352", 0.7695], ["201353", 0.7648], ["201354", 0.7645], ["201355", 0.7638], ["201356", 0.7549], ["201357", 0.7562], ["201359", 0.7574], ["2013510", 0.7543], ["2013511", 0.751], ["2013512", 0.7498]]}]
|
1066
|
+
|
1067
|
+
</p>
|
1068
|
+
<p> <script type="text/javascript">
|
1069
|
+
(function() {
|
1070
|
+
|
1071
|
+
var onload = window.onload;
|
1072
|
+
window.onload = function(){
|
1073
|
+
if (typeof onload == "function") onload();
|
1074
|
+
var options = { "chart": { "zoomType": "x","height": 600,"width": 900,"renderTo": "thzsvlxbqgf" },"title": { "text": "USD to EUR exchange rate over time" },"subtitle": { "text": document.ontouchstart === undefined ?
|
1075
|
+
'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in' },"yAxis": { "title": { "text": "Exchange rate" } },"legend": { "enabled": true },"rangeSelector": { "selected": 1 },"plotOptions": { "area": { "fillColor": { "linearGradient": { "x1": 0,"y1": 0,"x2": 0,"y2": 1 },"stops": [ [ 0,Highcharts.getOptions().colors[0] ],[ 1,Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba') ] ] },"marker": { "radius": 2 },"lineWidth": 1,"states": { "hover": { "lineWidth": 10 } },"threshold": null } },"series": [{ "type": "area","name": "USD to EUR","data": [ [ "201352",0.7695 ],[ "201353",0.7648 ],[ "201354",0.7645 ],[ "201355",0.7638 ],[ "201356",0.7549 ],[ "201357",0.7562 ],[ "201359",0.7574 ],[ "2013510",0.7543 ],[ "2013511",0.751 ],[ "2013512",0.7498 ] ] }] };
|
1076
|
+
|
1077
|
+
window.chart_thzsvlxbqgf = new Highcharts.Chart(options);
|
1078
|
+
|
1079
|
+
};
|
1080
|
+
})()
|
1081
|
+
</script>
|
1082
|
+
|
1083
|
+
<div id="thzsvlxbqgf"></div></p>
|
1084
|
+
</div>
|
1085
|
+
|
1086
|
+
|
1087
|
+
|
1088
|
+
<div style="margin-top: 100px; margin-bottom: 100px">
|
1089
|
+
<h3>Dynamic chart example </h3>
|
1090
|
+
<p>
|
1091
|
+
|
1092
|
+
<b>Data : </b>
|
1093
|
+
[{:name=>"Random data", :data=>"(function () {\n // generate an array of random data\n var data = [],\n time = (new Date()).getTime(),\n i;\n\n for (i = -19; i <= 0; i += 1) {\n data.push({\n x: time + i * 1000,\n y: Math.random()\n });\n }\n return data;\n }())"}]
|
1094
|
+
|
1095
|
+
</p>
|
1096
|
+
<p> <script type="text/javascript">
|
1097
|
+
(function() {
|
1098
|
+
|
1099
|
+
var onload = window.onload;
|
1100
|
+
window.onload = function(){
|
1101
|
+
if (typeof onload == "function") onload();
|
1102
|
+
var options = { "chart": { "type": "spline","animation": Highcharts.svg,"marginRight": 10,"events": { "load": function () {
|
1103
|
+
|
1104
|
+
// set up the updating of the chart each second
|
1105
|
+
var series = this.series[0];
|
1106
|
+
setInterval(function () {
|
1107
|
+
var x = (new Date()).getTime(), // current time
|
1108
|
+
y = Math.random();
|
1109
|
+
series.addPoint([x, y], true, true);
|
1110
|
+
}, 1000);
|
1111
|
+
} },"height": 600,"width": 900,"renderTo": "wbutxjseoqm" },"title": { "text": "Live random data" },"xAxis": { "type": "datetime","tickPixelInterval": 150 },"yAxis": { "title": { "text": "Value" },"plotLines": [ { "value": 0,"width": 1,"color": "#808080" } ] },"tooltip": { "formatter": function () {
|
1112
|
+
return '<b>' + this.series.name + '</b><br/>' +
|
1113
|
+
Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>' +
|
1114
|
+
Highcharts.numberFormat(this.y, 2);
|
1115
|
+
} },"legend": { "enabled": false },"exporting": { "enabled": false },"series": [{ "name": "Random data","data": (function () {
|
1116
|
+
// generate an array of random data
|
1117
|
+
var data = [],
|
1118
|
+
time = (new Date()).getTime(),
|
1119
|
+
i;
|
1120
|
+
|
1121
|
+
for (i = -19; i <= 0; i += 1) {
|
1122
|
+
data.push({
|
1123
|
+
x: time + i * 1000,
|
1124
|
+
y: Math.random()
|
1125
|
+
});
|
1126
|
+
}
|
1127
|
+
return data;
|
1128
|
+
}()) }] };
|
1129
|
+
|
1130
|
+
window.chart_wbutxjseoqm = new Highcharts.Chart(options);
|
1131
|
+
|
1132
|
+
};
|
1133
|
+
})()
|
1134
|
+
</script>
|
1135
|
+
|
1136
|
+
<div id="wbutxjseoqm"></div></p>
|
1137
|
+
</div>
|
1138
|
+
|
1139
|
+
</div>
|
1140
|
+
<div id="sidebar">
|
1141
|
+
<h2>Documentation</h2>
|
1142
|
+
<ul>
|
1143
|
+
<li><a href="https://shekharrajak.github.io/daru-view/">Documentation</a></li>
|
1144
|
+
<li><a href="http://nbviewer.jupyter.org/github/shekharrajak/daru-view/tree/master/spec/dummy_iruby/">Tutorial</a></li>
|
1145
|
+
</ul>
|
1146
|
+
<h2>Community</h2>
|
1147
|
+
<ul>
|
1148
|
+
<li><a href="https://groups.google.com/forum/#!forum/sciruby-dev">Discussion group</a></li>
|
1149
|
+
<li><a href="https://shekharrajak.github.io/daru-view/CONTRIBUTING.md">Contributing</a></li>
|
1150
|
+
</ul>
|
1151
|
+
</div>
|
1152
|
+
</body>
|
1153
|
+
</html>
|