Browse Source

Added visitor stats to transparency page.

pull/50/head
Teknikode 5 years ago
parent
commit
46b4fc9c9e
  1. 2
      Teknik/Areas/About/Views/About/Index.cshtml
  2. 27
      Teknik/Areas/Transparency/Controllers/TransparencyController.cs
  3. 60
      Teknik/Areas/Transparency/Scripts/Transparency.js
  4. 9
      Teknik/Areas/Transparency/TransparencyAreaRegistration.cs
  5. 14
      Teknik/Areas/Transparency/Views/Transparency/Index.cshtml
  6. 51
      Teknik/Scripts/Highcharts/highcharts-3d.js
  7. 60
      Teknik/Scripts/Highcharts/highcharts-more.js
  8. 386
      Teknik/Scripts/Highcharts/highcharts.js
  9. BIN
      Teknik/Scripts/_references.js
  10. 3
      Teknik/Teknik.csproj
  11. 3
      Utilities/Configuration/PiwikConfig.cs
  12. 6
      Utilities/Piwik/Piwik.csproj
  13. 93
      Utilities/Piwik/Reporting.cs
  14. 23
      Utilities/Piwik/VisitorData.cs
  15. 1
      Utilities/Piwik/packages.config

2
Teknik/Areas/About/Views/About/Index.cshtml

@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
<!-- Prices -->
<tr>
<td class="text-left"><b>Features</b></td>
<td class="text-center">$5 One-Time Fee</td>
<td class="text-center">$5 Donation</td>
<td class="text-center">Free</td>
<td class="text-center">Free</td>
</tr>

27
Teknik/Areas/Transparency/Controllers/TransparencyController.cs

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
@ -9,6 +10,7 @@ using Teknik.Attributes; @@ -9,6 +10,7 @@ using Teknik.Attributes;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Models;
using Teknik.Piwik;
namespace Teknik.Areas.Transparency.Controllers
{
@ -112,5 +114,30 @@ namespace Teknik.Areas.Transparency.Controllers @@ -112,5 +114,30 @@ namespace Teknik.Areas.Transparency.Controllers
}
return View(model);
}
[HttpGet]
[AllowAnonymous]
public ActionResult GetVisitorData()
{
// Get the data from the Piwik
if (!string.IsNullOrEmpty(Config.PiwikConfig.Url))
{
List<VisitorData> dataList = Reporting.GetVisitSummaryByDays(Config, 31);
List<object> uniqueData = new List<object>();
List<object> totalData = new List<object>();
foreach (VisitorData data in dataList.OrderBy(d => d.Date))
{
object uniqueDay = new { x = Convert.ToInt64((data.Date.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds), y = data.UniqueVisitors };
uniqueData.Add(uniqueDay);
object totalDay = new { x = Convert.ToInt64((data.Date.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds), y = data.Visits };
totalData.Add(totalDay);
}
return Json(new { result = new { uniqueVisitors = uniqueData.ToArray(), totalVisitors = totalData.ToArray() } }, JsonRequestBehavior.AllowGet);
}
return Json(new { error = new { message = "Piwik not configured" } }, JsonRequestBehavior.AllowGet);
}
}
}

60
Teknik/Areas/Transparency/Scripts/Transparency.js

@ -3,4 +3,64 @@ @@ -3,4 +3,64 @@
$('#oneTime-section').collapse('hide');
$('#donations-section').collapse('hide');
$('#takedowns-section').collapse('hide');
var visitChartOptions = {
chart: {
renderTo: 'visitor-chart'
},
title: {
text: 'Daily Visitors'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { // don't display the dummy year
month: '%e. %b',
year: '%b'
},
title: {
text: 'Date'
}
},
yAxis: {
title: {
text: 'Visitors'
}
},
tooltip: {
shared: true,
crosshairs: true,
headerFormat: '<span style="font-size: 10px">{point.key:%B %e, %Y}</span><br/>',
pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.y}</b><br/>'
},
series: [
{
name: 'All Visitors'
},
{
name: 'Unique Visitors'
}
]
};
if (statsEnabled) {
$.ajax({
type: "GET",
url: getVisitorDataURL,
success: function (response) {
if (response.result) {
visitChartOptions.series[0].data = response.result.totalVisitors;
visitChartOptions.series[1].data = response.result.uniqueVisitors;
var visitChart = new Highcharts.chart(visitChartOptions);
}
else {
var err = response;
if (response.error) {
err = response.error.message;
}
$("#top_msg").css('display', 'inline', 'important');
$("#top_msg").html('<div class="alert alert-danger alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>' + err + '</div>');
}
}
});
}
});

9
Teknik/Areas/Transparency/TransparencyAreaRegistration.cs

@ -27,9 +27,18 @@ namespace Teknik.Areas.Transparency @@ -27,9 +27,18 @@ namespace Teknik.Areas.Transparency
new { controller = "Transparency", action = "Index" },
new[] { typeof(Controllers.TransparencyController).Namespace }
);
context.MapSubdomainRoute(
"Transparency.Action",
new List<string>() { "transparency" }, // Subdomains
new List<string>() { config.Host }, // domains
"Action/{controller}/{action}",
new { controller = "Transparency", action = "Index" },
new[] { typeof(Controllers.TransparencyController).Namespace }
);
// Register Script Bundle
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/transparency", config.CdnHost).Include(
"~/Scripts/Highcharts/highcharts.js",
"~/Areas/Transparency/Scripts/Transparency.js"));
}
}

14
Teknik/Areas/Transparency/Views/Transparency/Index.cshtml

@ -5,6 +5,11 @@ @@ -5,6 +5,11 @@
@Scripts.Render("~/bundles/transparency")
<script type="text/javascript">
var statsEnabled = @(Model.Config.PiwikConfig.Enabled.ToString().ToLower());
var getVisitorDataURL = '@Url.SubRouteUrl("transparency", "Transparency.Action", new { action = "GetVisitorData" })';
</script>
<div class="container">
@if (Model.Config.TransparencyConfig.Enabled)
{
@ -24,6 +29,15 @@ @@ -24,6 +29,15 @@
<br />
<h2 class="text-center"><b>Statistics</b></h2>
<hr>
@if (Model.Config.PiwikConfig.Enabled)
{
<div class="row">
<div class="col-sm-12">
<div id="visitor-chart"></div>
</div>
</div>
<br />
}
<div class="row">
<div class="col-sm-6">
<h3>Uploads</h3>

51
Teknik/Scripts/Highcharts/highcharts-3d.js

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
/*
Highcharts JS v5.0.7 (2017-01-17)
3D features for Highcharts JS
@license: www.highcharts.com/license
*/
(function(F){"object"===typeof module&&module.exports?module.exports=F:F(Highcharts)})(function(F){(function(a){var r=a.deg2rad,k=a.pick;a.perspective=function(n,m,u){var p=m.options.chart.options3d,f=u?m.inverted:!1,g=m.plotWidth/2,q=m.plotHeight/2,d=p.depth/2,e=k(p.depth,1)*k(p.viewDistance,0),c=m.scale3d||1,b=r*p.beta*(f?-1:1),p=r*p.alpha*(f?-1:1),h=Math.cos(p),w=Math.cos(-b),y=Math.sin(p),z=Math.sin(-b);u||(g+=m.plotLeft,q+=m.plotTop);return a.map(n,function(b){var a,p;p=(f?b.y:b.x)-g;var m=(f?
b.x:b.y)-q,k=(b.z||0)-d;a=w*p-z*k;b=-y*z*p+h*m-w*y*k;p=h*z*p+y*m+h*w*k;m=0<e&&e<Number.POSITIVE_INFINITY?e/(p+d+e):1;a=a*m*c+g;b=b*m*c+q;return{x:f?b:a,y:f?a:b,z:p*c+d}})};a.pointCameraDistance=function(a,m){var n=m.options.chart.options3d,p=m.plotWidth/2;m=m.plotHeight/2;n=k(n.depth,1)*k(n.viewDistance,0)+n.depth;return Math.sqrt(Math.pow(p-a.plotX,2)+Math.pow(m-a.plotY,2)+Math.pow(n-a.plotZ,2))}})(F);(function(a){function r(b){var c=0,l,x;for(l=0;l<b.length;l++)x=(l+1)%b.length,c+=b[l].x*b[x].y-
b[x].x*b[l].y;return c/2}function k(b){var c=0,l;for(l=0;l<b.length;l++)c+=b[l].z;return b.length?c/b.length:0}function n(b,c,l,x,a,h,d,e){var D=[],f=h-a;return h>a&&h-a>Math.PI/2+.0001?(D=D.concat(n(b,c,l,x,a,a+Math.PI/2,d,e)),D=D.concat(n(b,c,l,x,a+Math.PI/2,h,d,e))):h<a&&a-h>Math.PI/2+.0001?(D=D.concat(n(b,c,l,x,a,a-Math.PI/2,d,e)),D=D.concat(n(b,c,l,x,a-Math.PI/2,h,d,e))):["C",b+l*Math.cos(a)-l*t*f*Math.sin(a)+d,c+x*Math.sin(a)+x*t*f*Math.cos(a)+e,b+l*Math.cos(h)+l*t*f*Math.sin(h)+d,c+x*Math.sin(h)-
x*t*f*Math.cos(h)+e,b+l*Math.cos(h)+d,c+x*Math.sin(h)+e]}var m=Math.cos,u=Math.PI,p=Math.sin,f=a.animObject,g=a.charts,q=a.color,d=a.defined,e=a.deg2rad,c=a.each,b=a.extend,h=a.inArray,w=a.map,y=a.merge,z=a.perspective,G=a.pick,B=a.SVGElement,H=a.SVGRenderer,C=a.wrap,t=4*(Math.sqrt(2)-1)/3/(u/2);H.prototype.toLinePath=function(b,a){var h=[];c(b,function(b){h.push("L",b.x,b.y)});b.length&&(h[0]="M",a&&h.push("Z"));return h};H.prototype.cuboid=function(b){var c=this.g(),h=c.destroy;b=this.cuboidPath(b);
c.attr({"stroke-linejoin":"round"});c.front=this.path(b[0]).attr({"class":"highcharts-3d-front",zIndex:b[3]}).add(c);c.top=this.path(b[1]).attr({"class":"highcharts-3d-top",zIndex:b[4]}).add(c);c.side=this.path(b[2]).attr({"class":"highcharts-3d-side",zIndex:b[5]}).add(c);c.fillSetter=function(b){this.front.attr({fill:b});this.top.attr({fill:q(b).brighten(.1).get()});this.side.attr({fill:q(b).brighten(-.1).get()});this.color=b;return this};c.opacitySetter=function(b){this.front.attr({opacity:b});
this.top.attr({opacity:b});this.side.attr({opacity:b});return this};c.attr=function(b){if(b.shapeArgs||d(b.x))b=this.renderer.cuboidPath(b.shapeArgs||b),this.front.attr({d:b[0],zIndex:b[3]}),this.top.attr({d:b[1],zIndex:b[4]}),this.side.attr({d:b[2],zIndex:b[5]});else return a.SVGElement.prototype.attr.call(this,b);return this};c.animate=function(b,c,a){d(b.x)&&d(b.y)?(b=this.renderer.cuboidPath(b),this.front.attr({zIndex:b[3]}).animate({d:b[0]},c,a),this.top.attr({zIndex:b[4]}).animate({d:b[1]},
c,a),this.side.attr({zIndex:b[5]}).animate({d:b[2]},c,a),this.attr({zIndex:-b[6]})):b.opacity?(this.front.animate(b,c,a),this.top.animate(b,c,a),this.side.animate(b,c,a)):B.prototype.animate.call(this,b,c,a);return this};c.destroy=function(){this.front.destroy();this.top.destroy();this.side.destroy();return h.call(this)};c.attr({zIndex:-b[6]});return c};H.prototype.cuboidPath=function(b){function c(b){return q[b]}var a=b.x,h=b.y,d=b.z,e=b.height,D=b.width,f=b.depth,q=[{x:a,y:h,z:d},{x:a+D,y:h,z:d},
{x:a+D,y:h+e,z:d},{x:a,y:h+e,z:d},{x:a,y:h+e,z:d+f},{x:a+D,y:h+e,z:d+f},{x:a+D,y:h,z:d+f},{x:a,y:h,z:d+f}],q=z(q,g[this.chartIndex],b.insidePlotArea),d=function(b,a){var h=[];b=w(b,c);a=w(a,c);0>r(b)?h=b:0>r(a)&&(h=a);return h};b=d([3,2,1,0],[7,6,5,4]);a=[4,5,2,3];h=d([1,6,7,0],a);d=d([1,2,5,6],[0,7,4,3]);return[this.toLinePath(b,!0),this.toLinePath(h,!0),this.toLinePath(d,!0),k(b),k(h),k(d),9E9*k(w(a,c))]};a.SVGRenderer.prototype.arc3d=function(a){function d(b){var a=!1,c={},d;for(d in b)-1!==h(d,
p)&&(c[d]=b[d],delete b[d],a=!0);return a?c:!1}var l=this.g(),x=l.renderer,p="x y r innerR start end".split(" ");a=y(a);a.alpha*=e;a.beta*=e;l.top=x.path();l.side1=x.path();l.side2=x.path();l.inn=x.path();l.out=x.path();l.onAdd=function(){var b=l.parentGroup,a=l.attr("class");l.top.add(l);c(["out","inn","side1","side2"],function(c){l[c].addClass(a+" highcharts-3d-side").add(b)})};l.setPaths=function(b){var a=l.renderer.arc3dPath(b),c=100*a.zTop;l.attribs=b;l.top.attr({d:a.top,zIndex:a.zTop});l.inn.attr({d:a.inn,
zIndex:a.zInn});l.out.attr({d:a.out,zIndex:a.zOut});l.side1.attr({d:a.side1,zIndex:a.zSide1});l.side2.attr({d:a.side2,zIndex:a.zSide2});l.zIndex=c;l.attr({zIndex:c});b.center&&(l.top.setRadialReference(b.center),delete b.center)};l.setPaths(a);l.fillSetter=function(b){var a=q(b).brighten(-.1).get();this.fill=b;this.side1.attr({fill:a});this.side2.attr({fill:a});this.inn.attr({fill:a});this.out.attr({fill:a});this.top.attr({fill:b});return this};c(["opacity","translateX","translateY","visibility"],
function(b){l[b+"Setter"]=function(b,a){l[a]=b;c(["out","inn","side1","side2","top"],function(c){l[c].attr(a,b)})}});C(l,"attr",function(a,c){var h;"object"===typeof c&&(h=d(c))&&(b(l.attribs,h),l.setPaths(l.attribs));return a.apply(this,[].slice.call(arguments,1))});C(l,"animate",function(b,a,c,h){var l,e=this.attribs,q;delete a.center;delete a.z;delete a.depth;delete a.alpha;delete a.beta;q=f(G(c,this.renderer.globalAnimation));q.duration&&(a=y(a),l=d(a),a.dummy=1,l&&(q.step=function(b,a){function c(b){return e[b]+
(G(l[b],e[b])-e[b])*a.pos}"dummy"===a.prop&&a.elem.setPaths(y(e,{x:c("x"),y:c("y"),r:c("r"),innerR:c("innerR"),start:c("start"),end:c("end")}))}),c=q);return b.call(this,a,c,h)});l.destroy=function(){this.top.destroy();this.out.destroy();this.inn.destroy();this.side1.destroy();this.side2.destroy();B.prototype.destroy.call(this)};l.hide=function(){this.top.hide();this.out.hide();this.inn.hide();this.side1.hide();this.side2.hide()};l.show=function(){this.top.show();this.out.show();this.inn.show();this.side1.show();
this.side2.show()};return l};H.prototype.arc3dPath=function(b){function a(b){b%=2*Math.PI;b>Math.PI&&(b=2*Math.PI-b);return b}var c=b.x,h=b.y,d=b.start,e=b.end-.00001,f=b.r,q=b.innerR,w=b.depth,g=b.alpha,k=b.beta,y=Math.cos(d),r=Math.sin(d);b=Math.cos(e);var z=Math.sin(e),v=f*Math.cos(k),f=f*Math.cos(g),t=q*Math.cos(k),C=q*Math.cos(g),q=w*Math.sin(k),A=w*Math.sin(g),w=["M",c+v*y,h+f*r],w=w.concat(n(c,h,v,f,d,e,0,0)),w=w.concat(["L",c+t*b,h+C*z]),w=w.concat(n(c,h,t,C,e,d,0,0)),w=w.concat(["Z"]),G=
0<k?Math.PI/2:0,k=0<g?0:Math.PI/2,G=d>-G?d:e>-G?-G:d,E=e<u-k?e:d<u-k?u-k:e,B=2*u-k,g=["M",c+v*m(G),h+f*p(G)],g=g.concat(n(c,h,v,f,G,E,0,0));e>B&&d<B?(g=g.concat(["L",c+v*m(E)+q,h+f*p(E)+A]),g=g.concat(n(c,h,v,f,E,B,q,A)),g=g.concat(["L",c+v*m(B),h+f*p(B)]),g=g.concat(n(c,h,v,f,B,e,0,0)),g=g.concat(["L",c+v*m(e)+q,h+f*p(e)+A]),g=g.concat(n(c,h,v,f,e,B,q,A)),g=g.concat(["L",c+v*m(B),h+f*p(B)]),g=g.concat(n(c,h,v,f,B,E,0,0))):e>u-k&&d<u-k&&(g=g.concat(["L",c+v*Math.cos(E)+q,h+f*Math.sin(E)+A]),g=g.concat(n(c,
h,v,f,E,e,q,A)),g=g.concat(["L",c+v*Math.cos(e),h+f*Math.sin(e)]),g=g.concat(n(c,h,v,f,e,E,0,0)));g=g.concat(["L",c+v*Math.cos(E)+q,h+f*Math.sin(E)+A]);g=g.concat(n(c,h,v,f,E,G,q,A));g=g.concat(["Z"]);k=["M",c+t*y,h+C*r];k=k.concat(n(c,h,t,C,d,e,0,0));k=k.concat(["L",c+t*Math.cos(e)+q,h+C*Math.sin(e)+A]);k=k.concat(n(c,h,t,C,e,d,q,A));k=k.concat(["Z"]);y=["M",c+v*y,h+f*r,"L",c+v*y+q,h+f*r+A,"L",c+t*y+q,h+C*r+A,"L",c+t*y,h+C*r,"Z"];c=["M",c+v*b,h+f*z,"L",c+v*b+q,h+f*z+A,"L",c+t*b+q,h+C*z+A,"L",c+t*
b,h+C*z,"Z"];z=Math.atan2(A,-q);h=Math.abs(e+z);b=Math.abs(d+z);d=Math.abs((d+e)/2+z);h=a(h);b=a(b);d=a(d);d*=1E5;e=1E5*b;h*=1E5;return{top:w,zTop:1E5*Math.PI+1,out:g,zOut:Math.max(d,e,h),inn:k,zInn:Math.max(d,e,h),side1:y,zSide1:.99*h,side2:c,zSide2:.99*e}}})(F);(function(a){function r(a,d){var e=a.plotLeft,c=a.plotWidth+e,b=a.plotTop,h=a.plotHeight+b,f=e+a.plotWidth/2,g=b+a.plotHeight/2,q=Number.MAX_VALUE,k=-Number.MAX_VALUE,p=Number.MAX_VALUE,m=-Number.MAX_VALUE,r,t=1;r=[{x:e,y:b,z:0},{x:e,y:b,
z:d}];n([0,1],function(b){r.push({x:c,y:r[b].y,z:r[b].z})});n([0,1,2,3],function(b){r.push({x:r[b].x,y:h,z:r[b].z})});r=u(r,a,!1);n(r,function(b){q=Math.min(q,b.x);k=Math.max(k,b.x);p=Math.min(p,b.y);m=Math.max(m,b.y)});e>q&&(t=Math.min(t,1-Math.abs((e+f)/(q+f))%1));c<k&&(t=Math.min(t,(c-f)/(k-f)));b>p&&(t=0>p?Math.min(t,(b+g)/(-p+b+g)):Math.min(t,1-(b+g)/(p+g)%1));h<m&&(t=Math.min(t,Math.abs((h-g)/(m-g))));return t}var k=a.Chart,n=a.each,m=a.merge,u=a.perspective,p=a.pick,f=a.wrap;k.prototype.is3d=
function(){return this.options.chart.options3d&&this.options.chart.options3d.enabled};k.prototype.propsRequireDirtyBox.push("chart.options3d");k.prototype.propsRequireUpdateSeries.push("chart.options3d");a.wrap(a.Chart.prototype,"isInsidePlot",function(a){return this.is3d()||a.apply(this,[].slice.call(arguments,1))});var g=a.getOptions();m(!0,g,{chart:{options3d:{enabled:!1,alpha:0,beta:0,depth:100,fitToPlot:!0,viewDistance:25,frame:{bottom:{size:1},side:{size:1},back:{size:1}}}}});f(k.prototype,
"setClassName",function(a){a.apply(this,[].slice.call(arguments,1));this.is3d()&&(this.container.className+=" highcharts-3d-chart")});a.wrap(a.Chart.prototype,"setChartSize",function(a){var d=this.options.chart.options3d;a.apply(this,[].slice.call(arguments,1));if(this.is3d()){var e=this.inverted,c=this.clipBox,b=this.margin;c[e?"y":"x"]=-(b[3]||0);c[e?"x":"y"]=-(b[0]||0);c[e?"height":"width"]=this.chartWidth+(b[3]||0)+(b[1]||0);c[e?"width":"height"]=this.chartHeight+(b[0]||0)+(b[2]||0);this.scale3d=
1;!0===d.fitToPlot&&(this.scale3d=r(this,d.depth))}});f(k.prototype,"redraw",function(a){this.is3d()&&(this.isDirtyBox=!0);a.apply(this,[].slice.call(arguments,1))});f(k.prototype,"renderSeries",function(a){var d=this.series.length;if(this.is3d())for(;d--;)a=this.series[d],a.translate(),a.render();else a.call(this)});k.prototype.retrieveStacks=function(a){var d=this.series,e={},c,b=1;n(this.series,function(h){c=p(h.options.stack,a?0:d.length-1-h.index);e[c]?e[c].series.push(h):(e[c]={series:[h],position:b},
b++)});e.totalStacks=b+1;return e}})(F);(function(a){var r,k=a.Axis,n=a.Chart,m=a.each,u=a.extend,p=a.merge,f=a.perspective,g=a.pick,q=a.splat,d=a.Tick,e=a.wrap;e(k.prototype,"setOptions",function(a,b){a.call(this,b);this.chart.is3d()&&(a=this.options,a.tickWidth=g(a.tickWidth,0),a.gridLineWidth=g(a.gridLineWidth,1))});e(k.prototype,"render",function(a){a.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var b=this.chart,c=b.renderer,d=b.options.chart.options3d,e=d.frame,f=e.bottom,g=e.back,
e=e.side,k=d.depth,q=this.height,p=this.width,m=this.left,n=this.top;this.isZAxis||(this.horiz?(g={x:m,y:n+(b.xAxis[0].opposite?-f.size:q),z:0,width:p,height:f.size,depth:k,insidePlotArea:!1},this.bottomFrame?this.bottomFrame.animate(g):(this.bottomFrame=c.cuboid(g).attr({"class":"highcharts-3d-frame highcharts-3d-frame-bottom",zIndex:b.yAxis[0].reversed&&0<d.alpha?4:-1}).add(),this.bottomFrame.attr({fill:f.color||"none",stroke:f.color||"none"}))):(d={x:m+(b.yAxis[0].opposite?0:-e.size),y:n+(b.xAxis[0].opposite?
-f.size:0),z:k,width:p+e.size,height:q+f.size,depth:g.size,insidePlotArea:!1},this.backFrame?this.backFrame.animate(d):(this.backFrame=c.cuboid(d).attr({"class":"highcharts-3d-frame highcharts-3d-frame-back",zIndex:-3}).add(),this.backFrame.attr({fill:g.color||"none",stroke:g.color||"none"})),b={x:m+(b.yAxis[0].opposite?p:-e.size),y:n+(b.xAxis[0].opposite?-f.size:0),z:0,width:e.size,height:q+f.size,depth:k,insidePlotArea:!1},this.sideFrame?this.sideFrame.animate(b):(this.sideFrame=c.cuboid(b).attr({"class":"highcharts-3d-frame highcharts-3d-frame-side",
zIndex:-2}).add(),this.sideFrame.attr({fill:e.color||"none",stroke:e.color||"none"}))))}});e(k.prototype,"getPlotLinePath",function(a){var b=a.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d()||null===b)return b;var c=this.chart,d=c.options.chart.options3d,c=this.isZAxis?c.plotWidth:d.depth,d=this.opposite;this.horiz&&(d=!d);b=[this.swapZ({x:b[1],y:b[2],z:d?c:0}),this.swapZ({x:b[1],y:b[2],z:c}),this.swapZ({x:b[4],y:b[5],z:c}),this.swapZ({x:b[4],y:b[5],z:d?0:c})];b=f(b,this.chart,!1);return b=
this.chart.renderer.toLinePath(b,!1)});e(k.prototype,"getLinePath",function(a){return this.chart.is3d()?[]:a.apply(this,[].slice.call(arguments,1))});e(k.prototype,"getPlotBandPath",function(a){if(!this.chart.is3d())return a.apply(this,[].slice.call(arguments,1));var b=arguments,c=b[1],b=this.getPlotLinePath(b[2]);(c=this.getPlotLinePath(c))&&b?c.push("L",b[10],b[11],"L",b[7],b[8],"L",b[4],b[5],"L",b[1],b[2]):c=null;return c});e(d.prototype,"getMarkPath",function(a){var b=a.apply(this,[].slice.call(arguments,
1));if(!this.axis.chart.is3d())return b;b=[this.axis.swapZ({x:b[1],y:b[2],z:0}),this.axis.swapZ({x:b[4],y:b[5],z:0})];b=f(b,this.axis.chart,!1);return b=["M",b[0].x,b[0].y,"L",b[1].x,b[1].y]});e(d.prototype,"getLabelPosition",function(a){var b=a.apply(this,[].slice.call(arguments,1));this.axis.chart.is3d()&&(b=f([this.axis.swapZ({x:b.x,y:b.y,z:0})],this.axis.chart,!1)[0]);return b});a.wrap(k.prototype,"getTitlePosition",function(a){var b=this.chart.is3d(),c,d;b&&(d=this.axisTitleMargin,this.axisTitleMargin=
0);c=a.apply(this,[].slice.call(arguments,1));b&&(c=f([this.swapZ({x:c.x,y:c.y,z:0})],this.chart,!1)[0],c[this.horiz?"y":"x"]+=(this.horiz?1:-1)*(this.opposite?-1:1)*d,this.axisTitleMargin=d);return c});e(k.prototype,"drawCrosshair",function(a){var b=arguments;this.chart.is3d()&&b[2]&&(b[2]={plotX:b[2].plotXold||b[2].plotX,plotY:b[2].plotYold||b[2].plotY});a.apply(this,[].slice.call(b,1))});e(k.prototype,"destroy",function(a){m(["backFrame","bottomFrame","sideFrame"],function(b){this[b]&&(this[b]=
this[b].destroy())},this);a.apply(this,[].slice.call(arguments,1))});k.prototype.swapZ=function(a,b){if(this.isZAxis){b=b?0:this.chart.plotLeft;var c=this.chart;return{x:b+(c.yAxis[0].opposite?a.z:c.xAxis[0].width-a.z),y:a.y,z:a.x-b}}return a};r=a.ZAxis=function(){this.isZAxis=!0;this.init.apply(this,arguments)};u(r.prototype,k.prototype);u(r.prototype,{setOptions:function(a){a=p({offset:0,lineWidth:0},a);k.prototype.setOptions.call(this,a);this.coll="zAxis"},setAxisSize:function(){k.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 a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.ignoreMinPadding=a.ignoreMaxPadding=null;a.buildStacks&&a.buildStacks();m(a.series,function(c){if(c.visible||!b.options.chart.ignoreHiddenSeries)a.hasVisibleSeries=!0,c=c.zData,c.length&&(a.dataMin=Math.min(g(a.dataMin,c[0]),Math.min.apply(null,c)),a.dataMax=Math.max(g(a.dataMax,c[0]),Math.max.apply(null,
c)))})}});e(n.prototype,"getAxes",function(a){var b=this,c=this.options,c=c.zAxis=q(c.zAxis||{});a.call(this);b.is3d()&&(this.zAxis=[],m(c,function(a,c){a.index=c;a.isX=!0;(new r(b,a)).setScale()}))})})(F);(function(a){function r(a){var d=a.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&(d.stroke=this.options.edgeColor||d.fill,d["stroke-width"]=u(this.options.edgeWidth,1));return d}function k(a){if(this.chart.is3d()){var d=this.chart.options.plotOptions.column.grouping;void 0===d||d||void 0===
this.group.zIndex||this.zIndexSet||(this.group.attr({zIndex:10*this.group.zIndex}),this.zIndexSet=!0)}a.apply(this,[].slice.call(arguments,1))}var n=a.each,m=a.perspective,u=a.pick,p=a.Series,f=a.seriesTypes,g=a.svg;a=a.wrap;a(f.column.prototype,"translate",function(a){a.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var d=this.chart,e=this.options,c=e.depth||25,b=(e.stacking?e.stack||0:this._i)*(c+(e.groupZPadding||1));!1!==e.grouping&&(b=0);b+=e.groupZPadding||1;n(this.data,function(a){if(null!==
a.y){var e=a.shapeArgs,h=a.tooltipPos;a.shapeType="cuboid";e.z=b;e.depth=c;e.insidePlotArea=!0;h=m([{x:h[0],y:h[1],z:b}],d,!0)[0];a.tooltipPos=[h.x,h.y]}});this.z=b}});a(f.column.prototype,"animate",function(a){if(this.chart.is3d()){var d=arguments[1],e=this.yAxis,c=this,b=this.yAxis.reversed;g&&(d?n(c.data,function(a){null!==a.y&&(a.height=a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,b||(a.shapeArgs.y=a.stackY?a.plotY+e.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)))}):
(n(c.data,function(a){null!==a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,c.options.animation))}),this.drawDataLabels(),c.animate=null))}else a.apply(this,[].slice.call(arguments,1))});a(f.column.prototype,"init",function(a){a.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var d=this.options,e=d.grouping,c=d.stacking,b=u(this.yAxis.options.reversedStacks,!0),f=0;if(void 0===e||e){e=this.chart.retrieveStacks(c);f=d.stack||0;for(c=0;c<
e[f].series.length&&e[f].series[c]!==this;c++);f=10*(e.totalStacks-e[f].position)+(b?c:-c);this.xAxis.reversed||(f=10*e.totalStacks-f)}d.zIndex=f}});a(f.column.prototype,"pointAttribs",r);f.columnrange&&a(f.columnrange.prototype,"pointAttribs",r);a(p.prototype,"alignDataLabel",function(a){if(this.chart.is3d()&&("column"===this.type||"columnrange"===this.type)){var d=arguments[4],e={x:d.x,y:d.y,z:this.z},e=m([e],this.chart,!0)[0];d.x=e.x;d.y=e.y}a.apply(this,[].slice.call(arguments,1))});f.columnrange&&
a(f.columnrange.prototype,"drawPoints",k);a(f.column.prototype,"drawPoints",k)})(F);(function(a){var r=a.deg2rad,k=a.each,n=a.pick,m=a.seriesTypes,u=a.svg;a=a.wrap;a(m.pie.prototype,"translate",function(a){a.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var f=this,g=f.options,p=g.depth||0,d=f.chart.options.chart.options3d,e=d.alpha,c=d.beta,b=g.stacking?(g.stack||0)*p:f._i*p,b=b+p/2;!1!==g.grouping&&(b=0);k(f.data,function(a){var d=a.shapeArgs;a.shapeType="arc3d";d.z=b;d.depth=.75*
p;d.alpha=e;d.beta=c;d.center=f.center;d=(d.end+d.start)/2;a.slicedTranslation={translateX:Math.round(Math.cos(d)*g.slicedOffset*Math.cos(e*r)),translateY:Math.round(Math.sin(d)*g.slicedOffset*Math.cos(e*r))}})}});a(m.pie.prototype.pointClass.prototype,"haloPath",function(a){var f=arguments;return this.series.chart.is3d()?[]:a.call(this,f[1])});a(m.pie.prototype,"pointAttribs",function(a,f,g){a=a.call(this,f,g);g=this.options;this.chart.is3d()&&(a.stroke=g.edgeColor||f.color||this.color,a["stroke-width"]=
n(g.edgeWidth,1));return a});a(m.pie.prototype,"drawPoints",function(a){a.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&k(this.points,function(a){var f=a.graphic;if(f)f[a.y&&a.visible?"show":"hide"]()})});a(m.pie.prototype,"drawDataLabels",function(a){if(this.chart.is3d()){var f=this.chart.options.chart.options3d;k(this.data,function(a){var g=a.shapeArgs,d=g.r,e=(g.start+g.end)/2,c=a.labelPos,b=-d*(1-Math.cos((g.alpha||f.alpha)*r))*Math.sin(e),h=d*(Math.cos((g.beta||f.beta)*r)-1)*Math.cos(e);
k([0,2,4],function(a){c[a]+=h;c[a+1]+=b})})}a.apply(this,[].slice.call(arguments,1))});a(m.pie.prototype,"addPoint",function(a){a.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&this.update(this.userOptions,!0)});a(m.pie.prototype,"animate",function(a){if(this.chart.is3d()){var f=arguments[1],g=this.options.animation,k=this.center,d=this.group,e=this.markerGroup;u&&(!0===g&&(g={}),f?(d.oldtranslateX=d.translateX,d.oldtranslateY=d.translateY,f={translateX:k[0],translateY:k[1],scaleX:.001,
scaleY:.001},d.attr(f),e&&(e.attrSetters=d.attrSetters,e.attr(f))):(f={translateX:d.oldtranslateX,translateY:d.oldtranslateY,scaleX:1,scaleY:1},d.animate(f,g),e&&e.animate(f,g),this.animate=null))}else a.apply(this,[].slice.call(arguments,1))})})(F);(function(a){var r=a.perspective,k=a.pick,n=a.Point,m=a.seriesTypes,u=a.wrap;u(m.scatter.prototype,"translate",function(a){a.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var f=this.chart,g=k(this.zAxis,f.options.zAxis[0]),m=[],d,e,c;for(c=
0;c<this.data.length;c++)d=this.data[c],e=g.isLog&&g.val2lin?g.val2lin(d.z):d.z,d.plotZ=g.translate(e),d.isInside=d.isInside?e>=g.min&&e<=g.max:!1,m.push({x:d.plotX,y:d.plotY,z:d.plotZ});f=r(m,f,!0);for(c=0;c<this.data.length;c++)d=this.data[c],g=f[c],d.plotXold=d.plotX,d.plotYold=d.plotY,d.plotZold=d.plotZ,d.plotX=g.x,d.plotY=g.y,d.plotZ=g.z}});u(m.scatter.prototype,"init",function(a,f,g){f.is3d()&&(this.axisTypes=["xAxis","yAxis","zAxis"],this.pointArrayMap=["x","y","z"],this.parallelArrays=["x",
"y","z"],this.directTouch=!0);a=a.apply(this,[f,g]);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");return a});u(m.scatter.prototype,"pointAttribs",function(k,f){var g=k.apply(this,
[].slice.call(arguments,1));this.chart.is3d()&&f&&(g.zIndex=a.pointCameraDistance(f,this.chart));return g});u(n.prototype,"applyOptions",function(a){var f=a.apply(this,[].slice.call(arguments,1));this.series.chart.is3d()&&void 0===f.z&&(f.z=0);return f})})(F);(function(a){var r=a.Axis,k=a.SVGRenderer,n=a.VMLRenderer;n&&(a.setOptions({animate:!1}),n.prototype.cuboid=k.prototype.cuboid,n.prototype.cuboidPath=k.prototype.cuboidPath,n.prototype.toLinePath=k.prototype.toLinePath,n.prototype.createElement3D=
k.prototype.createElement3D,n.prototype.arc3d=function(a){a=k.prototype.arc3d.call(this,a);a.css({zIndex:a.zIndex});return a},a.VMLRenderer.prototype.arc3dPath=a.SVGRenderer.prototype.arc3dPath,a.wrap(r.prototype,"render",function(a){a.apply(this,[].slice.call(arguments,1));this.sideFrame&&(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}))}))})(F)});

60
Teknik/Scripts/Highcharts/highcharts-more.js

@ -0,0 +1,60 @@ @@ -0,0 +1,60 @@
/*
Highcharts JS v5.0.7 (2017-01-17)
(c) 2009-2016 Torstein Honsi
License: www.highcharts.com/license
*/
(function(u){"object"===typeof module&&module.exports?module.exports=u:u(Highcharts)})(function(u){(function(a){function p(a,b,d){this.init(a,b,d)}var v=a.each,w=a.extend,l=a.merge,q=a.splat;w(p.prototype,{init:function(a,b,d){var k=this,m=k.defaultOptions;k.chart=b;k.options=a=l(m,b.angular?{background:{}}:void 0,a);(a=a.background)&&v([].concat(q(a)).reverse(),function(b){var c,m=d.userOptions;c=l(k.defaultBackgroundOptions,b);b.backgroundColor&&(c.backgroundColor=b.backgroundColor);c.color=c.backgroundColor;
d.options.plotBands.unshift(c);m.plotBands=m.plotBands||[];m.plotBands!==d.options.plotBands&&m.plotBands.unshift(c)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{className:"highcharts-pane",shape:"circle",borderWidth:1,borderColor:"#cccccc",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#ffffff"],[1,"#e6e6e6"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}});a.Pane=p})(u);(function(a){var p=a.CenteredSeriesMixin,
v=a.each,w=a.extend,l=a.map,q=a.merge,f=a.noop,b=a.Pane,d=a.pick,k=a.pInt,m=a.splat,n=a.wrap,c,g,h=a.Axis.prototype;a=a.Tick.prototype;c={getOffset:f,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:f,setCategories:f,setTitle:f};g={defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},
defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,distance:15,x:0,y:null},maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(b){b=this.options=q(this.defaultOptions,this.defaultRadialOptions,b);b.plotBands||(b.plotBands=[])},getOffset:function(){h.getOffset.call(this);this.chart.axisOffset[this.side]=0;this.center=this.pane.center=
p.getCenter.call(this.pane)},getLinePath:function(b,e){b=this.center;var c=this.chart,k=d(e,b[2]/2-this.offset);this.isCircular||void 0!==e?e=this.chart.renderer.symbols.arc(this.left+b[0],this.top+b[1],k,k,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0}):(e=this.postTranslate(this.angleRad,k),e=["M",b[0]+c.plotLeft,b[1]+c.plotTop,"L",e.x,e.y]);return e},setAxisTranslation:function(){h.setAxisTranslation.call(this);this.center&&(this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/
(this.max-this.min||1):this.center[2]/2/(this.max-this.min||1),this.minPixelPadding=this.isXAxis?this.transA*this.minPointOffset:0)},beforeSetTickPositions:function(){if(this.autoConnect=this.isCircular&&void 0===d(this.userMax,this.options.max)&&this.endAngleRad-this.startAngleRad===2*Math.PI)this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0},setAxisSize:function(){h.setAxisSize.call(this);this.isRadial&&(this.center=this.pane.center=p.getCenter.call(this.pane),this.isCircular&&
(this.sector=this.endAngleRad-this.startAngleRad),this.len=this.width=this.height=this.center[2]*d(this.sector,1)/2)},getPosition:function(b,e){return this.postTranslate(this.isCircular?this.translate(b):this.angleRad,d(this.isCircular?e:this.translate(b),this.center[2]/2)-this.offset)},postTranslate:function(b,e){var d=this.chart,c=this.center;b=this.startAngleRad+b;return{x:d.plotLeft+c[0]+Math.cos(b)*e,y:d.plotTop+c[1]+Math.sin(b)*e}},getPlotBandPath:function(b,e,c){var m=this.center,t=this.startAngleRad,
h=m[2]/2,a=[d(c.outerRadius,"100%"),c.innerRadius,d(c.thickness,10)],r=Math.min(this.offset,0),g=/%$/,n,f=this.isCircular;"polygon"===this.options.gridLineInterpolation?m=this.getPlotLinePath(b).concat(this.getPlotLinePath(e,!0)):(b=Math.max(b,this.min),e=Math.min(e,this.max),f||(a[0]=this.translate(b),a[1]=this.translate(e)),a=l(a,function(b){g.test(b)&&(b=k(b,10)*h/100);return b}),"circle"!==c.shape&&f?(b=t+this.translate(b),e=t+this.translate(e)):(b=-Math.PI/2,e=1.5*Math.PI,n=!0),a[0]-=r,a[2]-=
r,m=this.chart.renderer.symbols.arc(this.left+m[0],this.top+m[1],a[0],a[0],{start:Math.min(b,e),end:Math.max(b,e),innerR:d(a[1],a[0]-a[2]),open:n}));return m},getPlotLinePath:function(b,e){var c=this,d=c.center,k=c.chart,m=c.getPosition(b),a,h,g;c.isCircular?g=["M",d[0]+k.plotLeft,d[1]+k.plotTop,"L",m.x,m.y]:"circle"===c.options.gridLineInterpolation?(b=c.translate(b))&&(g=c.getLinePath(0,b)):(v(k.xAxis,function(b){b.pane===c.pane&&(a=b)}),g=[],b=c.translate(b),d=a.tickPositions,a.autoConnect&&(d=
d.concat([d[0]])),e&&(d=[].concat(d).reverse()),v(d,function(c,d){h=a.getPosition(c,b);g.push(d?"L":"M",h.x,h.y)}));return g},getTitlePosition:function(){var b=this.center,c=this.chart,d=this.options.title;return{x:c.plotLeft+b[0]+(d.x||0),y:c.plotTop+b[1]-{high:.5,middle:.25,low:0}[d.align]*b[2]+(d.y||0)}}};n(h,"init",function(k,e,a){var h=e.angular,n=e.polar,t=a.isX,r=h&&t,f,x=e.options,l=a.pane||0;if(h){if(w(this,r?c:g),f=!t)this.defaultRadialOptions=this.defaultRadialGaugeOptions}else n&&(w(this,
g),this.defaultRadialOptions=(f=t)?this.defaultRadialXOptions:q(this.defaultYAxisOptions,this.defaultRadialYOptions));h||n?(this.isRadial=!0,e.inverted=!1,x.chart.zoomType=null):this.isRadial=!1;k.call(this,e,a);r||!h&&!n||(k=this.options,e.panes||(e.panes=[]),this.pane=e=e.panes[l]=e.panes[l]||new b(m(x.pane)[l],e,this),e=e.options,this.angleRad=(k.angle||0)*Math.PI/180,this.startAngleRad=(e.startAngle-90)*Math.PI/180,this.endAngleRad=(d(e.endAngle,e.startAngle+360)-90)*Math.PI/180,this.offset=k.offset||
0,this.isCircular=f)});n(h,"autoLabelAlign",function(b){if(!this.isRadial)return b.apply(this,[].slice.call(arguments,1))});n(a,"getPosition",function(b,c,d,k,a){var e=this.axis;return e.getPosition?e.getPosition(d):b.call(this,c,d,k,a)});n(a,"getLabelPosition",function(b,c,k,a,m,h,g,n,f){var e=this.axis,t=h.y,r=20,z=h.align,x=(e.translate(this.pos)+e.startAngleRad+Math.PI/2)/Math.PI*180%360;e.isRadial?(b=e.getPosition(this.pos,e.center[2]/2+d(h.distance,-25)),"auto"===h.rotation?a.attr({rotation:x}):
null===t&&(t=e.chart.renderer.fontMetrics(a.styles.fontSize).b-a.getBBox().height/2),null===z&&(e.isCircular?(this.label.getBBox().width>e.len*e.tickInterval/(e.max-e.min)&&(r=0),z=x>r&&x<180-r?"left":x>180+r&&x<360-r?"right":"center"):z="center",a.attr({align:z})),b.x+=h.x,b.y+=t):b=b.call(this,c,k,a,m,h,g,n,f);return b});n(a,"getMarkPath",function(b,c,d,k,a,m,h){var e=this.axis;e.isRadial?(b=e.getPosition(this.pos,e.center[2]/2+k),c=["M",c,d,"L",b.x,b.y]):c=b.call(this,c,d,k,a,m,h);return c})})(u);
(function(a){var p=a.each,v=a.noop,w=a.pick,l=a.Series,q=a.seriesType,f=a.seriesTypes;q("arearange","area",{lineWidth:1,marker:null,threshold:null,tooltip:{pointFormat:'\x3cspan style\x3d"color:{series.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.low}\x3c/b\x3e - \x3cb\x3e{point.high}\x3c/b\x3e\x3cbr/\x3e'},trackByArea:!0,dataLabels:{align:null,verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0},states:{hover:{halo:!1}}},{pointArrayMap:["low","high"],dataLabelCollections:["dataLabel",
"dataLabelUpper"],toYData:function(b){return[b.low,b.high]},pointValKey:"low",deferTranslatePolar:!0,highToXY:function(b){var d=this.chart,k=this.xAxis.postTranslate(b.rectPlotX,this.yAxis.len-b.plotHigh);b.plotHighX=k.x-d.plotLeft;b.plotHigh=k.y-d.plotTop},translate:function(){var b=this,d=b.yAxis,k=!!b.modifyValue;f.area.prototype.translate.apply(b);p(b.points,function(a){var m=a.low,c=a.high,g=a.plotY;null===c||null===m?a.isNull=!0:(a.plotLow=g,a.plotHigh=d.translate(k?b.modifyValue(c,a):c,0,1,
0,1),k&&(a.yBottom=a.plotHigh))});this.chart.polar&&p(this.points,function(d){b.highToXY(d)})},getGraphPath:function(b){var d=[],k=[],a,n=f.area.prototype.getGraphPath,c,g,h;h=this.options;var r=this.chart.polar&&!1!==h.connectEnds,e=h.step;b=b||this.points;for(a=b.length;a--;)c=b[a],c.isNull||r||b[a+1]&&!b[a+1].isNull||k.push({plotX:c.plotX,plotY:c.plotY,doCurve:!1}),g={polarPlotY:c.polarPlotY,rectPlotX:c.rectPlotX,yBottom:c.yBottom,plotX:w(c.plotHighX,c.plotX),plotY:c.plotHigh,isNull:c.isNull},
k.push(g),d.push(g),c.isNull||r||b[a-1]&&!b[a-1].isNull||k.push({plotX:c.plotX,plotY:c.plotY,doCurve:!1});b=n.call(this,b);e&&(!0===e&&(e="left"),h.step={left:"right",center:"center",right:"left"}[e]);d=n.call(this,d);k=n.call(this,k);h.step=e;h=[].concat(b,d);this.chart.polar||"M"!==k[0]||(k[0]="L");this.graphPath=h;this.areaPath=this.areaPath.concat(b,k);h.isArea=!0;h.xMap=b.xMap;this.areaPath.xMap=b.xMap;return h},drawDataLabels:function(){var b=this.data,d=b.length,a,m=[],n=l.prototype,c=this.options.dataLabels,
g=c.align,h=c.verticalAlign,r=c.inside,e,t,f=this.chart.inverted;if(c.enabled||this._hasPointLabels){for(a=d;a--;)if(e=b[a])t=r?e.plotHigh<e.plotLow:e.plotHigh>e.plotLow,e.y=e.high,e._plotY=e.plotY,e.plotY=e.plotHigh,m[a]=e.dataLabel,e.dataLabel=e.dataLabelUpper,e.below=t,f?g||(c.align=t?"right":"left"):h||(c.verticalAlign=t?"top":"bottom"),c.x=c.xHigh,c.y=c.yHigh;n.drawDataLabels&&n.drawDataLabels.apply(this,arguments);for(a=d;a--;)if(e=b[a])t=r?e.plotHigh<e.plotLow:e.plotHigh>e.plotLow,e.dataLabelUpper=
e.dataLabel,e.dataLabel=m[a],e.y=e.low,e.plotY=e._plotY,e.below=!t,f?g||(c.align=t?"left":"right"):h||(c.verticalAlign=t?"bottom":"top"),c.x=c.xLow,c.y=c.yLow;n.drawDataLabels&&n.drawDataLabels.apply(this,arguments)}c.align=g;c.verticalAlign=h},alignDataLabel:function(){f.column.prototype.alignDataLabel.apply(this,arguments)},setStackedPoints:v,getSymbol:v,drawPoints:v})})(u);(function(a){var p=a.seriesType;p("areasplinerange","arearange",null,{getPointSpline:a.seriesTypes.spline.prototype.getPointSpline})})(u);
(function(a){var p=a.defaultPlotOptions,v=a.each,w=a.merge,l=a.noop,q=a.pick,f=a.seriesType,b=a.seriesTypes.column.prototype;f("columnrange","arearange",w(p.column,p.arearange,{lineWidth:1,pointRange:null}),{translate:function(){var d=this,a=d.yAxis,m=d.xAxis,n=m.startAngleRad,c,g=d.chart,h=d.xAxis.isRadial,r;b.translate.apply(d);v(d.points,function(b){var e=b.shapeArgs,k=d.options.minPointLength,f,l;b.plotHigh=r=a.translate(b.high,0,1,0,1);b.plotLow=b.plotY;l=r;f=q(b.rectPlotY,b.plotY)-r;Math.abs(f)<
k?(k-=f,f+=k,l-=k/2):0>f&&(f*=-1,l-=f);h?(c=b.barX+n,b.shapeType="path",b.shapeArgs={d:d.polarArc(l+f,l,c,c+b.pointWidth)}):(e.height=f,e.y=l,b.tooltipPos=g.inverted?[a.len+a.pos-g.plotLeft-l-f/2,m.len+m.pos-g.plotTop-e.x-e.width/2,f]:[m.left-g.plotLeft+e.x+e.width/2,a.pos-g.plotTop+l+f/2,f])})},directTouch:!0,trackerGroups:["group","dataLabelsGroup"],drawGraph:l,crispCol:b.crispCol,drawPoints:b.drawPoints,drawTracker:b.drawTracker,getColumnMetrics:b.getColumnMetrics,animate:function(){return b.animate.apply(this,
arguments)},polarArc:function(){return b.polarArc.apply(this,arguments)},pointAttribs:b.pointAttribs})})(u);(function(a){var p=a.each,v=a.isNumber,w=a.merge,l=a.pick,q=a.pInt,f=a.Series,b=a.seriesType,d=a.TrackerMixin;b("gauge","line",{dataLabels:{enabled:!0,defer:!1,y:15,borderRadius:3,crop:!1,verticalAlign:"top",zIndex:2,borderWidth:1,borderColor:"#cccccc"},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1},{angular:!0,directTouch:!0,drawGraph:a.noop,fixedBox:!0,forceDL:!0,noSharedTooltip:!0,
trackerGroups:["group","dataLabelsGroup"],translate:function(){var b=this.yAxis,a=this.options,d=b.center;this.generatePoints();p(this.points,function(c){var k=w(a.dial,c.dial),h=q(l(k.radius,80))*d[2]/200,m=q(l(k.baseLength,70))*h/100,e=q(l(k.rearLength,10))*h/100,n=k.baseWidth||3,f=k.topWidth||1,p=a.overshoot,y=b.startAngleRad+b.translate(c.y,null,null,null,!0);v(p)?(p=p/180*Math.PI,y=Math.max(b.startAngleRad-p,Math.min(b.endAngleRad+p,y))):!1===a.wrap&&(y=Math.max(b.startAngleRad,Math.min(b.endAngleRad,
y)));y=180*y/Math.PI;c.shapeType="path";c.shapeArgs={d:k.path||["M",-e,-n/2,"L",m,-n/2,h,-f/2,h,f/2,m,n/2,-e,n/2,"z"],translateX:d[0],translateY:d[1],rotation:y};c.plotX=d[0];c.plotY=d[1]})},drawPoints:function(){var b=this,a=b.yAxis.center,d=b.pivot,c=b.options,g=c.pivot,h=b.chart.renderer;p(b.points,function(a){var d=a.graphic,k=a.shapeArgs,g=k.d,m=w(c.dial,a.dial);d?(d.animate(k),k.d=g):(a.graphic=h[a.shapeType](k).attr({rotation:k.rotation,zIndex:1}).addClass("highcharts-dial").add(b.group),a.graphic.attr({stroke:m.borderColor||
"none","stroke-width":m.borderWidth||0,fill:m.backgroundColor||"#000000"}))});d?d.animate({translateX:a[0],translateY:a[1]}):(b.pivot=h.circle(0,0,l(g.radius,5)).attr({zIndex:2}).addClass("highcharts-pivot").translate(a[0],a[1]).add(b.group),b.pivot.attr({"stroke-width":g.borderWidth||0,stroke:g.borderColor||"#cccccc",fill:g.backgroundColor||"#000000"}))},animate:function(b){var a=this;b||(p(a.points,function(b){var d=b.graphic;d&&(d.attr({rotation:180*a.yAxis.startAngleRad/Math.PI}),d.animate({rotation:b.shapeArgs.rotation},
a.options.animation))}),a.animate=null)},render:function(){this.group=this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);f.prototype.render.call(this);this.group.clip(this.chart.clipRect)},setData:function(b,a){f.prototype.setData.call(this,b,!1);this.processData();this.generatePoints();l(a,!0)&&this.chart.redraw()},drawTracker:d&&d.drawTrackerPoint},{setState:function(b){this.state=b}})})(u);(function(a){var p=a.each,v=a.noop,w=a.pick,l=a.seriesType,
q=a.seriesTypes;l("boxplot","column",{threshold:null,tooltip:{pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eMaximum: {point.high}\x3cbr/\x3eUpper quartile: {point.q3}\x3cbr/\x3eMedian: {point.median}\x3cbr/\x3eLower quartile: {point.q1}\x3cbr/\x3eMinimum: {point.low}\x3cbr/\x3e'},whiskerLength:"50%",fillColor:"#ffffff",lineWidth:1,medianWidth:2,states:{hover:{brightness:-.3}},whiskerWidth:2},{pointArrayMap:["low","q1","median",
"q3","high"],toYData:function(a){return[a.low,a.q1,a.median,a.q3,a.high]},pointValKey:"high",pointAttribs:function(a){var b=this.options,d=a&&a.color||this.color;return{fill:a.fillColor||b.fillColor||d,stroke:b.lineColor||d,"stroke-width":b.lineWidth||0}},drawDataLabels:v,translate:function(){var a=this.yAxis,b=this.pointArrayMap;q.column.prototype.translate.apply(this);p(this.points,function(d){p(b,function(b){null!==d[b]&&(d[b+"Plot"]=a.translate(d[b],0,1,0,1))})})},drawPoints:function(){var a=
this,b=a.options,d=a.chart.renderer,k,m,n,c,g,h,r=0,e,t,l,q,y=!1!==a.doQuartiles,v,B=a.options.whiskerLength;p(a.points,function(f){var p=f.graphic,z=p?"animate":"attr",x=f.shapeArgs,u={},D={},H={},I=f.color||a.color;void 0!==f.plotY&&(e=x.width,t=Math.floor(x.x),l=t+e,q=Math.round(e/2),k=Math.floor(y?f.q1Plot:f.lowPlot),m=Math.floor(y?f.q3Plot:f.lowPlot),n=Math.floor(f.highPlot),c=Math.floor(f.lowPlot),p||(f.graphic=p=d.g("point").add(a.group),f.stem=d.path().addClass("highcharts-boxplot-stem").add(p),
B&&(f.whiskers=d.path().addClass("highcharts-boxplot-whisker").add(p)),y&&(f.box=d.path(void 0).addClass("highcharts-boxplot-box").add(p)),f.medianShape=d.path(void 0).addClass("highcharts-boxplot-median").add(p),u.stroke=f.stemColor||b.stemColor||I,u["stroke-width"]=w(f.stemWidth,b.stemWidth,b.lineWidth),u.dashstyle=f.stemDashStyle||b.stemDashStyle,f.stem.attr(u),B&&(D.stroke=f.whiskerColor||b.whiskerColor||I,D["stroke-width"]=w(f.whiskerWidth,b.whiskerWidth,b.lineWidth),f.whiskers.attr(D)),y&&(p=
a.pointAttribs(f),f.box.attr(p)),H.stroke=f.medianColor||b.medianColor||I,H["stroke-width"]=w(f.medianWidth,b.medianWidth,b.lineWidth),f.medianShape.attr(H)),h=f.stem.strokeWidth()%2/2,r=t+q+h,f.stem[z]({d:["M",r,m,"L",r,n,"M",r,k,"L",r,c]}),y&&(h=f.box.strokeWidth()%2/2,k=Math.floor(k)+h,m=Math.floor(m)+h,t+=h,l+=h,f.box[z]({d:["M",t,m,"L",t,k,"L",l,k,"L",l,m,"L",t,m,"z"]})),B&&(h=f.whiskers.strokeWidth()%2/2,n+=h,c+=h,v=/%$/.test(B)?q*parseFloat(B)/100:B/2,f.whiskers[z]({d:["M",r-v,n,"L",r+v,n,
"M",r-v,c,"L",r+v,c]})),g=Math.round(f.medianPlot),h=f.medianShape.strokeWidth()%2/2,g+=h,f.medianShape[z]({d:["M",t,g,"L",l,g]}))})},setStackedPoints:v})})(u);(function(a){var p=a.each,v=a.noop,w=a.seriesType,l=a.seriesTypes;w("errorbar","boxplot",{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.low}\x3c/b\x3e - \x3cb\x3e{point.high}\x3c/b\x3e\x3cbr/\x3e'},whiskerWidth:null},{type:"errorbar",
pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"high",doQuartiles:!1,drawDataLabels:l.arearange?function(){var a=this.pointValKey;l.arearange.prototype.drawDataLabels.call(this);p(this.data,function(f){f.y=f[a]})}:v,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||l.column.prototype.getColumnMetrics.call(this)}})})(u);(function(a){var p=a.correctFloat,v=a.isNumber,w=a.pick,l=a.Point,q=a.Series,f=a.seriesType,b=a.seriesTypes;
f("waterfall","column",{dataLabels:{inside:!0},lineWidth:1,lineColor:"#333333",dashStyle:"dot",borderColor:"#333333",states:{hover:{lineWidthPlus:0}}},{pointValKey:"y",translate:function(){var a=this.options,k=this.yAxis,m,f,c,g,h,r,e,t,l,q=w(a.minPointLength,5),y=a.threshold,v=a.stacking,u=0,x=0,A;b.column.prototype.translate.apply(this);e=t=y;f=this.points;m=0;for(a=f.length;m<a;m++)c=f[m],r=this.processedYData[m],g=c.shapeArgs,h=v&&k.stacks[(this.negStacks&&r<y?"-":"")+this.stackKey],A=this.getStackIndicator(A,
c.x),l=h?h[c.x].points[this.index+","+m+","+A.index]:[0,r],c.isSum?c.y=p(r):c.isIntermediateSum&&(c.y=p(r-t)),h=Math.max(e,e+c.y)+l[0],g.y=k.toPixels(h,!0),c.isSum?(g.y=k.toPixels(l[1],!0),g.height=Math.min(k.toPixels(l[0],!0),k.len)-g.y+u+x):c.isIntermediateSum?(g.y=k.toPixels(l[1],!0),g.height=Math.min(k.toPixels(t,!0),k.len)-g.y+u+x,t=l[1]):(g.height=0<r?k.toPixels(e,!0)-g.y:k.toPixels(e,!0)-k.toPixels(e-r,!0),e+=r),0>g.height&&(g.y+=g.height,g.height*=-1),c.plotY=g.y=Math.round(g.y)-this.borderWidth%
2/2,g.height=Math.max(Math.round(g.height),.001),c.yBottom=g.y+g.height,g.y-=x,g.height<=q&&!c.isNull&&(g.height=q,0>c.y?x-=q:u+=q),g.y-=u,g=c.plotY-x-u+(c.negative&&0<=x?g.height:0),this.chart.inverted?c.tooltipPos[0]=k.len-g:c.tooltipPos[1]=g},processData:function(b){var a=this.yData,d=this.options.data,f,c=a.length,g,h,r,e,t,l;h=g=r=e=this.options.threshold||0;for(l=0;l<c;l++)t=a[l],f=d&&d[l]?d[l]:{},"sum"===t||f.isSum?a[l]=p(h):"intermediateSum"===t||f.isIntermediateSum?a[l]=p(g):(h+=t,g+=t),
r=Math.min(h,r),e=Math.max(h,e);q.prototype.processData.call(this,b);this.dataMin=r;this.dataMax=e},toYData:function(b){return b.isSum?0===b.x?null:"sum":b.isIntermediateSum?0===b.x?null:"intermediateSum":b.y},pointAttribs:function(a,k){var d=this.options.upColor;d&&!a.options.color&&(a.color=0<a.y?d:null);a=b.column.prototype.pointAttribs.call(this,a,k);delete a.dashstyle;return a},getGraphPath:function(){return["M",0,0]},getCrispPath:function(){var b=this.data,a=b.length,f=this.graph.strokeWidth()+
this.borderWidth,f=Math.round(f)%2/2,n=[],c,g,h;for(h=1;h<a;h++)g=b[h].shapeArgs,c=b[h-1].shapeArgs,g=["M",c.x+c.width,c.y+f,"L",g.x,c.y+f],0>b[h-1].y&&(g[2]+=c.height,g[5]+=c.height),n=n.concat(g);return n},drawGraph:function(){q.prototype.drawGraph.call(this);this.graph.attr({d:this.getCrispPath()})},getExtremes:a.noop},{getClassName:function(){var b=l.prototype.getClassName.call(this);this.isSum?b+=" highcharts-sum":this.isIntermediateSum&&(b+=" highcharts-intermediate-sum");return b},isValid:function(){return v(this.y,
!0)||this.isSum||this.isIntermediateSum}})})(u);(function(a){var p=a.Series,v=a.seriesType,u=a.seriesTypes;v("polygon","scatter",{marker:{enabled:!1,states:{hover:{enabled:!1}}},stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:""},trackByArea:!0},{type:"polygon",getGraphPath:function(){for(var a=p.prototype.getGraphPath.call(this),q=a.length+1;q--;)(q===a.length||"M"===a[q])&&0<q&&a.splice(q,0,"z");return this.areaPath=a},drawGraph:function(){this.options.fillColor=this.color;u.area.prototype.drawGraph.call(this)},
drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawTracker:p.prototype.drawTracker,setStackedPoints:a.noop})})(u);(function(a){var p=a.arrayMax,v=a.arrayMin,u=a.Axis,l=a.color,q=a.each,f=a.isNumber,b=a.noop,d=a.pick,k=a.pInt,m=a.Point,n=a.Series,c=a.seriesType,g=a.seriesTypes;c("bubble","scatter",{dataLabels:{formatter:function(){return this.point.z},inside:!0,verticalAlign:"middle"},marker:{lineColor:null,lineWidth:1,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",
softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"},{pointArrayMap:["y","z"],parallelArrays:["x","y","z"],trackerGroups:["markerGroup","dataLabelsGroup"],bubblePadding:!0,zoneAxis:"z",pointAttribs:function(b,a){var c=d(this.options.marker.fillOpacity,.5);b=n.prototype.pointAttribs.call(this,b,a);1!==c&&(b.fill=l(b.fill).setOpacity(c).get("rgba"));return b},getRadii:function(b,a,c,d){var e,k,h,g=
this.zData,f=[],m=this.options,n="width"!==m.sizeBy,t=m.zThreshold,l=a-b;k=0;for(e=g.length;k<e;k++)h=g[k],m.sizeByAbsoluteValue&&null!==h&&(h=Math.abs(h-t),a=Math.max(a-t,Math.abs(b-t)),b=0),null===h?h=null:h<b?h=c/2-1:(h=0<l?(h-b)/l:.5,n&&0<=h&&(h=Math.sqrt(h)),h=Math.ceil(c+h*(d-c))/2),f.push(h);this.radii=f},animate:function(b){var a=this.options.animation;b||(q(this.points,function(b){var c=b.graphic,d;c&&c.width&&(d={x:c.x,y:c.y,width:c.width,height:c.height},c.attr({x:b.plotX,y:b.plotY,width:1,
height:1}),c.animate(d,a))}),this.animate=null)},translate:function(){var b,a=this.data,c,d,k=this.radii;g.scatter.prototype.translate.call(this);for(b=a.length;b--;)c=a[b],d=k?k[b]:0,f(d)&&d>=this.minPxSize/2?(c.marker={radius:d,width:2*d,height:2*d},c.dlBox={x:c.plotX-d,y:c.plotY-d,width:2*d,height:2*d}):c.shapeArgs=c.plotY=c.dlBox=void 0},alignDataLabel:g.column.prototype.alignDataLabel,buildKDTree:b,applyZones:b},{haloPath:function(b){return m.prototype.haloPath.call(this,0===b?0:this.marker.radius+
b)},ttBelow:!1});u.prototype.beforePadding=function(){var b=this,a=this.len,c=this.chart,g=0,m=a,n=this.isXAxis,l=n?"xData":"yData",u=this.min,w={},x=Math.min(c.plotWidth,c.plotHeight),A=Number.MAX_VALUE,E=-Number.MAX_VALUE,F=this.max-u,C=a/F,G=[];q(this.series,function(a){var e=a.options;!a.bubblePadding||!a.visible&&c.options.chart.ignoreHiddenSeries||(b.allowZoomOutside=!0,G.push(a),n&&(q(["minSize","maxSize"],function(b){var a=e[b],c=/%$/.test(a),a=k(a);w[b]=c?x*a/100:a}),a.minPxSize=w.minSize,
a.maxPxSize=Math.max(w.maxSize,w.minSize),a=a.zData,a.length&&(A=d(e.zMin,Math.min(A,Math.max(v(a),!1===e.displayNegative?e.zThreshold:-Number.MAX_VALUE))),E=d(e.zMax,Math.max(E,p(a))))))});q(G,function(a){var c=a[l],d=c.length,e;n&&a.getRadii(A,E,a.minPxSize,a.maxPxSize);if(0<F)for(;d--;)f(c[d])&&b.dataMin<=c[d]&&c[d]<=b.dataMax&&(e=a.radii[d],g=Math.min((c[d]-u)*C-e,g),m=Math.max((c[d]-u)*C+e,m))});G.length&&0<F&&!this.isLog&&(m-=a,C*=(a+g-m)/a,q([["min","userMin",g],["max","userMax",m]],function(a){void 0===
d(b.options[a[0]],b[a[1]])&&(b[a[0]]+=a[2]/C)}))}})(u);(function(a){function p(b,a){var d=this.chart,f=this.options.animation,n=this.group,c=this.markerGroup,g=this.xAxis.center,h=d.plotLeft,l=d.plotTop;d.polar?d.renderer.isSVG&&(!0===f&&(f={}),a?(b={translateX:g[0]+h,translateY:g[1]+l,scaleX:.001,scaleY:.001},n.attr(b),c&&c.attr(b)):(b={translateX:h,translateY:l,scaleX:1,scaleY:1},n.animate(b,f),c&&c.animate(b,f),this.animate=null)):b.call(this,a)}var u=a.each,w=a.pick,l=a.seriesTypes,q=a.wrap,f=
a.Series.prototype;a=a.Pointer.prototype;f.searchPointByAngle=function(b){var a=this.chart,k=this.xAxis.pane.center;return this.searchKDTree({clientX:180+-180/Math.PI*Math.atan2(b.chartX-k[0]-a.plotLeft,b.chartY-k[1]-a.plotTop)})};q(f,"buildKDTree",function(b){this.chart.polar&&(this.kdByAngle?this.searchPoint=this.searchPointByAngle:this.kdDimensions=2);b.apply(this)});f.toXY=function(b){var a,k=this.chart,f=b.plotX;a=b.plotY;b.rectPlotX=f;b.rectPlotY=a;a=this.xAxis.postTranslate(b.plotX,this.yAxis.len-
a);b.plotX=b.polarPlotX=a.x-k.plotLeft;b.plotY=b.polarPlotY=a.y-k.plotTop;this.kdByAngle?(k=(f/Math.PI*180+this.xAxis.pane.options.startAngle)%360,0>k&&(k+=360),b.clientX=k):b.clientX=b.plotX};l.spline&&q(l.spline.prototype,"getPointSpline",function(b,a,k,f){var d,c,g,h,m,e,l;this.chart.polar?(d=k.plotX,c=k.plotY,b=a[f-1],g=a[f+1],this.connectEnds&&(b||(b=a[a.length-2]),g||(g=a[1])),b&&g&&(h=b.plotX,m=b.plotY,a=g.plotX,e=g.plotY,h=(1.5*d+h)/2.5,m=(1.5*c+m)/2.5,g=(1.5*d+a)/2.5,l=(1.5*c+e)/2.5,a=Math.sqrt(Math.pow(h-
d,2)+Math.pow(m-c,2)),e=Math.sqrt(Math.pow(g-d,2)+Math.pow(l-c,2)),h=Math.atan2(m-c,h-d),m=Math.atan2(l-c,g-d),l=Math.PI/2+(h+m)/2,Math.abs(h-l)>Math.PI/2&&(l-=Math.PI),h=d+Math.cos(l)*a,m=c+Math.sin(l)*a,g=d+Math.cos(Math.PI+l)*e,l=c+Math.sin(Math.PI+l)*e,k.rightContX=g,k.rightContY=l),f?(k=["C",b.rightContX||b.plotX,b.rightContY||b.plotY,h||d,m||c,d,c],b.rightContX=b.rightContY=null):k=["M",d,c]):k=b.call(this,a,k,f);return k});q(f,"translate",function(a){var b=this.chart;a.call(this);if(b.polar&&
(this.kdByAngle=b.tooltip&&b.tooltip.shared,!this.preventPostTranslate))for(a=this.points,b=a.length;b--;)this.toXY(a[b])});q(f,"getGraphPath",function(a,d){var b=this,f,l;if(this.chart.polar){d=d||this.points;for(f=0;f<d.length;f++)if(!d[f].isNull){l=f;break}!1!==this.options.connectEnds&&void 0!==l&&(this.connectEnds=!0,d.splice(d.length,0,d[l]));u(d,function(a){void 0===a.polarPlotY&&b.toXY(a)})}return a.apply(this,[].slice.call(arguments,1))});q(f,"animate",p);l.column&&(l=l.column.prototype,
l.polarArc=function(a,d,f,l){var b=this.xAxis.center,c=this.yAxis.len;return this.chart.renderer.symbols.arc(b[0],b[1],c-d,null,{start:f,end:l,innerR:c-w(a,c)})},q(l,"animate",p),q(l,"translate",function(a){var b=this.xAxis,f=b.startAngleRad,l,n,c;this.preventPostTranslate=!0;a.call(this);if(b.isRadial)for(l=this.points,c=l.length;c--;)n=l[c],a=n.barX+f,n.shapeType="path",n.shapeArgs={d:this.polarArc(n.yBottom,n.plotY,a,a+n.pointWidth)},this.toXY(n),n.tooltipPos=[n.plotX,n.plotY],n.ttBelow=n.plotY>
b.center[1]}),q(l,"alignDataLabel",function(a,d,k,l,n,c){this.chart.polar?(a=d.rectPlotX/Math.PI*180,null===l.align&&(l.align=20<a&&160>a?"left":200<a&&340>a?"right":"center"),null===l.verticalAlign&&(l.verticalAlign=45>a||315<a?"bottom":135<a&&225>a?"top":"middle"),f.alignDataLabel.call(this,d,k,l,n,c)):a.call(this,d,k,l,n,c)}));q(a,"getCoordinates",function(a,d){var b=this.chart,f={xAxis:[],yAxis:[]};b.polar?u(b.axes,function(a){var c=a.isXAxis,g=a.center,h=d.chartX-g[0]-b.plotLeft,g=d.chartY-g[1]-
b.plotTop;f[c?"xAxis":"yAxis"].push({axis:a,value:a.translate(c?Math.PI-Math.atan2(h,g):Math.sqrt(Math.pow(h,2)+Math.pow(g,2)),!0)})}):f=a.call(this,d);return f})})(u)});

386
Teknik/Scripts/Highcharts/highcharts.js

@ -0,0 +1,386 @@ @@ -0,0 +1,386 @@
/*
Highcharts JS v5.0.7 (2017-01-17)
(c) 2009-2016 Torstein Honsi
License: www.highcharts.com/license
*/
(function(L,a){"object"===typeof module&&module.exports?module.exports=L.document?a(L):a:L.Highcharts=a(L)})("undefined"!==typeof window?window:this,function(L){L=function(){var a=window,B=a.document,A=a.navigator&&a.navigator.userAgent||"",H=B&&B.createElementNS&&!!B.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,G=/(edge|msie|trident)/i.test(A)&&!window.opera,r=!H,g=/Firefox/.test(A),f=g&&4>parseInt(A.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highcharts",
version:"5.0.7",deg2rad:2*Math.PI/360,doc:B,hasBidiBug:f,hasTouch:B&&void 0!==B.documentElement.ontouchstart,isMS:G,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:H,vml:r,win:a,charts:[],marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){}}}();(function(a){var B=[],A=a.charts,H=a.doc,G=a.win;a.error=function(r,g){r=a.isNumber(r)?"Highcharts error #"+
r+": www.highcharts.com/errors/"+r:r;if(g)throw Error(r);G.console&&console.log(r)};a.Fx=function(a,g,f){this.options=g;this.elem=a;this.prop=f};a.Fx.prototype={dSetter:function(){var a=this.paths[0],g=this.paths[1],f=[],u=this.now,l=a.length,q;if(1===u)f=this.toD;else if(l===g.length&&1>u)for(;l--;)q=parseFloat(a[l]),f[l]=isNaN(q)?a[l]:u*parseFloat(g[l]-q)+q;else f=g;this.elem.attr("d",f,null,!0)},update:function(){var a=this.elem,g=this.prop,f=this.now,u=this.options.step;if(this[g+"Setter"])this[g+
"Setter"]();else a.attr?a.element&&a.attr(g,f,null,!0):a.style[g]=f+this.unit;u&&u.call(a,f,this)},run:function(a,g,f){var r=this,l=function(a){return l.stopped?!1:r.step(a)},q;this.startTime=+new Date;this.start=a;this.end=g;this.unit=f;this.now=this.start;this.pos=0;l.elem=this.elem;l.prop=this.prop;l()&&1===B.push(l)&&(l.timerId=setInterval(function(){for(q=0;q<B.length;q++)B[q]()||B.splice(q--,1);B.length||clearInterval(l.timerId)},13))},step:function(a){var r=+new Date,f,u=this.options;f=this.elem;
var l=u.complete,q=u.duration,d=u.curAnim,b;if(f.attr&&!f.element)f=!1;else if(a||r>=q+this.startTime){this.now=this.end;this.pos=1;this.update();a=d[this.prop]=!0;for(b in d)!0!==d[b]&&(a=!1);a&&l&&l.call(f);f=!1}else this.pos=u.easing((r-this.startTime)/q),this.now=this.start+(this.end-this.start)*this.pos,this.update(),f=!0;return f},initPath:function(r,g,f){function u(a){var e,b;for(n=a.length;n--;)e="M"===a[n]||"L"===a[n],b=/[a-zA-Z]/.test(a[n+3]),e&&b&&a.splice(n+1,0,a[n+1],a[n+2],a[n+1],a[n+
2])}function l(a,e){for(;a.length<m;){a[0]=e[m-a.length];var b=a.slice(0,t);[].splice.apply(a,[0,0].concat(b));E&&(b=a.slice(a.length-t),[].splice.apply(a,[a.length,0].concat(b)),n--)}a[0]="M"}function q(a,e){for(var b=(m-a.length)/t;0<b&&b--;)c=a.slice().splice(a.length/z-t,t*z),c[0]=e[m-t-b*t],C&&(c[t-6]=c[t-2],c[t-5]=c[t-1]),[].splice.apply(a,[a.length/z,0].concat(c)),E&&b--}g=g||"";var d,b=r.startX,p=r.endX,C=-1<g.indexOf("C"),t=C?7:3,m,c,n;g=g.split(" ");f=f.slice();var E=r.isArea,z=E?2:1,e;
C&&(u(g),u(f));if(b&&p){for(n=0;n<b.length;n++)if(b[n]===p[0]){d=n;break}else if(b[0]===p[p.length-b.length+n]){d=n;e=!0;break}void 0===d&&(g=[])}g.length&&a.isNumber(d)&&(m=f.length+d*z*t,e?(l(g,f),q(f,g)):(l(f,g),q(g,f)));return[g,f]}};a.extend=function(a,g){var f;a||(a={});for(f in g)a[f]=g[f];return a};a.merge=function(){var r,g=arguments,f,u={},l=function(q,d){var b,p;"object"!==typeof q&&(q={});for(p in d)d.hasOwnProperty(p)&&(b=d[p],a.isObject(b,!0)&&"renderTo"!==p&&"number"!==typeof b.nodeType?
q[p]=l(q[p]||{},b):q[p]=d[p]);return q};!0===g[0]&&(u=g[1],g=Array.prototype.slice.call(g,2));f=g.length;for(r=0;r<f;r++)u=l(u,g[r]);return u};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(r,g){return r&&"object"===typeof r&&(!g||!a.isArray(r))};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=
function(a,g){for(var f=a.length;f--;)if(a[f]===g){a.splice(f,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(r,g,f){var u,l;if(a.isString(g))a.defined(f)?r.setAttribute(g,f):r&&r.getAttribute&&(l=r.getAttribute(g));else if(a.defined(g)&&a.isObject(g))for(u in g)r.setAttribute(u,g[u]);return l};a.splat=function(r){return a.isArray(r)?r:[r]};a.syncTimeout=function(a,g,f){if(g)return setTimeout(a,g,f);a.call(0,f)};a.pick=function(){var a=arguments,g,f,u=a.length;for(g=
0;g<u;g++)if(f=a[g],void 0!==f&&null!==f)return f};a.css=function(r,g){a.isMS&&!a.svg&&g&&void 0!==g.opacity&&(g.filter="alpha(opacity\x3d"+100*g.opacity+")");a.extend(r.style,g)};a.createElement=function(r,g,f,u,l){r=H.createElement(r);var q=a.css;g&&a.extend(r,g);l&&q(r,{padding:0,border:"none",margin:0});f&&q(r,f);u&&u.appendChild(r);return r};a.extendClass=function(r,g){var f=function(){};f.prototype=new r;a.extend(f.prototype,g);return f};a.pad=function(a,g,f){return Array((g||2)+1-String(a).length).join(f||
0)+a};a.relativeLength=function(a,g){return/%$/.test(a)?g*parseFloat(a)/100:parseFloat(a)};a.wrap=function(a,g,f){var r=a[g];a[g]=function(){var a=Array.prototype.slice.call(arguments),q=arguments,d=this;d.proceed=function(){r.apply(d,arguments.length?arguments:q)};a.unshift(r);a=f.apply(this,a);d.proceed=null;return a}};a.getTZOffset=function(r){var g=a.Date;return 6E4*(g.hcGetTimezoneOffset&&g.hcGetTimezoneOffset(r)||g.hcTimezoneOffset||0)};a.dateFormat=function(r,g,f){if(!a.defined(g)||isNaN(g))return a.defaultOptions.lang.invalidDate||
"";r=a.pick(r,"%Y-%m-%d %H:%M:%S");var u=a.Date,l=new u(g-a.getTZOffset(g)),q,d=l[u.hcGetHours](),b=l[u.hcGetDay](),p=l[u.hcGetDate](),C=l[u.hcGetMonth](),t=l[u.hcGetFullYear](),m=a.defaultOptions.lang,c=m.weekdays,n=m.shortWeekdays,E=a.pad,u=a.extend({a:n?n[b]:c[b].substr(0,3),A:c[b],d:E(p),e:E(p,2," "),w:b,b:m.shortMonths[C],B:m.months[C],m:E(C+1),y:t.toString().substr(2,2),Y:t,H:E(d),k:d,I:E(d%12||12),l:d%12||12,M:E(l[u.hcGetMinutes]()),p:12>d?"AM":"PM",P:12>d?"am":"pm",S:E(l.getSeconds()),L:E(Math.round(g%
1E3),3)},a.dateFormats);for(q in u)for(;-1!==r.indexOf("%"+q);)r=r.replace("%"+q,"function"===typeof u[q]?u[q](g):u[q]);return f?r.substr(0,1).toUpperCase()+r.substr(1):r};a.formatSingle=function(r,g){var f=/\.([0-9])/,u=a.defaultOptions.lang;/f$/.test(r)?(f=(f=r.match(f))?f[1]:-1,null!==g&&(g=a.numberFormat(g,f,u.decimalPoint,-1<r.indexOf(",")?u.thousandsSep:""))):g=a.dateFormat(r,g);return g};a.format=function(r,g){for(var f="{",u=!1,l,q,d,b,p=[],C;r;){f=r.indexOf(f);if(-1===f)break;l=r.slice(0,
f);if(u){l=l.split(":");q=l.shift().split(".");b=q.length;C=g;for(d=0;d<b;d++)C=C[q[d]];l.length&&(C=a.formatSingle(l.join(":"),C));p.push(C)}else p.push(l);r=r.slice(f+1);f=(u=!u)?"}":"{"}p.push(r);return p.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(r,g,f,u,l){var q,d=r;f=a.pick(f,1);q=r/f;g||(g=l?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===u&&(1===f?g=a.grep(g,function(a){return 0===a%1}):.1>=f&&(g=[1/f])));
for(u=0;u<g.length&&!(d=g[u],l&&d*f>=r||!l&&q<=(g[u]+(g[u+1]||g[u]))/2);u++);return d=a.correctFloat(d*f,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,g){var f=a.length,r,l;for(l=0;l<f;l++)a[l].safeI=l;a.sort(function(a,d){r=g(a,d);return 0===r?a.safeI-d.safeI:r});for(l=0;l<f;l++)delete a[l].safeI};a.arrayMin=function(a){for(var g=a.length,f=a[0];g--;)a[g]<f&&(f=a[g]);return f};a.arrayMax=function(a){for(var g=a.length,f=a[0];g--;)a[g]>f&&(f=a[g]);return f};a.destroyObjectProperties=
function(a,g){for(var f in a)a[f]&&a[f]!==g&&a[f].destroy&&a[f].destroy(),delete a[f]};a.discardElement=function(r){var g=a.garbageBin;g||(g=a.createElement("div"));r&&g.appendChild(r);g.innerHTML=""};a.correctFloat=function(a,g){return parseFloat(a.toPrecision(g||14))};a.setAnimation=function(r,g){g.renderer.globalAnimation=a.pick(r,g.options.chart.animation,!0)};a.animObject=function(r){return a.isObject(r)?a.merge(r):{duration:r?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,
day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(r,g,f,u){r=+r||0;g=+g;var l=a.defaultOptions.lang,q=(r.toString().split(".")[1]||"").length,d,b;-1===g?g=Math.min(q,20):a.isNumber(g)||(g=2);b=(Math.abs(r)+Math.pow(10,-Math.max(g,q)-1)).toFixed(g);q=String(a.pInt(b));d=3<q.length?q.length%3:0;f=a.pick(f,l.decimalPoint);u=a.pick(u,l.thousandsSep);r=(0>r?"-":"")+(d?q.substr(0,d)+u:"");r+=q.substr(d).replace(/(\d{3})(?=\d)/g,"$1"+u);g&&(r+=f+b.slice(-g));return r};Math.easeInOutSine=
function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(r,g){return"width"===g?Math.min(r.offsetWidth,r.scrollWidth)-a.getStyle(r,"padding-left")-a.getStyle(r,"padding-right"):"height"===g?Math.min(r.offsetHeight,r.scrollHeight)-a.getStyle(r,"padding-top")-a.getStyle(r,"padding-bottom"):(r=G.getComputedStyle(r,void 0))&&a.pInt(r.getPropertyValue(g))};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 f=[],u=0,l=a.length;u<l;u++)f[u]=g.call(a[u],a[u],u,a);return f};a.offset=function(a){var g=H.documentElement;a=a.getBoundingClientRect();return{top:a.top+(G.pageYOffset||g.scrollTop)-(g.clientTop||0),left:a.left+(G.pageXOffset||g.scrollLeft)-(g.clientLeft||0)}};a.stop=function(a,g){for(var f=B.length;f--;)B[f].elem!==a||g&&g!==B[f].prop||(B[f].stopped=!0)};a.each=function(a,g,f){return Array.prototype.forEach.call(a,g,f)};a.addEvent=function(r,
g,f){function u(a){a.target=a.srcElement||G;f.call(r,a)}var l=r.hcEvents=r.hcEvents||{};r.addEventListener?r.addEventListener(g,f,!1):r.attachEvent&&(r.hcEventsIE||(r.hcEventsIE={}),r.hcEventsIE[f.toString()]=u,r.attachEvent("on"+g,u));l[g]||(l[g]=[]);l[g].push(f);return function(){a.removeEvent(r,g,f)}};a.removeEvent=function(r,g,f){function u(a,b){r.removeEventListener?r.removeEventListener(a,b,!1):r.attachEvent&&(b=r.hcEventsIE[b.toString()],r.detachEvent("on"+a,b))}function l(){var a,b;if(r.nodeName)for(b in g?
(a={},a[g]=!0):a=d,a)if(d[b])for(a=d[b].length;a--;)u(b,d[b][a])}var q,d=r.hcEvents,b;d&&(g?(q=d[g]||[],f?(b=a.inArray(f,q),-1<b&&(q.splice(b,1),d[g]=q),u(g,f)):(l(),d[g]=[])):(l(),r.hcEvents={}))};a.fireEvent=function(r,g,f,u){var l;l=r.hcEvents;var q,d;f=f||{};if(H.createEvent&&(r.dispatchEvent||r.fireEvent))l=H.createEvent("Events"),l.initEvent(g,!0,!0),a.extend(l,f),r.dispatchEvent?r.dispatchEvent(l):r.fireEvent(g,l);else if(l)for(l=l[g]||[],q=l.length,f.target||a.extend(f,{preventDefault:function(){f.defaultPrevented=
!0},target:r,type:g}),g=0;g<q;g++)(d=l[g])&&!1===d.call(r,f)&&f.preventDefault();u&&!f.defaultPrevented&&u(f)};a.animate=function(r,g,f){var u,l="",q,d,b;a.isObject(f)||(u=arguments,f={duration:u[2],easing:u[3],complete:u[4]});a.isNumber(f.duration)||(f.duration=400);f.easing="function"===typeof f.easing?f.easing:Math[f.easing]||Math.easeInOutSine;f.curAnim=a.merge(g);for(b in g)a.stop(r,b),d=new a.Fx(r,f,b),q=null,"d"===b?(d.paths=d.initPath(r,r.d,g.d),d.toD=g.d,u=0,q=1):r.attr?u=r.attr(b):(u=parseFloat(a.getStyle(r,
b))||0,"opacity"!==b&&(l="px")),q||(q=g[b]),q.match&&q.match("px")&&(q=q.replace(/px/g,"")),d.run(u,q,l)};a.seriesType=function(r,g,f,u,l){var q=a.getOptions(),d=a.seriesTypes;q.plotOptions[r]=a.merge(q.plotOptions[g],f);d[r]=a.extendClass(d[g]||function(){},u);d[r].prototype.type=r;l&&(d[r].prototype.pointClass=a.extendClass(a.Point,l));return d[r]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),g=0;return function(){return"highcharts-"+a+"-"+g++}}();G.jQuery&&(G.jQuery.fn.highcharts=
function(){var r=[].slice.call(arguments);if(this[0])return r[0]?(new (a[a.isString(r[0])?r.shift():"Chart"])(this[0],r[0],r[1]),this):A[a.attr(this[0],"data-highcharts-chart")]});H&&!H.defaultView&&(a.getStyle=function(r,g){var f={width:"clientWidth",height:"clientHeight"}[g];if(r.style[g])return a.pInt(r.style[g]);"opacity"===g&&(g="filter");if(f)return r.style.zoom=1,Math.max(r[f]-2*a.getStyle(r,"padding"),0);r=r.currentStyle[g.replace(/\-(\w)/g,function(a,l){return l.toUpperCase()})];"filter"===
g&&(r=r.replace(/alpha\(opacity=([0-9]+)\)/,function(a,l){return l/100}));return""===r?1:a.pInt(r)});Array.prototype.forEach||(a.each=function(a,g,f){for(var u=0,l=a.length;u<l;u++)if(!1===g.call(f,a[u],u,a))return u});Array.prototype.indexOf||(a.inArray=function(a,g){var f,u=0;if(g)for(f=g.length;u<f;u++)if(g[u]===a)return u;return-1});Array.prototype.filter||(a.grep=function(a,g){for(var f=[],u=0,l=a.length;u<l;u++)g(a[u],u)&&f.push(a[u]);return f});Array.prototype.find||(a.find=function(a,g){var f,
u=a.length;for(f=0;f<u;f++)if(g(a[f],f))return a[f]})})(L);(function(a){var B=a.each,A=a.isNumber,H=a.map,G=a.merge,r=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[r(a[1]),r(a[2]),r(a[3]),parseFloat(a[4],10)]}},{regex:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(a){return[r(a[1],
16),r(a[2],16),r(a[3],16),1]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[r(a[1]),r(a[2]),r(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(g){var f,u,l,q;if((this.input=g=this.names[g]||g)&&g.stops)this.stops=H(g.stops,function(d){return new a.Color(d[1])});else for(l=this.parsers.length;l--&&!u;)q=this.parsers[l],(f=q.regex.exec(g))&&(u=q.parse(f));this.rgba=u||[]},get:function(a){var f=this.input,g=this.rgba,l;this.stops?
(l=G(f),l.stops=[].concat(l.stops),B(this.stops,function(f,d){l.stops[d]=[l.stops[d][0],f.get(a)]})):l=g&&A(g[0])?"rgb"===a||!a&&1===g[3]?"rgb("+g[0]+","+g[1]+","+g[2]+")":"a"===a?g[3]:"rgba("+g.join(",")+")":f;return l},brighten:function(a){var f,g=this.rgba;if(this.stops)B(this.stops,function(l){l.brighten(a)});else if(A(a)&&0!==a)for(f=0;3>f;f++)g[f]+=r(255*a),0>g[f]&&(g[f]=0),255<g[f]&&(g[f]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this}};a.color=function(g){return new a.Color(g)}})(L);
(function(a){var B,A,H=a.addEvent,G=a.animate,r=a.attr,g=a.charts,f=a.color,u=a.css,l=a.createElement,q=a.defined,d=a.deg2rad,b=a.destroyObjectProperties,p=a.doc,C=a.each,t=a.extend,m=a.erase,c=a.grep,n=a.hasTouch,E=a.inArray,z=a.isArray,e=a.isFirefox,x=a.isMS,F=a.isObject,w=a.isString,h=a.isWebKit,y=a.merge,J=a.noop,K=a.pick,I=a.pInt,k=a.removeEvent,D=a.stop,P=a.svg,N=a.SVG_NS,S=a.symbolSizes,O=a.win;B=a.SVGElement=function(){return this};B.prototype={opacity:1,SVG_NS:N,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textDecoration textOverflow textOutline".split(" "),
init:function(a,k){this.element="span"===k?l(k):p.createElementNS(this.SVG_NS,k);this.renderer=a},animate:function(v,k,e){k=a.animObject(K(k,this.renderer.globalAnimation,!0));0!==k.duration?(e&&(k.complete=e),G(this,v,k)):this.attr(v,null,e);return this},colorGradient:function(v,k,e){var b=this.renderer,h,D,c,x,M,m,n,d,F,t,p,w=[],l;v.linearGradient?D="linearGradient":v.radialGradient&&(D="radialGradient");if(D){c=v[D];M=b.gradients;n=v.stops;t=e.radialReference;z(c)&&(v[D]=c={x1:c[0],y1:c[1],x2:c[2],
y2:c[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===D&&t&&!q(c.gradientUnits)&&(x=c,c=y(c,b.getRadialAttr(t,x),{gradientUnits:"userSpaceOnUse"}));for(p in c)"id"!==p&&w.push(p,c[p]);for(p in n)w.push(n[p]);w=w.join(",");M[w]?t=M[w].attr("id"):(c.id=t=a.uniqueKey(),M[w]=m=b.createElement(D).attr(c).add(b.defs),m.radAttr=x,m.stops=[],C(n,function(v){0===v[1].indexOf("rgba")?(h=a.color(v[1]),d=h.get("rgb"),F=h.get("a")):(d=v[1],F=1);v=b.createElement("stop").attr({offset:v[0],"stop-color":d,
"stop-opacity":F}).add(m);m.stops.push(v)}));l="url("+b.url+"#"+t+")";e.setAttribute(k,l);e.gradient=w;v.toString=function(){return l}}},applyTextOutline:function(a){var v=this.element,k,e,b,c;-1!==a.indexOf("contrast")&&(a=a.replace(/contrast/g,this.renderer.getContrast(v.style.fill)));this.fakeTS=!0;this.ySetter=this.xSetter;k=[].slice.call(v.getElementsByTagName("tspan"));a=a.split(" ");e=a[a.length-1];(b=a[0])&&"none"!==b&&(b=b.replace(/(^[\d\.]+)(.*?)$/g,function(a,v,k){return 2*v+k}),C(k,function(a){"highcharts-text-outline"===
a.getAttribute("class")&&m(k,v.removeChild(a))}),c=v.firstChild,C(k,function(a,k){0===k&&(a.setAttribute("x",v.getAttribute("x")),k=v.getAttribute("y"),a.setAttribute("y",k||0),null===k&&v.setAttribute("y",0));a=a.cloneNode(1);r(a,{"class":"highcharts-text-outline",fill:e,stroke:e,"stroke-width":b,"stroke-linejoin":"round"});v.insertBefore(a,c)}))},attr:function(a,k,e,b){var v,c=this.element,h,x=this,M;"string"===typeof a&&void 0!==k&&(v=a,a={},a[v]=k);if("string"===typeof a)x=(this[a+"Getter"]||
this._defaultGetter).call(this,a,c);else{for(v in a)k=a[v],M=!1,b||D(this,v),this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(v)&&(h||(this.symbolAttr(a),h=!0),M=!0),!this.rotation||"x"!==v&&