highstock-rails 1.3.7 → 1.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +7 -5
- data/app/assets/javascripts/highstock/adapters/mootools-adapter.js +2 -2
- data/app/assets/javascripts/highstock/adapters/prototype-adapter.js +2 -2
- data/app/assets/javascripts/highstock/adapters/standalone-framework.js +11 -11
- data/app/assets/javascripts/highstock/highcharts-more.js +46 -45
- data/app/assets/javascripts/highstock/modules/canvas-tools.js +2 -2
- data/app/assets/javascripts/highstock/modules/data.js +10 -11
- data/app/assets/javascripts/highstock/modules/drilldown.js +9 -9
- data/app/assets/javascripts/highstock/modules/exporting.js +16 -16
- data/app/assets/javascripts/highstock/modules/funnel.js +2 -2
- data/app/assets/javascripts/highstock/modules/heatmap.js +2 -2
- data/app/assets/javascripts/highstock/modules/map.js +36 -27
- data/app/assets/javascripts/highstock/modules/no-data-to-display.js +3 -3
- data/app/assets/javascripts/highstock/themes/dark-blue.js +1 -1
- data/app/assets/javascripts/highstock/themes/dark-green.js +1 -1
- data/app/assets/javascripts/highstock/themes/gray.js +1 -1
- data/app/assets/javascripts/highstock/themes/grid.js +1 -1
- data/app/assets/javascripts/highstock/themes/skies.js +1 -1
- data/app/assets/javascripts/highstock.js +362 -348
- data/lib/highstock/rails/version.rb +1 -1
- metadata +2 -12
- data/.DS_Store +0 -0
- data/app/.DS_Store +0 -0
- data/app/assets/.DS_Store +0 -0
- data/app/assets/images/.DS_Store +0 -0
- data/app/assets/javascripts/.DS_Store +0 -0
- data/app/assets/javascripts/highstock/.DS_Store +0 -0
- data/app/assets/javascripts/highstock/adapters/.DS_Store +0 -0
- data/app/assets/javascripts/highstock/modules/.DS_Store +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/highstock/.DS_Store +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69dedd19a946e08351b248bee455023e5f549c12
|
4
|
+
data.tar.gz: 2b7550fe3fe5d952d4f76f5ea32db3255e8bf2f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee283cc22d321b10f8538808d413474021501171177e491570f5afd0c79b368d84cdf872f8d1f2a1172a658c5fca6a630ec475171f960c99dc510647046f5546
|
7
|
+
data.tar.gz: abdda035f08452b2005f7098725e9f72fecf02fe9b893401d15f71a0a6808c50f41a893b843c5a04f9e39239c43752390f2ca75c09112d295516ca0774eb032a
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Highstock-Rails
|
2
2
|
|
3
|
-
Highstock lets you create stock or general timeline charts in pure JavaScript with sophisticated navigation options like a small navigator series, preset date ranges, date picker, scrolling, and panning. This gem includes Highstock as an asset in the Rails 3.1+ asset pipeline. Note: Highstock is not free for commercial use, so you'll need a valid license to use Highstock.
|
3
|
+
[Highstock](http://www.highcharts.com/products/highstock) lets you create stock or general timeline charts in pure JavaScript with sophisticated navigation options like a small navigator series, preset date ranges, date picker, scrolling, and panning. This gem includes Highstock as an asset in the Rails 3.1+ asset pipeline. Note: Highstock is not free for commercial use, so you'll need a [valid license](http://shop.highsoft.com/highstock.html) to use Highstock.
|
4
|
+
|
5
|
+
If you're looking for Highcharts, check out [PerfectlyNormal's gem](https://github.com/PerfectlyNormal/highcharts-rails/).
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -20,14 +22,14 @@ Or install it yourself as:
|
|
20
22
|
|
21
23
|
In your JavaScript manifest (application.js):
|
22
24
|
|
23
|
-
//= require highstock
|
24
|
-
//= require highstock/highstock-more
|
25
|
+
//= require highstock
|
26
|
+
//= require highstock/highstock-more
|
25
27
|
|
26
|
-
Refer to the Highstock documentation for more information.
|
28
|
+
Refer to the [Highstock documentation](http://api.highcharts.com/highstock) for more information.
|
27
29
|
|
28
30
|
## Licensing
|
29
31
|
|
30
|
-
Highstock has its own seperate licensing agreement.
|
32
|
+
Highstock has its own seperate [licensing agreement](http://shop.highsoft.com/highstock.html).
|
31
33
|
|
32
34
|
The highstock-rails gem is released under the MIT license.
|
33
35
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/*
|
2
|
-
Highstock JS v1.3.
|
2
|
+
Highstock JS v1.3.9 (2014-01-15)
|
3
3
|
Prototype adapter
|
4
4
|
|
5
|
-
@author Michael Nelson, Torstein
|
5
|
+
@author Michael Nelson, Torstein Honsi.
|
6
6
|
|
7
7
|
Feel free to use and modify this script.
|
8
8
|
Highcharts license: www.highcharts.com/license.
|
@@ -1,17 +1,17 @@
|
|
1
1
|
/*
|
2
|
-
Highstock JS v1.3.
|
2
|
+
Highstock JS v1.3.9 (2014-01-15)
|
3
3
|
|
4
4
|
Standalone Highcharts Framework
|
5
5
|
|
6
6
|
License: MIT License
|
7
7
|
*/
|
8
|
-
var HighchartsAdapter=function(){function o(c){function
|
9
|
-
|
10
|
-
[],c=d.length,g,k,j;k=function(){
|
11
|
-
d==="filter"&&(
|
12
|
-
return-1};if(!Array.prototype.filter)this.grep=function(
|
13
|
-
this,h=function(a){return e.step(a)},f;this.startTime=+new Date;this.start=
|
14
|
-
!0;for(e in
|
15
|
-
|
16
|
-
|
17
|
-
(c.dispatchEvent||c.fireEvent)?(e=l.createEvent("Events"),e.initEvent(
|
8
|
+
var HighchartsAdapter=function(){function o(c){function b(b,a,d){b.removeEventListener(a,d,!1)}function d(b,a,d){d=b.HCProxiedMethods[d.toString()];b.detachEvent("on"+a,d)}function a(a,c){var f=a.HCEvents,i,g,k,j;if(a.removeEventListener)i=b;else if(a.attachEvent)i=d;else return;c?(g={},g[c]=!0):g=f;for(j in g)if(f[j])for(k=f[j].length;k--;)i(a,j,f[j][k])}c.HCExtended||Highcharts.extend(c,{HCExtended:!0,HCEvents:{},bind:function(a,b){var d=this,c=this.HCEvents,g;if(d.addEventListener)d.addEventListener(a,
|
9
|
+
b,!1);else if(d.attachEvent){g=function(a){b.call(d,a)};if(!d.HCProxiedMethods)d.HCProxiedMethods={};d.HCProxiedMethods[b.toString()]=g;d.attachEvent("on"+a,g)}c[a]===r&&(c[a]=[]);c[a].push(b)},unbind:function(c,h){var f,i;c?(f=this.HCEvents[c]||[],h?(i=HighchartsAdapter.inArray(h,f),i>-1&&(f.splice(i,1),this.HCEvents[c]=f),this.removeEventListener?b(this,c,h):this.attachEvent&&d(this,c,h)):(a(this,c),this.HCEvents[c]=[])):(a(this),this.HCEvents={})},trigger:function(a,b){var d=this.HCEvents[a]||
|
10
|
+
[],c=d.length,g,k,j;k=function(){b.defaultPrevented=!0};for(g=0;g<c;g++){j=d[g];if(b.stopped)break;b.preventDefault=k;b.target=this;if(!b.type)b.type=a;j.call(this,b)===!1&&b.preventDefault()}}});return c}var r,l=document,p=[],m=[],q,n;Math.easeInOutSine=function(c,b,d,a){return-d/2*(Math.cos(Math.PI*c/a)-1)+b};return{init:function(c){if(!l.defaultView)this._getStyle=function(b,d){var a;return b.style[d]?b.style[d]:(d==="opacity"&&(d="filter"),a=b.currentStyle[d.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()})],
|
11
|
+
d==="filter"&&(a=a.replace(/alpha\(opacity=([0-9]+)\)/,function(b,a){return a/100})),a===""?1:a)},this.adapterRun=function(b,d){var a={width:"clientWidth",height:"clientHeight"}[d];if(a)return b.style.zoom=1,b[a]-2*parseInt(HighchartsAdapter._getStyle(b,"padding"),10)};if(!Array.prototype.forEach)this.each=function(b,d){for(var a=0,c=b.length;a<c;a++)if(d.call(b[a],b[a],a,b)===!1)return a};if(!Array.prototype.indexOf)this.inArray=function(b,d){var a,c=0;if(d)for(a=d.length;c<a;c++)if(d[c]===b)return c;
|
12
|
+
return-1};if(!Array.prototype.filter)this.grep=function(b,d){for(var a=[],c=0,h=b.length;c<h;c++)d(b[c],c)&&a.push(b[c]);return a};n=function(b,c,a){this.options=c;this.elem=b;this.prop=a};n.prototype={update:function(){var b;b=this.paths;var d=this.elem,a=d.element;b&&a?d.attr("d",c.step(b[0],b[1],this.now,this.toD)):d.attr?a&&d.attr(this.prop,this.now):(b={},b[d]=this.now+this.unit,Highcharts.css(d,b));this.options.step&&this.options.step.call(this.elem,this.now,this)},custom:function(b,c,a){var e=
|
13
|
+
this,h=function(a){return e.step(a)},f;this.startTime=+new Date;this.start=b;this.end=c;this.unit=a;this.now=this.start;this.pos=this.state=0;h.elem=this.elem;h()&&m.push(h)===1&&(q=setInterval(function(){for(f=0;f<m.length;f++)m[f]()||m.splice(f--,1);m.length||clearInterval(q)},13))},step:function(b){var c=+new Date,a;a=this.options;var e;if(this.elem.stopAnimation)a=!1;else if(b||c>=a.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();b=this.options.curAnim[this.prop]=
|
14
|
+
!0;for(e in a.curAnim)a.curAnim[e]!==!0&&(b=!1);b&&a.complete&&a.complete.call(this.elem);a=!1}else e=c-this.startTime,this.state=e/a.duration,this.pos=a.easing(e,0,1,a.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),a=!0;return a}};this.animate=function(b,d,a){var e,h="",f,i,g;b.stopAnimation=!1;if(typeof a!=="object"||a===null)e=arguments,a={duration:e[2],easing:e[3],complete:e[4]};if(typeof a.duration!=="number")a.duration=400;a.easing=Math[a.easing]||Math.easeInOutSine;
|
15
|
+
a.curAnim=Highcharts.extend({},d);for(g in d)i=new n(b,a,g),f=null,g==="d"?(i.paths=c.init(b,b.d,d.d),i.toD=d.d,e=0,f=1):b.attr?e=b.attr(g):(e=parseFloat(HighchartsAdapter._getStyle(b,g))||0,g!=="opacity"&&(h="px")),f||(f=parseFloat(d[g])),i.custom(e,f,h)}},_getStyle:function(c,b){return window.getComputedStyle(c).getPropertyValue(b)},getScript:function(c,b){var d=l.getElementsByTagName("head")[0],a=l.createElement("script");a.type="text/javascript";a.src=c;a.onload=b;d.appendChild(a)},inArray:function(c,
|
16
|
+
b){return b.indexOf?b.indexOf(c):p.indexOf.call(b,c)},adapterRun:function(c,b){return parseInt(HighchartsAdapter._getStyle(c,b),10)},grep:function(c,b){return p.filter.call(c,b)},map:function(c,b){for(var d=[],a=0,e=c.length;a<e;a++)d[a]=b.call(c[a],c[a],a,c);return d},offset:function(c){for(var b=0,d=0;c;)b+=c.offsetLeft,d+=c.offsetTop,c=c.offsetParent;return{left:b,top:d}},addEvent:function(c,b,d){o(c).bind(b,d)},removeEvent:function(c,b,d){o(c).unbind(b,d)},fireEvent:function(c,b,d,a){var e;l.createEvent&&
|
17
|
+
(c.dispatchEvent||c.fireEvent)?(e=l.createEvent("Events"),e.initEvent(b,!0,!0),e.target=c,Highcharts.extend(e,d),c.dispatchEvent?c.dispatchEvent(e):c.fireEvent(b,e)):c.HCExtended===!0&&(d=d||{},c.trigger(b,d));d&&d.defaultPrevented&&(a=null);a&&a(d)},washMouseEvent:function(c){return c},stop:function(c){c.stopAnimation=!0},each:function(c,b){return Array.prototype.forEach.call(c,b)}}}();
|
@@ -1,50 +1,51 @@
|
|
1
1
|
/*
|
2
|
-
Highcharts JS v3.0.
|
2
|
+
Highcharts JS v3.0.9 (2014-01-15)
|
3
3
|
|
4
|
-
(c) 2009-
|
4
|
+
(c) 2009-2014 Torstein Honsi
|
5
5
|
|
6
6
|
License: www.highcharts.com/license
|
7
7
|
*/
|
8
|
-
(function(
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
this.
|
19
|
-
|
20
|
-
(h
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
0
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
b;a.rectPlotY=d;a.clientX=(b/Math.PI*180+this.xAxis.pane.options.startAngle)%360;b=this.xAxis.postTranslate(a.plotX,this.yAxis.len-d);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop};
|
46
|
-
k,
|
47
|
-
|
48
|
-
[].concat(b,[c[0]]);return a.call(this,b)});
|
49
|
-
e.pointWidth,innerR:c-
|
50
|
-
d.plotTop,c=180-Math.round(Math.atan2(c,d)/Math.PI*180)):c=a.call(this,b);return c});
|
8
|
+
(function(k,D){function J(a,b,c){this.init.call(this,a,b,c)}var N=k.arrayMin,O=k.arrayMax,t=k.each,z=k.extend,q=k.merge,P=k.map,r=k.pick,w=k.pInt,o=k.getOptions().plotOptions,h=k.seriesTypes,u=k.extendClass,K=k.splat,p=k.wrap,L=k.Axis,A=k.Tick,H=k.Point,Q=k.Pointer,R=k.TrackerMixin,S=k.CenteredSeriesMixin,x=k.Series,v=Math,E=v.round,B=v.floor,T=v.max,U=k.Color,s=function(){};z(J.prototype,{init:function(a,b,c){var d=this,e=d.defaultOptions;d.chart=b;if(b.angular)e.background={};d.options=a=q(e,a);
|
9
|
+
(a=a.background)&&t([].concat(K(a)).reverse(),function(a){var f=a.backgroundColor,a=q(d.defaultBackgroundOptions,a);if(f)a.backgroundColor=f;a.color=a.backgroundColor;c.options.plotBands.unshift(a)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{shape:"circle",borderWidth:1,borderColor:"silver",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#DDD"]]},from:Number.MIN_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}});
|
10
|
+
var G=L.prototype,A=A.prototype,V={getOffset:s,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:s,setCategories:s,setTitle:s},M={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,plotBands:[],tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,distance:15,
|
11
|
+
x:0,y:null},maxPadding:0,minPadding:0,plotBands:[],showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},plotBands:[],showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(a){this.options=q(this.defaultOptions,this.defaultRadialOptions,a)},getOffset:function(){G.getOffset.call(this);this.chart.axisOffset[this.side]=0;this.center=this.pane.center=S.getCenter.call(this.pane)},getLinePath:function(a,b){var c=this.center,
|
12
|
+
b=r(b,c[2]/2-this.offset);return this.chart.renderer.symbols.arc(this.left+c[0],this.top+c[1],b,b,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})},setAxisTranslation:function(){G.setAxisTranslation.call(this);if(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+(this.reversed?(this.endAngleRad-this.startAngleRad)/4:0):0},beforeSetTickPositions:function(){this.autoConnect&&
|
13
|
+
(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)},setAxisSize:function(){G.setAxisSize.call(this);if(this.isRadial)this.center=this.pane.center=k.CenteredSeriesMixin.getCenter.call(this.pane),this.len=this.width=this.height=this.isCircular?this.center[2]*(this.endAngleRad-this.startAngleRad)/2:this.center[2]/2},getPosition:function(a,b){if(!this.isCircular)b=this.translate(a),a=this.min;return this.postTranslate(this.translate(a),r(b,this.center[2]/2)-this.offset)},postTranslate:function(a,
|
14
|
+
b){var c=this.chart,d=this.center,a=this.startAngleRad+a;return{x:c.plotLeft+d[0]+Math.cos(a)*b,y:c.plotTop+d[1]+Math.sin(a)*b}},getPlotBandPath:function(a,b,c){var d=this.center,e=this.startAngleRad,g=d[2]/2,f=[r(c.outerRadius,"100%"),c.innerRadius,r(c.thickness,10)],j=/%$/,n,l=this.isCircular;this.options.gridLineInterpolation==="polygon"?d=this.getPlotLinePath(a).concat(this.getPlotLinePath(b,!0)):(l||(f[0]=this.translate(a),f[1]=this.translate(b)),f=P(f,function(a){j.test(a)&&(a=w(a,10)*g/100);
|
15
|
+
return a}),c.shape==="circle"||!l?(a=-Math.PI/2,b=Math.PI*1.5,n=!0):(a=e+this.translate(a),b=e+this.translate(b)),d=this.chart.renderer.symbols.arc(this.left+d[0],this.top+d[1],f[0],f[0],{start:a,end:b,innerR:r(f[1],f[0]-f[2]),open:n}));return d},getPlotLinePath:function(a,b){var c=this.center,d=this.chart,e=this.getPosition(a),g,f,j;this.isCircular?j=["M",c[0]+d.plotLeft,c[1]+d.plotTop,"L",e.x,e.y]:this.options.gridLineInterpolation==="circle"?(a=this.translate(a))&&(j=this.getLinePath(0,a)):(g=
|
16
|
+
d.xAxis[0],j=[],a=this.translate(a),c=g.tickPositions,g.autoConnect&&(c=c.concat([c[0]])),b&&(c=[].concat(c).reverse()),t(c,function(c,b){f=g.getPosition(c,a);j.push(b?"L":"M",f.x,f.y)}));return j},getTitlePosition:function(){var a=this.center,b=this.chart,c=this.options.title;return{x:b.plotLeft+a[0]+(c.x||0),y:b.plotTop+a[1]-{high:0.5,middle:0.25,low:0}[c.align]*a[2]+(c.y||0)}}};p(G,"init",function(a,b,c){var i;var d=b.angular,e=b.polar,g=c.isX,f=d&&g,j,n;n=b.options;var l=c.pane||0;if(d){if(z(this,
|
17
|
+
f?V:M),j=!g)this.defaultRadialOptions=this.defaultRadialGaugeOptions}else if(e)z(this,M),this.defaultRadialOptions=(j=g)?this.defaultRadialXOptions:q(this.defaultYAxisOptions,this.defaultRadialYOptions);a.call(this,b,c);if(!f&&(d||e)){a=this.options;if(!b.panes)b.panes=[];this.pane=(i=b.panes[l]=b.panes[l]||new J(K(n.pane)[l],b,this),l=i);l=l.options;b.inverted=!1;n.chart.zoomType=null;this.startAngleRad=b=(l.startAngle-90)*Math.PI/180;this.endAngleRad=n=(r(l.endAngle,l.startAngle+360)-90)*Math.PI/
|
18
|
+
180;this.offset=a.offset||0;if((this.isCircular=j)&&c.max===D&&n-b===2*Math.PI)this.autoConnect=!0}});p(A,"getPosition",function(a,b,c,d,e){var g=this.axis;return g.getPosition?g.getPosition(c):a.call(this,b,c,d,e)});p(A,"getLabelPosition",function(a,b,c,d,e,g,f,j,n){var l=this.axis,i=g.y,m=g.align,y=(l.translate(this.pos)+l.startAngleRad+Math.PI/2)/Math.PI*180%360;l.isRadial?(a=l.getPosition(this.pos,l.center[2]/2+r(g.distance,-25)),g.rotation==="auto"?d.attr({rotation:y}):i===null&&(i=l.chart.renderer.fontMetrics(d.styles.fontSize).b-
|
19
|
+
d.getBBox().height/2),m===null&&(m=l.isCircular?y>20&&y<160?"left":y>200&&y<340?"right":"center":"center",d.attr({align:m})),a.x+=g.x,a.y+=i):a=a.call(this,b,c,d,e,g,f,j,n);return a});p(A,"getMarkPath",function(a,b,c,d,e,g,f){var j=this.axis;j.isRadial?(a=j.getPosition(this.pos,j.center[2]/2+d),b=["M",b,c,"L",a.x,a.y]):b=a.call(this,b,c,d,e,g,f);return b});o.arearange=q(o.area,{lineWidth:1,marker:null,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.low}</b> - <b>{point.high}</b><br/>'},
|
20
|
+
trackByArea:!0,dataLabels:{verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0}});h.arearange=u(h.area,{type:"arearange",pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"low",getSegments:function(){var a=this;t(a.points,function(b){if(!a.options.connectNulls&&(b.low===null||b.high===null))b.y=null;else if(b.low===null&&b.high!==null)b.y=b.high});x.prototype.getSegments.call(this)},translate:function(){var a=this.yAxis;h.area.prototype.translate.apply(this);t(this.points,
|
21
|
+
function(b){var c=b.low,d=b.high,e=b.plotY;d===null&&c===null?b.y=null:c===null?(b.plotLow=b.plotY=null,b.plotHigh=a.translate(d,0,1,0,1)):d===null?(b.plotLow=e,b.plotHigh=null):(b.plotLow=e,b.plotHigh=a.translate(d,0,1,0,1))})},getSegmentPath:function(a){var b,c=[],d=a.length,e=x.prototype.getSegmentPath,g,f;f=this.options;var j=f.step;for(b=HighchartsAdapter.grep(a,function(a){return a.plotLow!==null});d--;)g=a[d],g.plotHigh!==null&&c.push({plotX:g.plotX,plotY:g.plotHigh});a=e.call(this,b);if(j)j===
|
22
|
+
!0&&(j="left"),f.step={left:"right",center:"center",right:"left"}[j];c=e.call(this,c);f.step=j;f=[].concat(a,c);c[0]="L";this.areaPath=this.areaPath.concat(a,c);return f},drawDataLabels:function(){var a=this.data,b=a.length,c,d=[],e=x.prototype,g=this.options.dataLabels,f,j=this.chart.inverted;if(g.enabled||this._hasPointLabels){for(c=b;c--;)f=a[c],f.y=f.high,f.plotY=f.plotHigh,d[c]=f.dataLabel,f.dataLabel=f.dataLabelUpper,f.below=!1,j?(g.align="left",g.x=g.xHigh):g.y=g.yHigh;e.drawDataLabels&&e.drawDataLabels.apply(this,
|
23
|
+
arguments);for(c=b;c--;)f=a[c],f.dataLabelUpper=f.dataLabel,f.dataLabel=d[c],f.y=f.low,f.plotY=f.plotLow,f.below=!0,j?(g.align="right",g.x=g.xLow):g.y=g.yLow;e.drawDataLabels&&e.drawDataLabels.apply(this,arguments)}},alignDataLabel:function(){h.column.prototype.alignDataLabel.apply(this,arguments)},getSymbol:h.column.prototype.getSymbol,drawPoints:s});o.areasplinerange=q(o.arearange);h.areasplinerange=u(h.arearange,{type:"areasplinerange",getPointSpline:h.spline.prototype.getPointSpline});(function(){var a=
|
24
|
+
h.column.prototype;o.columnrange=q(o.column,o.arearange,{lineWidth:1,pointRange:null});h.columnrange=u(h.arearange,{type:"columnrange",translate:function(){var b=this,c=b.yAxis,d;a.translate.apply(b);t(b.points,function(a){var g=a.shapeArgs,f=b.options.minPointLength,j;a.plotHigh=d=c.translate(a.high,0,1,0,1);a.plotLow=a.plotY;j=d;a=a.plotY-d;a<f&&(f-=a,a+=f,j-=f/2);g.height=a;g.y=j})},trackerGroups:["group","dataLabels"],drawGraph:s,pointAttrToOptions:a.pointAttrToOptions,drawPoints:a.drawPoints,
|
25
|
+
drawTracker:a.drawTracker,animate:a.animate,getColumnMetrics:a.getColumnMetrics})})();o.gauge=q(o.line,{dataLabels:{enabled:!0,y:15,borderWidth:1,borderColor:"silver",borderRadius:3,crop:!1,style:{fontWeight:"bold"},verticalAlign:"top",zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1});H={type:"gauge",pointClass:u(H,{setState:function(a){this.state=a}}),angular:!0,drawGraph:s,fixedBox:!0,forceDL:!0,trackerGroups:["group","dataLabels"],translate:function(){var a=this.yAxis,b=this.options,
|
26
|
+
c=a.center;this.generatePoints();t(this.points,function(d){var e=q(b.dial,d.dial),g=w(r(e.radius,80))*c[2]/200,f=w(r(e.baseLength,70))*g/100,j=w(r(e.rearLength,10))*g/100,n=e.baseWidth||3,l=e.topWidth||1,i=a.startAngleRad+a.translate(d.y,null,null,null,!0);b.wrap===!1&&(i=Math.max(a.startAngleRad,Math.min(a.endAngleRad,i)));i=i*180/Math.PI;d.shapeType="path";d.shapeArgs={d:e.path||["M",-j,-n/2,"L",f,-n/2,g,-l/2,g,l/2,f,n/2,-j,n/2,"z"],translateX:c[0],translateY:c[1],rotation:i};d.plotX=c[0];d.plotY=
|
27
|
+
c[1]})},drawPoints:function(){var a=this,b=a.yAxis.center,c=a.pivot,d=a.options,e=d.pivot,g=a.chart.renderer;t(a.points,function(f){var c=f.graphic,b=f.shapeArgs,e=b.d,i=q(d.dial,f.dial);c?(c.animate(b),b.d=e):f.graphic=g[f.shapeType](b).attr({stroke:i.borderColor||"none","stroke-width":i.borderWidth||0,fill:i.backgroundColor||"black",rotation:b.rotation}).add(a.group)});c?c.animate({translateX:b[0],translateY:b[1]}):a.pivot=g.circle(0,0,r(e.radius,5)).attr({"stroke-width":e.borderWidth||0,stroke:e.borderColor||
|
28
|
+
"silver",fill:e.backgroundColor||"black"}).translate(b[0],b[1]).add(a.group)},animate:function(a){var b=this;if(!a)t(b.points,function(a){var d=a.graphic;d&&(d.attr({rotation:b.yAxis.startAngleRad*180/Math.PI}),d.animate({rotation:a.shapeArgs.rotation},b.options.animation))}),b.animate=null},render:function(){this.group=this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);x.prototype.render.call(this);this.group.clip(this.chart.clipRect)},setData:function(a,
|
29
|
+
b){x.prototype.setData.call(this,a,!1);this.processData();this.generatePoints();r(b,!0)&&this.chart.redraw()},drawTracker:R.drawTrackerPoint};h.gauge=u(h.line,H);o.boxplot=q(o.column,{fillColor:"#FFFFFF",lineWidth:1,medianWidth:2,states:{hover:{brightness:-0.3}},threshold:null,tooltip:{pointFormat:'<span style="color:{series.color};font-weight:bold">{series.name}</span><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'},
|
30
|
+
whiskerLength:"50%",whiskerWidth:2});h.boxplot=u(h.column,{type:"boxplot",pointArrayMap:["low","q1","median","q3","high"],toYData:function(a){return[a.low,a.q1,a.median,a.q3,a.high]},pointValKey:"high",pointAttrToOptions:{fill:"fillColor",stroke:"color","stroke-width":"lineWidth"},drawDataLabels:s,translate:function(){var a=this.yAxis,b=this.pointArrayMap;h.column.prototype.translate.apply(this);t(this.points,function(c){t(b,function(b){c[b]!==null&&(c[b+"Plot"]=a.translate(c[b],0,1,0,1))})})},drawPoints:function(){var a=
|
31
|
+
this,b=a.points,c=a.options,d=a.chart.renderer,e,g,f,j,n,l,i,m,y,h,k,I,o,p,q,u,x,s,v,w,A,z,F=a.doQuartiles!==!1,C=parseInt(a.options.whiskerLength,10)/100;t(b,function(b){y=b.graphic;A=b.shapeArgs;k={};p={};u={};z=b.color||a.color;if(b.plotY!==D)if(e=b.pointAttr[b.selected?"selected":""],x=A.width,s=B(A.x),v=s+x,w=E(x/2),g=B(F?b.q1Plot:b.lowPlot),f=B(F?b.q3Plot:b.lowPlot),j=B(b.highPlot),n=B(b.lowPlot),k.stroke=b.stemColor||c.stemColor||z,k["stroke-width"]=r(b.stemWidth,c.stemWidth,c.lineWidth),k.dashstyle=
|
32
|
+
b.stemDashStyle||c.stemDashStyle,p.stroke=b.whiskerColor||c.whiskerColor||z,p["stroke-width"]=r(b.whiskerWidth,c.whiskerWidth,c.lineWidth),u.stroke=b.medianColor||c.medianColor||z,u["stroke-width"]=r(b.medianWidth,c.medianWidth,c.lineWidth),u["stroke-linecap"]="round",i=k["stroke-width"]%2/2,m=s+w+i,h=["M",m,f,"L",m,j,"M",m,g,"L",m,n,"z"],F&&(i=e["stroke-width"]%2/2,m=B(m)+i,g=B(g)+i,f=B(f)+i,s+=i,v+=i,I=["M",s,f,"L",s,g,"L",v,g,"L",v,f,"L",s,f,"z"]),C&&(i=p["stroke-width"]%2/2,j+=i,n+=i,o=["M",m-
|
33
|
+
w*C,j,"L",m+w*C,j,"M",m-w*C,n,"L",m+w*C,n]),i=u["stroke-width"]%2/2,l=E(b.medianPlot)+i,q=["M",s,l,"L",v,l,"z"],y)b.stem.animate({d:h}),C&&b.whiskers.animate({d:o}),F&&b.box.animate({d:I}),b.medianShape.animate({d:q});else{b.graphic=y=d.g().add(a.group);b.stem=d.path(h).attr(k).add(y);if(C)b.whiskers=d.path(o).attr(p).add(y);if(F)b.box=d.path(I).attr(e).add(y);b.medianShape=d.path(q).attr(u).add(y)}})}});o.errorbar=q(o.boxplot,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.low}</b> - <b>{point.high}</b><br/>'},
|
34
|
+
whiskerWidth:null});h.errorbar=u(h.boxplot,{type:"errorbar",pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"high",doQuartiles:!1,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||h.column.prototype.getColumnMetrics.call(this)}});o.waterfall=q(o.column,{lineWidth:1,lineColor:"#333",dashStyle:"dot",borderColor:"#333"});h.waterfall=u(h.column,{type:"waterfall",upColorProp:"fill",pointArrayMap:["low","y"],pointValKey:"y",init:function(a,
|
35
|
+
b){b.stacking=!0;h.column.prototype.init.call(this,a,b)},translate:function(){var a=this.options,b=this.yAxis,c,d,e,g,f,j,n,l,i;c=a.threshold;a=a.borderWidth%2/2;h.column.prototype.translate.apply(this);l=c;e=this.points;for(d=0,c=e.length;d<c;d++){g=e[d];f=g.shapeArgs;j=this.getStack(d);i=j.points[this.index];if(isNaN(g.y))g.y=this.yData[d];n=T(l,l+g.y)+i[0];f.y=b.translate(n,0,1);g.isSum||g.isIntermediateSum?(f.y=b.translate(i[1],0,1),f.height=b.translate(i[0],0,1)-f.y):l+=j.total;f.height<0&&(f.y+=
|
36
|
+
f.height,f.height*=-1);g.plotY=f.y=E(f.y)-a;f.height=E(f.height);g.yBottom=f.y+f.height}},processData:function(a){var b=this.yData,c=this.points,d,e=b.length,g=this.options.threshold||0,f,j,n,l,i,m;j=f=n=l=g;for(m=0;m<e;m++)i=b[m],d=c&&c[m]?c[m]:{},i==="sum"||d.isSum?b[m]=j:i==="intermediateSum"||d.isIntermediateSum?(b[m]=f,f=g):(j+=i,f+=i),n=Math.min(j,n),l=Math.max(j,l);x.prototype.processData.call(this,a);this.dataMin=n;this.dataMax=l},toYData:function(a){if(a.isSum)return"sum";else if(a.isIntermediateSum)return"intermediateSum";
|
37
|
+
return a.y},getAttribs:function(){h.column.prototype.getAttribs.apply(this,arguments);var a=this.options,b=a.states,c=a.upColor||this.color,a=k.Color(c).brighten(0.1).get(),d=q(this.pointAttr),e=this.upColorProp;d[""][e]=c;d.hover[e]=b.hover.upColor||a;d.select[e]=b.select.upColor||c;t(this.points,function(a){if(a.y>0&&!a.color)a.pointAttr=d,a.color=c})},getGraphPath:function(){var a=this.data,b=a.length,c=E(this.options.lineWidth+this.options.borderWidth)%2/2,d=[],e,g,f;for(f=1;f<b;f++)g=a[f].shapeArgs,
|
38
|
+
e=a[f-1].shapeArgs,g=["M",e.x+e.width,e.y+c,"L",g.x,e.y+c],a[f-1].y<0&&(g[2]+=e.height,g[5]+=e.height),d=d.concat(g);return d},getExtremes:s,getStack:function(a){var b=this.yAxis.stacks,c=this.stackKey;this.processedYData[a]<this.options.threshold&&(c="-"+c);return b[c][a]},drawGraph:x.prototype.drawGraph});o.bubble=q(o.scatter,{dataLabels:{inside:!0,style:{color:"white",textShadow:"0px 0px 3px black"},verticalAlign:"middle"},marker:{lineColor:null,lineWidth:1},minSize:8,maxSize:"20%",tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},
|
39
|
+
turboThreshold:0,zThreshold:0});h.bubble=u(h.scatter,{type:"bubble",pointArrayMap:["y","z"],parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],bubblePadding:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor"},applyOpacity:function(a){var b=this.options.marker,c=r(b.fillOpacity,0.5),a=a||b.fillColor||this.color;c!==1&&(a=U(a).setOpacity(c).get("rgba"));return a},convertAttribs:function(){var a=x.prototype.convertAttribs.apply(this,arguments);a.fill=
|
40
|
+
this.applyOpacity(a.fill);return a},getRadii:function(a,b,c,d){var e,g,f,j=this.zData,n=[],l=this.options.sizeBy!=="width";for(g=0,e=j.length;g<e;g++)f=b-a,f=f>0?(j[g]-a)/(b-a):0.5,l&&f>=0&&(f=Math.sqrt(f)),n.push(v.ceil(c+f*(d-c))/2);this.radii=n},animate:function(a){var b=this.options.animation;if(!a)t(this.points,function(a){var d=a.graphic,a=a.shapeArgs;d&&a&&(d.attr("r",1),d.animate({r:a.r},b))}),this.animate=null},translate:function(){var a,b=this.data,c,d,e=this.radii;h.scatter.prototype.translate.call(this);
|
41
|
+
for(a=b.length;a--;)c=b[a],d=e?e[a]:0,c.negative=c.z<(this.options.zThreshold||0),d>=this.minPxSize/2?(c.shapeType="circle",c.shapeArgs={x:c.plotX,y:c.plotY,r:d},c.dlBox={x:c.plotX-d,y:c.plotY-d,width:2*d,height:2*d}):c.shapeArgs=c.plotY=c.dlBox=D},drawLegendSymbol:function(a,b){var c=w(a.itemStyle.fontSize)/2;b.legendSymbol=this.chart.renderer.circle(c,a.baseline-c,c).attr({zIndex:3}).add(b.legendGroup);b.legendSymbol.isMarker=!0},drawPoints:h.column.prototype.drawPoints,alignDataLabel:h.column.prototype.alignDataLabel});
|
42
|
+
L.prototype.beforePadding=function(){var a=this,b=this.len,c=this.chart,d=0,e=b,g=this.isXAxis,f=g?"xData":"yData",j=this.min,n={},l=v.min(c.plotWidth,c.plotHeight),i=Number.MAX_VALUE,m=-Number.MAX_VALUE,h=this.max-j,k=b/h,p=[];this.tickPositions&&(t(this.series,function(b){var f=b.options;if(b.bubblePadding&&b.visible&&(a.allowZoomOutside=!0,p.push(b),g))t(["minSize","maxSize"],function(a){var b=f[a],g=/%$/.test(b),b=w(b);n[a]=g?l*b/100:b}),b.minPxSize=n.minSize,b=b.zData,b.length&&(i=v.min(i,v.max(N(b),
|
43
|
+
f.displayNegative===!1?f.zThreshold:-Number.MAX_VALUE)),m=v.max(m,O(b)))}),t(p,function(a){var b=a[f],c=b.length,l;g&&a.getRadii(i,m,n.minSize,n.maxSize);if(h>0)for(;c--;)typeof b[c]==="number"&&(l=a.radii[c],d=Math.min((b[c]-j)*k-l,d),e=Math.max((b[c]-j)*k+l,e))}),p.length&&h>0&&r(this.options.min,this.userMin)===D&&r(this.options.max,this.userMax)===D&&(e-=b,k*=(b+d-e)/b,this.min+=d/k,this.max+=e/k))};(function(){function a(a,b,c){a.call(this,b,c);if(this.chart.polar)this.closeSegment=function(a){var b=
|
44
|
+
this.xAxis.center;a.push("L",b[0],b[1])},this.closedStacks=!0}function b(a,b){var c=this.chart,d=this.options.animation,e=this.group,i=this.markerGroup,m=this.xAxis.center,h=c.plotLeft,k=c.plotTop;if(c.polar){if(c.renderer.isSVG)if(d===!0&&(d={}),b){if(c={translateX:m[0]+h,translateY:m[1]+k,scaleX:0.001,scaleY:0.001},e.attr(c),i)i.attrSetters=e.attrSetters,i.attr(c)}else c={translateX:h,translateY:k,scaleX:1,scaleY:1},e.animate(c,d),i&&i.animate(c,d),this.animate=null}else a.call(this,b)}var c=x.prototype,
|
45
|
+
d=Q.prototype,e;c.toXY=function(a){var b,c=this.chart;b=a.plotX;var d=a.plotY;a.rectPlotX=b;a.rectPlotY=d;a.clientX=(b/Math.PI*180+this.xAxis.pane.options.startAngle)%360;b=this.xAxis.postTranslate(a.plotX,this.yAxis.len-d);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop};c.orderTooltipPoints=function(a){if(this.chart.polar&&(a.sort(function(a,b){return a.clientX-b.clientX}),a[0]))a[0].wrappedClientX=a[0].clientX+360,a.push(a[0])};h.area&&p(h.area.prototype,"init",a);h.areaspline&&
|
46
|
+
p(h.areaspline.prototype,"init",a);h.spline&&p(h.spline.prototype,"getPointSpline",function(a,b,c,d){var e,i,m,h,k,p,o;if(this.chart.polar){e=c.plotX;i=c.plotY;a=b[d-1];m=b[d+1];this.connectEnds&&(a||(a=b[b.length-2]),m||(m=b[1]));if(a&&m)h=a.plotX,k=a.plotY,b=m.plotX,p=m.plotY,h=(1.5*e+h)/2.5,k=(1.5*i+k)/2.5,m=(1.5*e+b)/2.5,o=(1.5*i+p)/2.5,b=Math.sqrt(Math.pow(h-e,2)+Math.pow(k-i,2)),p=Math.sqrt(Math.pow(m-e,2)+Math.pow(o-i,2)),h=Math.atan2(k-i,h-e),k=Math.atan2(o-i,m-e),o=Math.PI/2+(h+k)/2,Math.abs(h-
|
47
|
+
o)>Math.PI/2&&(o-=Math.PI),h=e+Math.cos(o)*b,k=i+Math.sin(o)*b,m=e+Math.cos(Math.PI+o)*p,o=i+Math.sin(Math.PI+o)*p,c.rightContX=m,c.rightContY=o;d?(c=["C",a.rightContX||a.plotX,a.rightContY||a.plotY,h||e,k||i,e,i],a.rightContX=a.rightContY=null):c=["M",e,i]}else c=a.call(this,b,c,d);return c});p(c,"translate",function(a){a.call(this);if(this.chart.polar&&!this.preventPostTranslate)for(var a=this.points,b=a.length;b--;)this.toXY(a[b])});p(c,"getSegmentPath",function(a,b){var c=this.points;if(this.chart.polar&&
|
48
|
+
this.options.connectEnds!==!1&&b[b.length-1]===c[c.length-1]&&c[0].y!==null)this.connectEnds=!0,b=[].concat(b,[c[0]]);return a.call(this,b)});p(c,"animate",b);p(c,"setTooltipPoints",function(a,b){this.chart.polar&&z(this.xAxis,{tooltipLen:360});return a.call(this,b)});if(h.column)e=h.column.prototype,p(e,"animate",b),p(e,"translate",function(a){var b=this.xAxis,c=this.yAxis.len,d=b.center,e=b.startAngleRad,i=this.chart.renderer,h,k;this.preventPostTranslate=!0;a.call(this);if(b.isRadial){b=this.points;
|
49
|
+
for(k=b.length;k--;)h=b[k],a=h.barX+e,h.shapeType="path",h.shapeArgs={d:i.symbols.arc(d[0],d[1],c-h.plotY,null,{start:a,end:a+h.pointWidth,innerR:c-r(h.yBottom,c)})},this.toXY(h)}}),p(e,"alignDataLabel",function(a,b,d,e,h,i){if(this.chart.polar){a=b.rectPlotX/Math.PI*180;if(e.align===null)e.align=a>20&&a<160?"left":a>200&&a<340?"right":"center";if(e.verticalAlign===null)e.verticalAlign=a<45||a>315?"bottom":a>135&&a<225?"top":"middle";c.alignDataLabel.call(this,b,d,e,h,i)}else a.call(this,b,d,e,h,
|
50
|
+
i)});p(d,"getIndex",function(a,b){var c,d=this.chart,e;d.polar?(e=d.xAxis[0].center,c=b.chartX-e[0]-d.plotLeft,d=b.chartY-e[1]-d.plotTop,c=180-Math.round(Math.atan2(c,d)/Math.PI*180)):c=a.call(this,b);return c});p(d,"getCoordinates",function(a,b){var c=this.chart,d={xAxis:[],yAxis:[]};c.polar?t(c.axes,function(a){var e=a.isXAxis,g=a.center,h=b.chartX-g[0]-c.plotLeft,g=b.chartY-g[1]-c.plotTop;d[e?"xAxis":"yAxis"].push({axis:a,value:a.translate(e?Math.PI-Math.atan2(h,g):Math.sqrt(Math.pow(h,2)+Math.pow(g,
|
51
|
+
2)),!0)})}):d=a.call(this,b);return d})})()})(Highcharts);
|
@@ -11,10 +11,10 @@
|
|
11
11
|
|
12
12
|
Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
|
13
13
|
|
14
|
-
Highstock JS v1.3.
|
14
|
+
Highstock JS v1.3.9 (2014-01-15)
|
15
15
|
CanVGRenderer Extension module
|
16
16
|
|
17
|
-
(c) 2011-2012 Torstein
|
17
|
+
(c) 2011-2012 Torstein Honsi, Erik Olsson
|
18
18
|
|
19
19
|
License: www.highcharts.com/license
|
20
20
|
*/
|
@@ -1,17 +1,16 @@
|
|
1
1
|
/*
|
2
2
|
Data plugin for Highcharts
|
3
3
|
|
4
|
-
(c) 2012-
|
5
|
-
Last revision 2013-06-07
|
4
|
+
(c) 2012-2014 Torstein Honsi
|
6
5
|
|
7
6
|
License: www.highcharts.com/license
|
8
7
|
*/
|
9
|
-
(function(
|
10
|
-
{global:(
|
11
|
-
|
12
|
-
c[e][b-d]=a.innerHTML,e+=1})}),this.dataFound())},parseGoogleSpreadsheet:function(){var b=this,a=this.options,c=a.googleSpreadsheetKey,d=this.columns,f=a.startRow||0,
|
13
|
-
|
14
|
-
|
15
|
-
c,d,f,
|
16
|
-
for(e=0,k=0;e<b.length;k++){f=
|
17
|
-
"init",function(b,a,c){var d=this;a&&a.data?
|
8
|
+
(function(j){var m=j.each,o=function(b,a){this.init(b,a)};j.extend(o.prototype,{init:function(b,a){this.options=b;this.chartOptions=a;this.columns=b.columns||this.rowsToColumns(b.rows)||[];this.columns.length?this.dataFound():(this.parseCSV(),this.parseTable(),this.parseGoogleSpreadsheet())},getColumnDistribution:function(){var b=this.chartOptions,a=b&&b.chart&&b.chart.type,c=[];m(b&&b.series||[],function(b){c.push((j.seriesTypes[b.type||a||"line"].prototype.pointArrayMap||[0]).length)});this.valueCount=
|
9
|
+
{global:(j.seriesTypes[a||"line"].prototype.pointArrayMap||[0]).length,individual:c}},dataFound:function(){if(this.options.switchRowsAndColumns)this.columns=this.rowsToColumns(this.columns);this.parseTypes();this.findHeaderRow();this.parsed();this.complete()},parseCSV:function(){var b=this,a=this.options,c=a.csv,d=this.columns,f=a.startRow||0,h=a.endRow||Number.MAX_VALUE,i=a.startColumn||0,e=a.endColumn||Number.MAX_VALUE,g,k,j=0;c&&(k=c.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(a.lineDelimiter||
|
10
|
+
"\n"),g=a.itemDelimiter||(c.indexOf("\t")!==-1?"\t":","),m(k,function(a,c){var k=b.trim(a),n=k.indexOf("#")===0;c>=f&&c<=h&&!n&&k!==""&&(k=a.split(g),m(k,function(b,a){a>=i&&a<=e&&(d[a-i]||(d[a-i]=[]),d[a-i][j]=b)}),j+=1)}),this.dataFound())},parseTable:function(){var b=this.options,a=b.table,c=this.columns,d=b.startRow||0,f=b.endRow||Number.MAX_VALUE,h=b.startColumn||0,i=b.endColumn||Number.MAX_VALUE,e;a&&(typeof a==="string"&&(a=document.getElementById(a)),m(a.getElementsByTagName("tr"),function(a,
|
11
|
+
b){e=0;b>=d&&b<=f&&m(a.childNodes,function(a){if((a.tagName==="TD"||a.tagName==="TH")&&e>=h&&e<=i)c[e]||(c[e]=[]),c[e][b-d]=a.innerHTML,e+=1})}),this.dataFound())},parseGoogleSpreadsheet:function(){var b=this,a=this.options,c=a.googleSpreadsheetKey,d=this.columns,f=a.startRow||0,h=a.endRow||Number.MAX_VALUE,i=a.startColumn||0,e=a.endColumn||Number.MAX_VALUE,g,k;c&&jQuery.getJSON("https://spreadsheets.google.com/feeds/cells/"+c+"/"+(a.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",
|
12
|
+
function(a){var a=a.feed.entry,c,j=a.length,m=0,n=0,l;for(l=0;l<j;l++)c=a[l],m=Math.max(m,c.gs$cell.col),n=Math.max(n,c.gs$cell.row);for(l=0;l<m;l++)if(l>=i&&l<=e)d[l-i]=[],d[l-i].length=Math.min(n,h-f);for(l=0;l<j;l++)if(c=a[l],g=c.gs$cell.row-1,k=c.gs$cell.col-1,k>=i&&k<=e&&g>=f&&g<=h)d[k-i][g-f]=c.content.$t;b.dataFound()})},findHeaderRow:function(){m(this.columns,function(){});this.headerRow=0},trim:function(b){return typeof b==="string"?b.replace(/^\s+|\s+$/g,""):b},parseTypes:function(){for(var b=
|
13
|
+
this.columns,a=b.length,c,d,f,h;a--;)for(c=b[a].length;c--;)d=b[a][c],f=parseFloat(d),h=this.trim(d),h==f?(b[a][c]=f,f>31536E6?b[a].isDatetime=!0:b[a].isNumeric=!0):(d=this.parseDate(d),a===0&&typeof d==="number"&&!isNaN(d)?(b[a][c]=d,b[a].isDatetime=!0):b[a][c]=h===""?null:h)},dateFormats:{"YYYY-mm-dd":{regex:"^([0-9]{4})-([0-9]{2})-([0-9]{2})$",parser:function(b){return Date.UTC(+b[1],b[2]-1,+b[3])}}},parseDate:function(b){var a=this.options.parseDate,c,d,f;a&&(c=a(b));if(typeof b==="string")for(d in this.dateFormats)a=
|
14
|
+
this.dateFormats[d],(f=b.match(a.regex))&&(c=a.parser(f));return c},rowsToColumns:function(b){var a,c,d,f,h;if(b){h=[];c=b.length;for(a=0;a<c;a++){f=b[a].length;for(d=0;d<f;d++)h[d]||(h[d]=[]),h[d][a]=b[a][d]}}return h},parsed:function(){this.options.parsed&&this.options.parsed.call(this,this.columns)},complete:function(){var b=this.columns,a,c,d=this.options,f,h,i,e,g,k;if(d.complete){this.getColumnDistribution();b.length>1&&(a=b.shift(),this.headerRow===0&&a.shift(),a.isDatetime?c="datetime":a.isNumeric||
|
15
|
+
(c="category"));for(e=0;e<b.length;e++)if(this.headerRow===0)b[e].name=b[e].shift();h=[];for(e=0,k=0;e<b.length;k++){f=j.pick(this.valueCount.individual[k],this.valueCount.global);i=[];for(g=0;g<b[e].length;g++)i[g]=[a[g],b[e][g]!==void 0?b[e][g]:null],f>1&&i[g].push(b[e+1][g]!==void 0?b[e+1][g]:null),f>2&&i[g].push(b[e+2][g]!==void 0?b[e+2][g]:null),f>3&&i[g].push(b[e+3][g]!==void 0?b[e+3][g]:null),f>4&&i[g].push(b[e+4][g]!==void 0?b[e+4][g]:null);h[k]={name:b[e].name,data:i};e+=f}d.complete({xAxis:{type:c},
|
16
|
+
series:h})}}});j.Data=o;j.data=function(b,a){return new o(b,a)};j.wrap(j.Chart.prototype,"init",function(b,a,c){var d=this;a&&a.data?j.data(j.extend(a.data,{complete:function(f){a.series&&m(a.series,function(b,c){a.series[c]=j.merge(b,f.series[c])});a=j.merge(f,a);b.call(d,a,c)}}),a):b.call(d,a,c)})})(Highcharts);
|
@@ -1,11 +1,11 @@
|
|
1
|
-
(function(e){function
|
2
|
-
activeDataLabelStyle:{cursor:"pointer",color:"#
|
1
|
+
(function(e){function p(b,a,c){return"rgba("+[Math.round(b[0]+(a[0]-b[0])*c),Math.round(b[1]+(a[1]-b[1])*c),Math.round(b[2]+(a[2]-b[2])*c),b[3]+(a[3]-b[3])*c].join(",")+")"}var m=function(){},j=e.getOptions(),g=e.each,q=e.extend,n=e.wrap,h=e.Chart,i=e.seriesTypes,k=i.pie,l=i.column,r=HighchartsAdapter.fireEvent,t=HighchartsAdapter.inArray;q(j.lang,{drillUpText:"◁ Back to {series.name}"});j.drilldown={activeAxisLabelStyle:{cursor:"pointer",color:"#0d233a",fontWeight:"bold",textDecoration:"underline"},
|
2
|
+
activeDataLabelStyle:{cursor:"pointer",color:"#0d233a",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}}};e.SVGRenderer.prototype.Element.prototype.fadeIn=function(b){this.attr({opacity:0.1,visibility:"visible"}).animate({opacity:1},b||{duration:250})};h.prototype.drilldownLevels=[];h.prototype.addSeriesAsDrilldown=function(b,a){var c=b.series,d=c.xAxis,f=c.yAxis,e;e=b.color||c.color;var g,a=q({color:e},a);g=t(b,c.points);this.drilldownLevels.push({seriesOptions:c.userOptions,
|
3
3
|
shapeArgs:b.shapeArgs,bBox:b.graphic.getBBox(),color:e,newSeries:a,pointOptions:c.options.data[g],pointIndex:g,oldExtremes:{xMin:d&&d.userMin,xMax:d&&d.userMax,yMin:f&&f.userMin,yMax:f&&f.userMax}});e=this.addSeries(a,!1);if(d)d.oldPos=d.pos,d.userMin=d.userMax=null,f.userMin=f.userMax=null;if(c.type===e.type)e.animate=e.animateDrilldown||m,e.options.animation=!0;c.remove(!1);this.redraw();this.showDrillUpButton()};h.prototype.getDrilldownBackText=function(){return this.options.lang.drillUpText.replace("{series.name}",
|
4
|
-
this.drilldownLevels[this.drilldownLevels.length-1].seriesOptions.name)};h.prototype.showDrillUpButton=function(){var b=this,a=this.getDrilldownBackText(),c=b.options.drilldown.drillUpButton;this.drillUpButton?this.drillUpButton.attr({text:a}).align():this.drillUpButton=this.renderer.button(a,null,null,function(){b.drillUp()}).attr(
|
5
|
-
c=b.oldExtremes,d=this.addSeries(b.seriesOptions,!1);r(this,"drillup",{seriesOptions:b.seriesOptions});if(d.type===a.type)d.drilldownLevel=b,d.animate=d.animateDrillupTo||m,d.options.animation=!0,a.animateDrillupFrom&&a.animateDrillupFrom(b);a.remove(!1);d.xAxis&&(d.xAxis.setExtremes(c.xMin,c.xMax,!1),d.yAxis.setExtremes(c.yMin,c.yMax,!1));this.redraw();this.drilldownLevels.length===0?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align()};
|
6
|
-
k.prototype.animateDrilldown=function(b){var a=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],c=this.chart.options.drilldown.animation,d=a.shapeArgs,f=d.start,s=(d.end-f)/this.points.length,h=e.Color(a.color).rgba;b||g(this.points,function(a,b){var g=e.Color(a.color).rgba;a.graphic.attr(e.merge(d,{start:f+b*s,end:f+(b+1)*s})).animate(a.shapeArgs,e.merge(c,{step:function(a,d){d.prop==="start"&&this.attr({fill:
|
4
|
+
this.drilldownLevels[this.drilldownLevels.length-1].seriesOptions.name)};h.prototype.showDrillUpButton=function(){var b=this,a=this.getDrilldownBackText(),c=b.options.drilldown.drillUpButton,d,f;this.drillUpButton?this.drillUpButton.attr({text:a}).align():(f=(d=c.theme)&&d.states,this.drillUpButton=this.renderer.button(a,null,null,function(){b.drillUp()},d,f&&f.hover,f&&f.select).attr({align:c.position.align,zIndex:9}).add().align(c.position,!1,c.relativeTo||"plotBox"))};h.prototype.drillUp=function(){var b=
|
5
|
+
this.drilldownLevels.pop(),a=this.series[0],c=b.oldExtremes,d=this.addSeries(b.seriesOptions,!1);r(this,"drillup",{seriesOptions:b.seriesOptions});if(d.type===a.type)d.drilldownLevel=b,d.animate=d.animateDrillupTo||m,d.options.animation=!0,a.animateDrillupFrom&&a.animateDrillupFrom(b);a.remove(!1);d.xAxis&&(d.xAxis.setExtremes(c.xMin,c.xMax,!1),d.yAxis.setExtremes(c.yMin,c.yMax,!1));this.redraw();this.drilldownLevels.length===0?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align()};
|
6
|
+
k.prototype.animateDrilldown=function(b){var a=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],c=this.chart.options.drilldown.animation,d=a.shapeArgs,f=d.start,s=(d.end-f)/this.points.length,h=e.Color(a.color).rgba;b||g(this.points,function(a,b){var g=e.Color(a.color).rgba;a.graphic.attr(e.merge(d,{start:f+b*s,end:f+(b+1)*s})).animate(a.shapeArgs,e.merge(c,{step:function(a,d){d.prop==="start"&&this.attr({fill:p(h,g,d.pos)})}}))})};k.prototype.animateDrillupTo=l.prototype.animateDrillupTo=
|
7
7
|
function(b){if(!b){var a=this,c=a.drilldownLevel;g(this.points,function(a){a.graphic.hide();a.dataLabel&&a.dataLabel.hide();a.connector&&a.connector.hide()});setTimeout(function(){g(a.points,function(a,b){var e=b===c.pointIndex?"show":"fadeIn";a.graphic[e]();if(a.dataLabel)a.dataLabel[e]();if(a.connector)a.connector[e]()})},Math.max(this.chart.options.drilldown.animation.duration-50,0));this.animate=m}};l.prototype.animateDrilldown=function(b){var a=this.chart.drilldownLevels[this.chart.drilldownLevels.length-
|
8
|
-
1].shapeArgs,c=this.chart.options.drilldown.animation;b||(a.x+=this.xAxis.oldPos-this.xAxis.pos,g(this.points,function(b){b.graphic.attr(a).animate(b.shapeArgs,c)}))};l.prototype.animateDrillupFrom=k.prototype.animateDrillupFrom=function(b){var a=this.chart.options.drilldown.animation,c=this.group;delete this.group;g(this.points,function(d){var f=d.graphic,g=e.Color(d.color).rgba;delete d.graphic;f.animate(b.shapeArgs,e.merge(a,{step:function(a,c){c.prop==="start"&&
|
9
|
-
c.pos)})},complete:function(){f.destroy();c&&(c=c.destroy())}}))})};e.Point.prototype.doDrilldown=function(){for(var b=this.series.chart,a=b.options.drilldown,c=a.series.length,d;c--&&!d;)a.series[c].id===this.drilldown&&(d=a.series[c]);r(b,"drilldown",{point:this,seriesOptions:d});d&&b.addSeriesAsDrilldown(this,d)};
|
10
|
-
a){if(!a._basicStyle)a._basicStyle=a.element.getAttribute("style");a.addClass("highcharts-drilldown-axis-label").css(b.options.drilldown.activeAxisLabelStyle).on("click",function(){f.doDrilldown&&f.doDrilldown()})}}else a&&a._basicStyle&&a.element.setAttribute("style",a._basicStyle);return f});
|
11
|
-
function(){b.doDrilldown()})})});l.prototype.supportsDrilldown=!0;k.prototype.supportsDrilldown=!0;var
|
8
|
+
1].shapeArgs,c=this.chart.options.drilldown.animation;b||(a.x+=this.xAxis.oldPos-this.xAxis.pos,g(this.points,function(b){b.graphic.attr(a).animate(b.shapeArgs,c);b.dataLabel&&b.dataLabel.fadeIn(c)}))};l.prototype.animateDrillupFrom=k.prototype.animateDrillupFrom=function(b){var a=this.chart.options.drilldown.animation,c=this.group;delete this.group;g(this.points,function(d){var f=d.graphic,g=e.Color(d.color).rgba;delete d.graphic;f.animate(b.shapeArgs,e.merge(a,{step:function(a,c){c.prop==="start"&&
|
9
|
+
this.attr({fill:p(g,e.Color(b.color).rgba,c.pos)})},complete:function(){f.destroy();c&&(c=c.destroy())}}))})};e.Point.prototype.doDrilldown=function(){for(var b=this.series.chart,a=b.options.drilldown,c=(a.series||[]).length,d;c--&&!d;)a.series[c].id===this.drilldown&&(d=a.series[c]);r(b,"drilldown",{point:this,seriesOptions:d});d&&b.addSeriesAsDrilldown(this,d)};n(e.Point.prototype,"init",function(b,a,c,d){var f=b.call(this,a,c,d),b=a.chart,a=(a=a.xAxis&&a.xAxis.ticks[d])&&a.label;if(f.drilldown){if(e.addEvent(f,
|
10
|
+
"click",function(){f.doDrilldown()}),a){if(!a._basicStyle)a._basicStyle=a.element.getAttribute("style");a.addClass("highcharts-drilldown-axis-label").css(b.options.drilldown.activeAxisLabelStyle).on("click",function(){f.doDrilldown&&f.doDrilldown()})}}else a&&a._basicStyle&&a.element.setAttribute("style",a._basicStyle);return f});n(e.Series.prototype,"drawDataLabels",function(b){var a=this.chart.options.drilldown.activeDataLabelStyle;b.call(this);g(this.points,function(b){if(b.drilldown&&b.dataLabel)b.dataLabel.attr({"class":"highcharts-drilldown-data-label"}).css(a).on("click",
|
11
|
+
function(){b.doDrilldown()})})});l.prototype.supportsDrilldown=!0;k.prototype.supportsDrilldown=!0;var o,j=function(b){b.call(this);g(this.points,function(a){a.drilldown&&a.graphic&&a.graphic.attr({"class":"highcharts-drilldown-point"}).css({cursor:"pointer"})})};for(o in i)i[o].prototype.supportsDrilldown&&n(i[o].prototype,"drawTracker",j)})(Highcharts);
|