highstock-rails 2.1.10 → 5.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/css/highcharts.css +760 -0
  3. data/app/assets/javascripts/highstock.js +511 -419
  4. data/app/assets/javascripts/highstock/highstock.js +472 -0
  5. data/app/assets/javascripts/highstock/highstock.js.map +8 -0
  6. data/app/assets/javascripts/highstock/highstock.src.js +28809 -0
  7. data/app/assets/javascripts/highstock/modules/accessibility.js +48 -0
  8. data/app/assets/javascripts/highstock/modules/accessibility.js.map +8 -0
  9. data/app/assets/javascripts/highstock/modules/accessibility.src.js +1131 -0
  10. data/app/assets/javascripts/highstock/modules/annotations.js +14 -0
  11. data/app/assets/javascripts/highstock/modules/annotations.js.map +8 -0
  12. data/app/assets/javascripts/highstock/modules/annotations.src.js +407 -0
  13. data/app/assets/javascripts/highstock/modules/boost-canvas.js +23 -0
  14. data/app/assets/javascripts/highstock/modules/boost-canvas.js.map +8 -0
  15. data/app/assets/javascripts/highstock/modules/boost-canvas.src.js +771 -0
  16. data/app/assets/javascripts/highstock/modules/boost.js +51 -12
  17. data/app/assets/javascripts/highstock/modules/boost.js.map +8 -0
  18. data/app/assets/javascripts/highstock/modules/boost.src.js +2580 -492
  19. data/app/assets/javascripts/highstock/modules/broken-axis.js.map +8 -0
  20. data/app/assets/javascripts/highstock/modules/canvasrenderer.experimental.js.map +8 -0
  21. data/app/assets/javascripts/highstock/modules/data.js +19 -19
  22. data/app/assets/javascripts/highstock/modules/data.js.map +8 -0
  23. data/app/assets/javascripts/highstock/modules/data.src.js +974 -950
  24. data/app/assets/javascripts/highstock/modules/drilldown.js +25 -17
  25. data/app/assets/javascripts/highstock/modules/drilldown.js.map +8 -0
  26. data/app/assets/javascripts/highstock/modules/drilldown.src.js +790 -709
  27. data/app/assets/javascripts/highstock/modules/export-data.js +17 -0
  28. data/app/assets/javascripts/highstock/modules/export-data.js.map +8 -0
  29. data/app/assets/javascripts/highstock/modules/export-data.src.js +417 -0
  30. data/app/assets/javascripts/highstock/modules/exporting.js +21 -18
  31. data/app/assets/javascripts/highstock/modules/exporting.js.map +8 -0
  32. data/app/assets/javascripts/highstock/modules/exporting.src.js +1013 -768
  33. data/app/assets/javascripts/highstock/modules/funnel.js +6 -7
  34. data/app/assets/javascripts/highstock/modules/funnel.js.map +8 -0
  35. data/app/assets/javascripts/highstock/modules/funnel.src.js +284 -308
  36. data/app/assets/javascripts/highstock/modules/gantt.js +24 -0
  37. data/app/assets/javascripts/highstock/modules/gantt.js.map +8 -0
  38. data/app/assets/javascripts/highstock/modules/gantt.src.js +793 -0
  39. data/app/assets/javascripts/highstock/modules/grid-axis.js +19 -0
  40. data/app/assets/javascripts/highstock/modules/grid-axis.js.map +8 -0
  41. data/app/assets/javascripts/highstock/modules/grid-axis.src.js +545 -0
  42. data/app/assets/javascripts/highstock/modules/heatmap.js +20 -18
  43. data/app/assets/javascripts/highstock/modules/heatmap.js.map +8 -0
  44. data/app/assets/javascripts/highstock/modules/heatmap.src.js +738 -633
  45. data/app/assets/javascripts/highstock/modules/map-parser.js.map +8 -0
  46. data/app/assets/javascripts/highstock/modules/map.js.map +8 -0
  47. data/app/assets/javascripts/highstock/modules/no-data-to-display.js +5 -5
  48. data/app/assets/javascripts/highstock/modules/no-data-to-display.js.map +8 -0
  49. data/app/assets/javascripts/highstock/modules/no-data-to-display.src.js +140 -133
  50. data/app/assets/javascripts/highstock/modules/offline-exporting.js +12 -7
  51. data/app/assets/javascripts/highstock/modules/offline-exporting.js.map +8 -0
  52. data/app/assets/javascripts/highstock/modules/offline-exporting.src.js +543 -270
  53. data/app/assets/javascripts/highstock/modules/overlapping-datalabels.js +10 -0
  54. data/app/assets/javascripts/highstock/modules/overlapping-datalabels.js.map +8 -0
  55. data/app/assets/javascripts/highstock/modules/overlapping-datalabels.src.js +187 -0
  56. data/app/assets/javascripts/highstock/modules/series-label.js +19 -0
  57. data/app/assets/javascripts/highstock/modules/series-label.js.map +8 -0
  58. data/app/assets/javascripts/highstock/modules/series-label.src.js +606 -0
  59. data/app/assets/javascripts/highstock/modules/solid-gauge.js +9 -8
  60. data/app/assets/javascripts/highstock/modules/solid-gauge.js.map +8 -0
  61. data/app/assets/javascripts/highstock/modules/solid-gauge.src.js +334 -266
  62. data/app/assets/javascripts/highstock/modules/static-scale.js +12 -0
  63. data/app/assets/javascripts/highstock/modules/static-scale.js.map +8 -0
  64. data/app/assets/javascripts/highstock/modules/static-scale.src.js +64 -0
  65. data/app/assets/javascripts/highstock/modules/stock.js +123 -0
  66. data/app/assets/javascripts/highstock/modules/stock.js.map +8 -0
  67. data/app/assets/javascripts/highstock/modules/stock.src.js +6247 -0
  68. data/app/assets/javascripts/highstock/modules/treemap.js +22 -23
  69. data/app/assets/javascripts/highstock/modules/treemap.js.map +8 -0
  70. data/app/assets/javascripts/highstock/modules/treemap.src.js +884 -859
  71. data/app/assets/javascripts/highstock/modules/xrange-series.js +15 -0
  72. data/app/assets/javascripts/highstock/modules/xrange-series.js.map +8 -0
  73. data/app/assets/javascripts/highstock/modules/xrange-series.src.js +258 -0
  74. data/app/assets/javascripts/highstock/themes/dark-blue.js +307 -244
  75. data/app/assets/javascripts/highstock/themes/dark-green.js +303 -244
  76. data/app/assets/javascripts/highstock/themes/dark-unica.js +231 -201
  77. data/app/assets/javascripts/highstock/themes/gray.js +314 -245
  78. data/app/assets/javascripts/highstock/themes/grid-light.js +91 -66
  79. data/app/assets/javascripts/highstock/themes/grid.js +124 -96
  80. data/app/assets/javascripts/highstock/themes/sand-signika.js +119 -94
  81. data/app/assets/javascripts/highstock/themes/skies.js +108 -85
  82. data/lib/highstock/rails/version.rb +1 -1
  83. metadata +54 -11
  84. data/app/assets/javascripts/highstock/adapters/standalone-framework.js +0 -18
  85. data/app/assets/javascripts/highstock/adapters/standalone-framework.src.js +0 -635
  86. data/app/assets/javascripts/highstock/highcharts-3d.js +0 -48
  87. data/app/assets/javascripts/highstock/highcharts-3d.src.js +0 -1711
  88. data/app/assets/javascripts/highstock/highcharts-more.js +0 -55
  89. data/app/assets/javascripts/highstock/highstock-all.js +0 -637
  90. data/app/assets/javascripts/highstock/modules/canvas-tools.js +0 -133
  91. data/app/assets/javascripts/highstock/modules/canvas-tools.src.js +0 -3114
@@ -0,0 +1,10 @@
1
+ /*
2
+ Highcharts JS v5.0.11 (2017-05-04)
3
+
4
+ (c) 2009-2017 Torstein Honsi
5
+
6
+ License: www.highcharts.com/license
7
+ */
8
+ (function(a){"object"===typeof module&&module.exports?module.exports=a:a(Highcharts)})(function(a){(function(a){var h=a.Chart,k=a.each,q=a.pick,r=a.addEvent;h.prototype.callbacks.push(function(f){function a(){var a=[];k(f.series||[],function(b){var c=b.options.dataLabels,d=b.dataLabelCollections||["dataLabel"];(c.enabled||b._hasPointLabels)&&!c.allowOverlap&&b.visible&&k(d,function(c){k(b.points,function(b){b[c]&&(b[c].labelrank=q(b.labelrank,b.shapeArgs&&b.shapeArgs.height),a.push(b[c]))})})});f.hideOverlappingLabels(a)}
9
+ a();r(f,"redraw",a)});h.prototype.hideOverlappingLabels=function(a){var f=a.length,e,b,c,d,l,m,n,p,g,h=function(a,b,c,d,e,f,g,h){return!(e>a+c||e+g<a||f>b+d||f+h<b)};for(b=0;b<f;b++)if(e=a[b])e.oldOpacity=e.opacity,e.newOpacity=1;a.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(b=0;b<f;b++)for(c=a[b],e=b+1;e<f;++e)if(d=a[e],c&&d&&c!==d&&c.placed&&d.placed&&0!==c.newOpacity&&0!==d.newOpacity&&(l=c.alignAttr,m=d.alignAttr,n=c.parentGroup,p=d.parentGroup,g=2*(c.box?0:c.padding),l=h(l.x+
10
+ n.translateX,l.y+n.translateY,c.width-g,c.height-g,m.x+p.translateX,m.y+p.translateY,d.width-g,d.height-g)))(c.labelrank<d.labelrank?c:d).newOpacity=0;k(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==c&&a.placed&&(c?a.show(!0):b=function(){a.hide()},a.alignAttr.op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AjBQL,CAAJ,CACIpB,CAAAoC,KAAA,CAAW,CAAA,CAAX,CADJ,CAGID,CAHJ,CAGeA,QAAQ,EAAG,CAClBnC,CAAAqC,KAAA,EADkB,CAO1B,CADArC,CAAA2B,UAAAR,QACA,CAD0BC,CAC1B,CAAApB,CAAA,CAAMA,CAAAsC,MAAA,CAAc,SAAd,CAA0B,MAAhC,CAAA,CACItC,CAAA2B,UADJ,CAEI,IAFJ,CAGIQ,CAHJ,CAOJ,EAAAnC,CAAAsC,MAAA,CAAc,CAAA,CAxBlB,CAJyB,CAA7B,CA7EqD,CA5DhD,CAAZ,CAAA,CA0KCtE,CA1KD,CADkB,CANtB;",
6
+ "sources":["Input_0"],
7
+ "names":["factory","module","exports","Highcharts","H","Chart","each","pick","addEvent","prototype","callbacks","push","chart","collectAndHide","labels","series","dlOptions","options","dataLabels","collections","dataLabelCollections","enabled","_hasPointLabels","allowOverlap","visible","coll","points","point","labelrank","shapeArgs","height","hideOverlappingLabels","Chart.prototype.hideOverlappingLabels","len","length","label","i","label1","label2","isIntersecting","pos2","parent1","parent2","padding","intersectRect","x1","y1","w1","h1","x2","y2","w2","h2","oldOpacity","opacity","newOpacity","sort","a","b","j","placed","pos1","alignAttr","parentGroup","box","x","translateX","y","translateY","width","complete","show","hide","isOld"]
8
+ }
@@ -0,0 +1,187 @@
1
+ /**
2
+ * @license Highcharts JS v5.0.11 (2017-05-04)
3
+ *
4
+ * (c) 2009-2017 Torstein Honsi
5
+ *
6
+ * License: www.highcharts.com/license
7
+ */
8
+ 'use strict';
9
+ (function(factory) {
10
+ if (typeof module === 'object' && module.exports) {
11
+ module.exports = factory;
12
+ } else {
13
+ factory(Highcharts);
14
+ }
15
+ }(function(Highcharts) {
16
+ (function(H) {
17
+ /**
18
+ * (c) 2009-2017 Torstein Honsi
19
+ *
20
+ * License: www.highcharts.com/license
21
+ */
22
+ /**
23
+ * Highcharts module to hide overlapping data labels. This module is included in
24
+ * Highcharts.
25
+ */
26
+ var Chart = H.Chart,
27
+ each = H.each,
28
+ pick = H.pick,
29
+ addEvent = H.addEvent;
30
+
31
+ // Collect potensial overlapping data labels. Stack labels probably don't need
32
+ // to be considered because they are usually accompanied by data labels that lie
33
+ // inside the columns.
34
+ Chart.prototype.callbacks.push(function(chart) {
35
+ function collectAndHide() {
36
+ var labels = [];
37
+
38
+ each(chart.series || [], function(series) {
39
+ var dlOptions = series.options.dataLabels,
40
+ // Range series have two collections
41
+ collections = series.dataLabelCollections || ['dataLabel'];
42
+
43
+ if (
44
+ (dlOptions.enabled || series._hasPointLabels) &&
45
+ !dlOptions.allowOverlap &&
46
+ series.visible
47
+ ) { // #3866
48
+ each(collections, function(coll) {
49
+ each(series.points, function(point) {
50
+ if (point[coll]) {
51
+ point[coll].labelrank = pick(
52
+ point.labelrank,
53
+ point.shapeArgs && point.shapeArgs.height
54
+ ); // #4118
55
+ labels.push(point[coll]);
56
+ }
57
+ });
58
+ });
59
+ }
60
+ });
61
+ chart.hideOverlappingLabels(labels);
62
+ }
63
+
64
+ // Do it now ...
65
+ collectAndHide();
66
+
67
+ // ... and after each chart redraw
68
+ addEvent(chart, 'redraw', collectAndHide);
69
+
70
+ });
71
+
72
+ /**
73
+ * Hide overlapping labels. Labels are moved and faded in and out on zoom to
74
+ * provide a smooth visual imression.
75
+ */
76
+ Chart.prototype.hideOverlappingLabels = function(labels) {
77
+
78
+ var len = labels.length,
79
+ label,
80
+ i,
81
+ j,
82
+ label1,
83
+ label2,
84
+ isIntersecting,
85
+ pos1,
86
+ pos2,
87
+ parent1,
88
+ parent2,
89
+ padding,
90
+ intersectRect = function(x1, y1, w1, h1, x2, y2, w2, h2) {
91
+ return !(
92
+ x2 > x1 + w1 ||
93
+ x2 + w2 < x1 ||
94
+ y2 > y1 + h1 ||
95
+ y2 + h2 < y1
96
+ );
97
+ };
98
+
99
+ // Mark with initial opacity
100
+ for (i = 0; i < len; i++) {
101
+ label = labels[i];
102
+ if (label) {
103
+ label.oldOpacity = label.opacity;
104
+ label.newOpacity = 1;
105
+ }
106
+ }
107
+
108
+ // Prevent a situation in a gradually rising slope, that each label will
109
+ // hide the previous one because the previous one always has lower rank.
110
+ labels.sort(function(a, b) {
111
+ return (b.labelrank || 0) - (a.labelrank || 0);
112
+ });
113
+
114
+ // Detect overlapping labels
115
+ for (i = 0; i < len; i++) {
116
+ label1 = labels[i];
117
+
118
+ for (j = i + 1; j < len; ++j) {
119
+ label2 = labels[j];
120
+ if (
121
+ label1 && label2 &&
122
+ label1 !== label2 && // #6465, polar chart with connectEnds
123
+ label1.placed && label2.placed &&
124
+ label1.newOpacity !== 0 && label2.newOpacity !== 0
125
+ ) {
126
+ pos1 = label1.alignAttr;
127
+ pos2 = label2.alignAttr;
128
+ // Different panes have different positions
129
+ parent1 = label1.parentGroup;
130
+ parent2 = label2.parentGroup;
131
+ // Substract the padding if no background or border (#4333)
132
+ padding = 2 * (label1.box ? 0 : label1.padding);
133
+ isIntersecting = intersectRect(
134
+ pos1.x + parent1.translateX,
135
+ pos1.y + parent1.translateY,
136
+ label1.width - padding,
137
+ label1.height - padding,
138
+ pos2.x + parent2.translateX,
139
+ pos2.y + parent2.translateY,
140
+ label2.width - padding,
141
+ label2.height - padding
142
+ );
143
+
144
+ if (isIntersecting) {
145
+ (label1.labelrank < label2.labelrank ? label1 : label2)
146
+ .newOpacity = 0;
147
+ }
148
+ }
149
+ }
150
+ }
151
+
152
+ // Hide or show
153
+ each(labels, function(label) {
154
+ var complete,
155
+ newOpacity;
156
+
157
+ if (label) {
158
+ newOpacity = label.newOpacity;
159
+
160
+ if (label.oldOpacity !== newOpacity && label.placed) {
161
+
162
+ // Make sure the label is completely hidden to avoid catching
163
+ // clicks (#4362)
164
+ if (newOpacity) {
165
+ label.show(true);
166
+ } else {
167
+ complete = function() {
168
+ label.hide();
169
+ };
170
+ }
171
+
172
+ // Animate or set the opacity
173
+ label.alignAttr.opacity = newOpacity;
174
+ label[label.isOld ? 'animate' : 'attr'](
175
+ label.alignAttr,
176
+ null,
177
+ complete
178
+ );
179
+
180
+ }
181
+ label.isOld = true;
182
+ }
183
+ });
184
+ };
185
+
186
+ }(Highcharts));
187
+ }));
@@ -0,0 +1,19 @@
1
+ /*
2
+ Highcharts JS v5.0.11 (2017-05-04)
3
+
4
+ (c) 2009-2017 Torstein Honsi
5
+
6
+ License: www.highcharts.com/license
7
+ */
8
+ (function(u){"object"===typeof module&&module.exports?module.exports=u:u(Highcharts)})(function(u){(function(q){function u(f,b,a,m,c,e){f=(e-b)*(a-f)-(m-b)*(c-f);return 0<f?!0:0>f?!1:!0}function v(f,b,a,m,c,e,d,l){return u(f,b,c,e,d,l)!==u(a,m,c,e,d,l)&&u(f,b,a,m,c,e)!==u(f,b,a,m,d,l)}function z(f,b,a,m,c,e,d,l){return v(f,b,f+a,b,c,e,d,l)||v(f+a,b,f+a,b+m,c,e,d,l)||v(f,b+m,f+a,b+m,c,e,d,l)||v(f,b,f,b+m,c,e,d,l)}function A(f){var b=this,a=Math.max(q.animObject(b.renderer.globalAnimation).duration,
9
+ 250),m=!b.hasRendered;f.apply(b,[].slice.call(arguments,1));b.labelSeries=[];clearTimeout(b.seriesLabelTimer);w(b.series,function(c){var e=c.labelBySeries,d=e&&e.closest;c.options.label.enabled&&c.visible&&(c.graph||c.area)&&(b.labelSeries.push(c),m&&(a=Math.max(a,q.animObject(c.options.animation).duration)),d&&(void 0!==d[0].plotX?e.animate({x:d[0].plotX+d[1],y:d[0].plotY+d[2]}):e.attr({opacity:0})))});b.seriesLabelTimer=setTimeout(function(){b.drawSeriesLabels()},a)}var B=q.wrap,w=q.each,D=q.extend,
10
+ x=q.isNumber,C=q.Series,E=q.SVGRenderer,y=q.Chart;q.setOptions({plotOptions:{series:{label:{enabled:!0,connectorAllowed:!0,connectorNeighbourDistance:24,styles:{fontWeight:"bold"}}}}});E.prototype.symbols.connector=function(f,b,a,m,c){var e=c&&c.anchorX;c=c&&c.anchorY;var d,l,h=a/2;x(e)&&x(c)&&(d=["M",e,c],l=b-c,0>l&&(l=-m-l),l<a&&(h=e<f+a/2?l:a-l),c>b+m?d.push("L",f+h,b+m):c<b?d.push("L",f+h,b):e<f?d.push("L",f,b+m/2):e>f+a&&d.push("L",f+a,b+m/2));return d||[]};C.prototype.getPointsOnGraph=function(){var f=
11
+ this.points,b,a,m=[],c,e,d,l;e=this.graph||this.area;d=e.element;var h=(b=this.chart.inverted)?this.yAxis.pos:this.xAxis.pos,n=b?this.xAxis.pos:this.yAxis.pos;if(this.getPointSpline&&d.getPointAtLength){e.toD&&(a=e.attr("d"),e.attr({d:e.toD}));l=d.getTotalLength();for(c=0;c<l;c+=16)b=d.getPointAtLength(c),m.push({chartX:h+b.x,chartY:n+b.y,plotX:b.x,plotY:b.y});a&&e.attr({d:a});b=f[f.length-1];b.chartX=h+b.plotX;b.chartY=n+b.plotY;m.push(b)}else for(l=f.length,c=0;c<l;c+=1){b=f[c];a=f[c-1];b.chartX=
12
+ h+b.plotX;b.chartY=n+b.plotY;if(0<c&&(e=Math.abs(b.chartX-a.chartX),d=Math.abs(b.chartY-a.chartY),e=Math.max(e,d),16<e))for(e=Math.ceil(e/16),d=1;d<e;d+=1)m.push({chartX:a.chartX+d/e*(b.chartX-a.chartX),chartY:a.chartY+d/e*(b.chartY-a.chartY),plotX:a.plotX+d/e*(b.plotX-a.plotX),plotY:a.plotY+d/e*(b.plotY-a.plotY)});x(b.plotY)&&m.push(b)}return m};C.prototype.checkClearPoint=function(f,b,a,m){var c=Number.MAX_VALUE,e=Number.MAX_VALUE,d,l,h=this.options.label.connectorAllowed,n=this.chart,p,g,r,k;for(r=
13
+ 0;r<n.boxesToAvoid.length;r+=1){g=n.boxesToAvoid[r];k=f+a.width;p=b;var q=b+a.height;if(!(f>g.right||k<g.left||p>g.bottom||q<g.top))return!1}for(r=0;r<n.series.length;r+=1)if(p=n.series[r],g=p.interpolatedPoints,p.visible&&g){for(k=1;k<g.length;k+=1){if(z(f,b,a.width,a.height,g[k-1].chartX,g[k-1].chartY,g[k].chartX,g[k].chartY))return!1;this===p&&!d&&m&&(d=z(f-16,b-16,a.width+32,a.height+32,g[k-1].chartX,g[k-1].chartY,g[k].chartX,g[k].chartY));this!==p&&(c=Math.min(c,Math.pow(f+a.width/2-g[k].chartX,
14
+ 2)+Math.pow(b+a.height/2-g[k].chartY,2),Math.pow(f-g[k].chartX,2)+Math.pow(b-g[k].chartY,2),Math.pow(f+a.width-g[k].chartX,2)+Math.pow(b-g[k].chartY,2),Math.pow(f+a.width-g[k].chartX,2)+Math.pow(b+a.height-g[k].chartY,2),Math.pow(f-g[k].chartX,2)+Math.pow(b+a.height-g[k].chartY,2)))}if(h&&this===p&&(m&&!d||c<Math.pow(this.options.label.connectorNeighbourDistance,2))){for(k=1;k<g.length;k+=1)d=Math.min(Math.pow(f+a.width/2-g[k].chartX,2)+Math.pow(b+a.height/2-g[k].chartY,2),Math.pow(f-g[k].chartX,
15
+ 2)+Math.pow(b-g[k].chartY,2),Math.pow(f+a.width-g[k].chartX,2)+Math.pow(b-g[k].chartY,2),Math.pow(f+a.width-g[k].chartX,2)+Math.pow(b+a.height-g[k].chartY,2),Math.pow(f-g[k].chartX,2)+Math.pow(b+a.height-g[k].chartY,2)),d<e&&(e=d,l=g[k]);d=!0}}return!m||d?{x:f,y:b,weight:c-(l?e:0),connectorPoint:l}:!1};y.prototype.drawSeriesLabels=function(){var f=this,b=this.labelSeries;f.boxesToAvoid=[];w(b,function(a){a.interpolatedPoints=a.getPointsOnGraph();w(a.options.label.boxesToAvoid||[],function(a){f.boxesToAvoid.push(a)})});
16
+ w(f.series,function(a){function b(a,b,c){return a>g&&a<=g+k-c.width&&b>=r&&b<=r+q-c.height}var c,e,d,l=[],h,n,p=f.inverted,g=p?a.yAxis.pos:a.xAxis.pos,r=p?a.xAxis.pos:a.yAxis.pos,k=f.inverted?a.yAxis.len:a.xAxis.len,q=f.inverted?a.xAxis.len:a.yAxis.len,t=a.interpolatedPoints,p=a.labelBySeries;if(a.visible&&t){p||(a.labelBySeries=p=f.renderer.label(a.name,0,-9999,"connector").css(D({color:a.color},a.options.label.styles)).attr({padding:0,opacity:0,stroke:a.color,"stroke-width":1}).add(a.group).animate({opacity:1},
17
+ {duration:200}));c=p.getBBox();c.width=Math.round(c.width);for(n=t.length-1;0<n;--n)e=t[n].chartX+3,d=t[n].chartY-c.height-3,b(e,d,c)&&(h=a.checkClearPoint(e,d,c)),h&&l.push(h),e=t[n].chartX+3,d=t[n].chartY+3,b(e,d,c)&&(h=a.checkClearPoint(e,d,c)),h&&l.push(h),e=t[n].chartX-c.width-3,d=t[n].chartY+3,b(e,d,c)&&(h=a.checkClearPoint(e,d,c)),h&&l.push(h),e=t[n].chartX-c.width-3,d=t[n].chartY-c.height-3,b(e,d,c)&&(h=a.checkClearPoint(e,d,c)),h&&l.push(h);if(!l.length)for(e=g+k-c.width;e>=g;e-=16)for(d=
18
+ r;d<r+q-c.height;d+=16)(h=a.checkClearPoint(e,d,c,!0))&&l.push(h);if(l.length){if(l.sort(function(a,b){return b.weight-a.weight}),h=l[0],f.boxesToAvoid.push({left:h.x,right:h.x+c.width,top:h.y,bottom:h.y+c.height}),Math.round(h.x)!==Math.round(p.x)||Math.round(h.y)!==Math.round(p.y))a.labelBySeries.attr({opacity:0,x:h.x-g,y:h.y-r,anchorX:h.connectorPoint&&h.connectorPoint.plotX,anchorY:h.connectorPoint&&h.connectorPoint.plotY}).animate({opacity:1}),a.options.kdNow=!0,a.buildKDTree(),a=a.searchPoint({chartX:h.x,
19
+ chartY:h.y},!0),p.closest=[a,h.x-g-a.plotX,h.y-r-a.plotY]}else p&&(a.labelBySeries=p.destroy())}})};B(y.prototype,"render",A);B(y.prototype,"redraw",A)})(u)});
@@ -0,0 +1,8 @@
1
+ {
2
+ "version":3,
3
+ "file":"",
4
+ "lineCount":19,
5
+ "mappings":"A;;;;;;;AAQC,SAAQ,CAACA,CAAD,CAAU,CACO,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,CACID,MAAAC,QADJ,C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charts","H","ccw","x1","y1","x2","y2","x3","y3","cw","intersectLine","x4","y4","boxIntersectLine","x","y","w","h","drawLabels","proceed","chart","delay","Math","max","animObject","renderer","globalAnimation","duration","initial","hasRendered","apply","slice","call","arguments","labelSeries","clearTimeout","seriesLabelTimer","each","series","label","labelBySeries","closest","options","enabled","visible","graph","area","push","animation","undefined","plotX","animate","plotY","attr","opacity","setTimeout","drawSeriesLabels","wrap","extend","isNumber","Series","SVGRenderer","Chart","setOptions","plotOptions","connectorAllowed","connectorNeighbourDistance","styles","fontWeight","prototype","symbols","connector","SVGRenderer.prototype.symbols.connector","anchorX","anchorY","path","yOffset","lateral","getPointsOnGraph","Series.prototype.getPointsOnGraph","points","point","last","interpolated","i","deltaX","deltaY","len","node","element","paneLeft","inverted","yAxis","pos","xAxis","paneTop","getPointSpline","getPointAtLength","toD","d","getTotalLength","distance","chartX","chartY","length","abs","delta","n","ceil","j","checkClearPoint","Series.prototype.checkClearPoint","bBox","checkDistance","distToOthersSquared","Number","MAX_VALUE","distToPointSquared","dist","connectorPoint","connectorEnabled","boxesToAvoid","width","height","r1","right","left","top","bottom","interpolatedPoints","withinRange","leastDistance","min","pow","weight","Chart.prototype.drawSeriesLabels","box","insidePane","paneWidth","paneHeight","results","clearPoint","name","css","color","padding","stroke","add","group","getBBox","round","labelDistance","best","sort","a","b","kdNow","buildKDTree","searchPoint","destroy"]
8
+ }
@@ -0,0 +1,606 @@
1
+ /**
2
+ * @license Highcharts JS v5.0.11 (2017-05-04)
3
+ *
4
+ * (c) 2009-2017 Torstein Honsi
5
+ *
6
+ * License: www.highcharts.com/license
7
+ */
8
+ 'use strict';
9
+ (function(factory) {
10
+ if (typeof module === 'object' && module.exports) {
11
+ module.exports = factory;
12
+ } else {
13
+ factory(Highcharts);
14
+ }
15
+ }(function(Highcharts) {
16
+ (function(H) {
17
+ /**
18
+ * (c) 2009-2017 Torstein Honsi
19
+ *
20
+ * License: www.highcharts.com/license
21
+ */
22
+ /**
23
+ * EXPERIMENTAL Highcharts module to place labels next to a series in a natural position.
24
+ *
25
+ * TODO:
26
+ * - add column support (box collision detection, boxesToAvoid logic)
27
+ * - other series types, area etc.
28
+ * - avoid data labels, when data labels above, show series label below.
29
+ * - add more options (connector, format, formatter)
30
+ *
31
+ * http://jsfiddle.net/highcharts/L2u9rpwr/
32
+ * http://jsfiddle.net/highcharts/y5A37/
33
+ * http://jsfiddle.net/highcharts/264Nm/
34
+ * http://jsfiddle.net/highcharts/y5A37/
35
+ */
36
+
37
+
38
+ var labelDistance = 3,
39
+ wrap = H.wrap,
40
+ each = H.each,
41
+ extend = H.extend,
42
+ isNumber = H.isNumber,
43
+ Series = H.Series,
44
+ SVGRenderer = H.SVGRenderer,
45
+ Chart = H.Chart;
46
+
47
+ H.setOptions({
48
+ plotOptions: {
49
+ series: {
50
+ label: {
51
+ enabled: true,
52
+ // Allow labels to be placed distant to the graph if necessary, and
53
+ // draw a connector line to the graph
54
+ connectorAllowed: true,
55
+ connectorNeighbourDistance: 24, // If the label is closer than this to a neighbour graph, draw a connector
56
+ styles: {
57
+ fontWeight: 'bold'
58
+ }
59
+ // boxesToAvoid: []
60
+ }
61
+ }
62
+ }
63
+ });
64
+
65
+ /**
66
+ * Counter-clockwise, part of the fast line intersection logic
67
+ */
68
+ function ccw(x1, y1, x2, y2, x3, y3) {
69
+ var cw = ((y3 - y1) * (x2 - x1)) - ((y2 - y1) * (x3 - x1));
70
+ return cw > 0 ? true : cw < 0 ? false : true;
71
+ }
72
+
73
+ /**
74
+ * Detect if two lines intersect
75
+ */
76
+ function intersectLine(x1, y1, x2, y2, x3, y3, x4, y4) {
77
+ return ccw(x1, y1, x3, y3, x4, y4) !== ccw(x2, y2, x3, y3, x4, y4) &&
78
+ ccw(x1, y1, x2, y2, x3, y3) !== ccw(x1, y1, x2, y2, x4, y4);
79
+ }
80
+
81
+ /**
82
+ * Detect if a box intersects with a line
83
+ */
84
+ function boxIntersectLine(x, y, w, h, x1, y1, x2, y2) {
85
+ return (
86
+ intersectLine(x, y, x + w, y, x1, y1, x2, y2) || // top of label
87
+ intersectLine(x + w, y, x + w, y + h, x1, y1, x2, y2) || // right of label
88
+ intersectLine(x, y + h, x + w, y + h, x1, y1, x2, y2) || // bottom of label
89
+ intersectLine(x, y, x, y + h, x1, y1, x2, y2) // left of label
90
+ );
91
+ }
92
+
93
+ /**
94
+ * General symbol definition for labels with connector
95
+ */
96
+ SVGRenderer.prototype.symbols.connector = function(x, y, w, h, options) {
97
+ var anchorX = options && options.anchorX,
98
+ anchorY = options && options.anchorY,
99
+ path,
100
+ yOffset,
101
+ lateral = w / 2;
102
+
103
+ if (isNumber(anchorX) && isNumber(anchorY)) {
104
+
105
+ path = ['M', anchorX, anchorY];
106
+
107
+ // Prefer 45 deg connectors
108
+ yOffset = y - anchorY;
109
+ if (yOffset < 0) {
110
+ yOffset = -h - yOffset;
111
+ }
112
+ if (yOffset < w) {
113
+ lateral = anchorX < x + (w / 2) ? yOffset : w - yOffset;
114
+ }
115
+
116
+ // Anchor below label
117
+ if (anchorY > y + h) {
118
+ path.push('L', x + lateral, y + h);
119
+
120
+ // Anchor above label
121
+ } else if (anchorY < y) {
122
+ path.push('L', x + lateral, y);
123
+
124
+ // Anchor left of label
125
+ } else if (anchorX < x) {
126
+ path.push('L', x, y + h / 2);
127
+
128
+ // Anchor right of label
129
+ } else if (anchorX > x + w) {
130
+ path.push('L', x + w, y + h / 2);
131
+ }
132
+ }
133
+ return path || [];
134
+ };
135
+
136
+ /**
137
+ * Points to avoid. In addition to actual data points, the label should avoid
138
+ * interpolated positions.
139
+ */
140
+ Series.prototype.getPointsOnGraph = function() {
141
+ var distance = 16,
142
+ points = this.points,
143
+ point,
144
+ last,
145
+ interpolated = [],
146
+ i,
147
+ deltaX,
148
+ deltaY,
149
+ delta,
150
+ len,
151
+ n,
152
+ j,
153
+ d,
154
+ graph = this.graph || this.area,
155
+ node = graph.element,
156
+ inverted = this.chart.inverted,
157
+ paneLeft = inverted ? this.yAxis.pos : this.xAxis.pos,
158
+ paneTop = inverted ? this.xAxis.pos : this.yAxis.pos;
159
+
160
+ // For splines, get the point at length (possible caveat: peaks are not correctly detected)
161
+ if (this.getPointSpline && node.getPointAtLength) {
162
+ // If it is animating towards a path definition, use that briefly, and reset
163
+ if (graph.toD) {
164
+ d = graph.attr('d');
165
+ graph.attr({
166
+ d: graph.toD
167
+ });
168
+ }
169
+ len = node.getTotalLength();
170
+ for (i = 0; i < len; i += distance) {
171
+ point = node.getPointAtLength(i);
172
+ interpolated.push({
173
+ chartX: paneLeft + point.x,
174
+ chartY: paneTop + point.y,
175
+ plotX: point.x,
176
+ plotY: point.y
177
+ });
178
+ }
179
+ if (d) {
180
+ graph.attr({
181
+ d: d
182
+ });
183
+ }
184
+ // Last point
185
+ point = points[points.length - 1];
186
+ point.chartX = paneLeft + point.plotX;
187
+ point.chartY = paneTop + point.plotY;
188
+ interpolated.push(point);
189
+
190
+ // Interpolate
191
+ } else {
192
+ len = points.length;
193
+ for (i = 0; i < len; i += 1) {
194
+
195
+ point = points[i];
196
+ last = points[i - 1];
197
+
198
+ // Absolute coordinates so we can compare different panes
199
+ point.chartX = paneLeft + point.plotX;
200
+ point.chartY = paneTop + point.plotY;
201
+
202
+ // Add interpolated points
203
+ if (i > 0) {
204
+ deltaX = Math.abs(point.chartX - last.chartX);
205
+ deltaY = Math.abs(point.chartY - last.chartY);
206
+ delta = Math.max(deltaX, deltaY);
207
+ if (delta > distance) {
208
+
209
+ n = Math.ceil(delta / distance);
210
+
211
+ for (j = 1; j < n; j += 1) {
212
+ interpolated.push({
213
+ chartX: last.chartX + (point.chartX - last.chartX) * (j / n),
214
+ chartY: last.chartY + (point.chartY - last.chartY) * (j / n),
215
+ plotX: last.plotX + (point.plotX - last.plotX) * (j / n),
216
+ plotY: last.plotY + (point.plotY - last.plotY) * (j / n)
217
+ });
218
+ }
219
+ }
220
+ }
221
+
222
+ // Add the real point in order to find positive and negative peaks
223
+ if (isNumber(point.plotY)) {
224
+ interpolated.push(point);
225
+ }
226
+ }
227
+ }
228
+ return interpolated;
229
+ };
230
+
231
+ /**
232
+ * Check whether a proposed label position is clear of other elements
233
+ */
234
+ Series.prototype.checkClearPoint = function(x, y, bBox, checkDistance) {
235
+ var distToOthersSquared = Number.MAX_VALUE, // distance to other graphs
236
+ distToPointSquared = Number.MAX_VALUE,
237
+ dist,
238
+ connectorPoint,
239
+ connectorEnabled = this.options.label.connectorAllowed,
240
+
241
+ chart = this.chart,
242
+ series,
243
+ points,
244
+ leastDistance = 16,
245
+ withinRange,
246
+ i,
247
+ j;
248
+
249
+ function intersectRect(r1, r2) {
250
+ return !(r2.left > r1.right ||
251
+ r2.right < r1.left ||
252
+ r2.top > r1.bottom ||
253
+ r2.bottom < r1.top);
254
+ }
255
+
256
+ /**
257
+ * Get the weight in order to determine the ideal position. Larger distance to
258
+ * other series gives more weight. Smaller distance to the actual point (connector points only)
259
+ * gives more weight.
260
+ */
261
+ function getWeight(distToOthersSquared, distToPointSquared) {
262
+ return distToOthersSquared - distToPointSquared;
263
+ }
264
+
265
+ // First check for collision with existing labels
266
+ for (i = 0; i < chart.boxesToAvoid.length; i += 1) {
267
+ if (intersectRect(chart.boxesToAvoid[i], {
268
+ left: x,
269
+ right: x + bBox.width,
270
+ top: y,
271
+ bottom: y + bBox.height
272
+ })) {
273
+ return false;
274
+ }
275
+ }
276
+
277
+ // For each position, check if the lines around the label intersect with any of the
278
+ // graphs
279
+ for (i = 0; i < chart.series.length; i += 1) {
280
+ series = chart.series[i];
281
+ points = series.interpolatedPoints;
282
+ if (series.visible && points) {
283
+ for (j = 1; j < points.length; j += 1) {
284
+ // If any of the box sides intersect with the line, return
285
+ if (boxIntersectLine(
286
+ x,
287
+ y,
288
+ bBox.width,
289
+ bBox.height,
290
+ points[j - 1].chartX,
291
+ points[j - 1].chartY,
292
+ points[j].chartX,
293
+ points[j].chartY
294
+ )) {
295
+ return false;
296
+ }
297
+
298
+ // But if it is too far away (a padded box doesn't intersect), also return
299
+ if (this === series && !withinRange && checkDistance) {
300
+ withinRange = boxIntersectLine(
301
+ x - leastDistance,
302
+ y - leastDistance,
303
+ bBox.width + 2 * leastDistance,
304
+ bBox.height + 2 * leastDistance,
305
+ points[j - 1].chartX,
306
+ points[j - 1].chartY,
307
+ points[j].chartX,
308
+ points[j].chartY
309
+ );
310
+ }
311
+
312
+ // Find the squared distance from the center of the label
313
+ if (this !== series) {
314
+ distToOthersSquared = Math.min(
315
+ distToOthersSquared,
316
+ Math.pow(x + bBox.width / 2 - points[j].chartX, 2) + Math.pow(y + bBox.height / 2 - points[j].chartY, 2),
317
+ Math.pow(x - points[j].chartX, 2) + Math.pow(y - points[j].chartY, 2),
318
+ Math.pow(x + bBox.width - points[j].chartX, 2) + Math.pow(y - points[j].chartY, 2),
319
+ Math.pow(x + bBox.width - points[j].chartX, 2) + Math.pow(y + bBox.height - points[j].chartY, 2),
320
+ Math.pow(x - points[j].chartX, 2) + Math.pow(y + bBox.height - points[j].chartY, 2)
321
+ );
322
+ }
323
+ }
324
+
325
+ // Do we need a connector?
326
+ if (connectorEnabled && this === series && ((checkDistance && !withinRange) ||
327
+ distToOthersSquared < Math.pow(this.options.label.connectorNeighbourDistance, 2))) {
328
+ for (j = 1; j < points.length; j += 1) {
329
+ dist = Math.min(
330
+ Math.pow(x + bBox.width / 2 - points[j].chartX, 2) + Math.pow(y + bBox.height / 2 - points[j].chartY, 2),
331
+ Math.pow(x - points[j].chartX, 2) + Math.pow(y - points[j].chartY, 2),
332
+ Math.pow(x + bBox.width - points[j].chartX, 2) + Math.pow(y - points[j].chartY, 2),
333
+ Math.pow(x + bBox.width - points[j].chartX, 2) + Math.pow(y + bBox.height - points[j].chartY, 2),
334
+ Math.pow(x - points[j].chartX, 2) + Math.pow(y + bBox.height - points[j].chartY, 2)
335
+ );
336
+ if (dist < distToPointSquared) {
337
+ distToPointSquared = dist;
338
+ connectorPoint = points[j];
339
+ }
340
+ }
341
+ withinRange = true;
342
+ }
343
+ }
344
+ }
345
+
346
+ return !checkDistance || withinRange ? {
347
+ x: x,
348
+ y: y,
349
+ weight: getWeight(distToOthersSquared, connectorPoint ? distToPointSquared : 0),
350
+ connectorPoint: connectorPoint
351
+ } : false;
352
+
353
+ };
354
+
355
+ /**
356
+ * The main initiator method that runs on chart level after initiation and redraw. It runs in
357
+ * a timeout to prevent locking, and loops over all series, taking all series and labels into
358
+ * account when placing the labels.
359
+ */
360
+ Chart.prototype.drawSeriesLabels = function() {
361
+ var chart = this,
362
+ labelSeries = this.labelSeries;
363
+
364
+ chart.boxesToAvoid = [];
365
+
366
+ // Build the interpolated points
367
+ each(labelSeries, function(series) {
368
+ series.interpolatedPoints = series.getPointsOnGraph();
369
+
370
+ each(series.options.label.boxesToAvoid || [], function(box) {
371
+ chart.boxesToAvoid.push(box);
372
+ });
373
+ });
374
+
375
+ each(chart.series, function(series) {
376
+ var bBox,
377
+ x,
378
+ y,
379
+ results = [],
380
+ clearPoint,
381
+ i,
382
+ best,
383
+ inverted = chart.inverted,
384
+ paneLeft = inverted ? series.yAxis.pos : series.xAxis.pos,
385
+ paneTop = inverted ? series.xAxis.pos : series.yAxis.pos,
386
+ paneWidth = chart.inverted ? series.yAxis.len : series.xAxis.len,
387
+ paneHeight = chart.inverted ? series.xAxis.len : series.yAxis.len,
388
+ points = series.interpolatedPoints,
389
+ label = series.labelBySeries;
390
+
391
+ function insidePane(x, y, bBox) {
392
+ return x > paneLeft && x <= paneLeft + paneWidth - bBox.width &&
393
+ y >= paneTop && y <= paneTop + paneHeight - bBox.height;
394
+ }
395
+
396
+ if (series.visible && points) {
397
+ if (!label) {
398
+ series.labelBySeries = label = chart.renderer
399
+ .label(series.name, 0, -9999, 'connector')
400
+ .css(extend({
401
+ color: series.color
402
+ }, series.options.label.styles))
403
+ .attr({
404
+ padding: 0,
405
+ opacity: 0,
406
+ stroke: series.color,
407
+ 'stroke-width': 1
408
+ })
409
+ .add(series.group)
410
+ .animate({
411
+ opacity: 1
412
+ }, {
413
+ duration: 200
414
+ });
415
+ }
416
+
417
+ bBox = label.getBBox();
418
+ bBox.width = Math.round(bBox.width);
419
+
420
+ // Ideal positions are centered above or below a point on right side
421
+ // of chart
422
+ for (i = points.length - 1; i > 0; i -= 1) {
423
+
424
+ // Right - up
425
+ x = points[i].chartX + labelDistance;
426
+ y = points[i].chartY - bBox.height - labelDistance;
427
+ if (insidePane(x, y, bBox)) {
428
+ best = series.checkClearPoint(
429
+ x,
430
+ y,
431
+ bBox
432
+ );
433
+ }
434
+ if (best) {
435
+ results.push(best);
436
+ }
437
+
438
+ // Right - down
439
+ x = points[i].chartX + labelDistance;
440
+ y = points[i].chartY + labelDistance;
441
+ if (insidePane(x, y, bBox)) {
442
+ best = series.checkClearPoint(
443
+ x,
444
+ y,
445
+ bBox
446
+ );
447
+ }
448
+ if (best) {
449
+ results.push(best);
450
+ }
451
+
452
+ // Left - down
453
+ x = points[i].chartX - bBox.width - labelDistance;
454
+ y = points[i].chartY + labelDistance;
455
+ if (insidePane(x, y, bBox)) {
456
+ best = series.checkClearPoint(
457
+ x,
458
+ y,
459
+ bBox
460
+ );
461
+ }
462
+ if (best) {
463
+ results.push(best);
464
+ }
465
+
466
+ // Left - up
467
+ x = points[i].chartX - bBox.width - labelDistance;
468
+ y = points[i].chartY - bBox.height - labelDistance;
469
+ if (insidePane(x, y, bBox)) {
470
+ best = series.checkClearPoint(
471
+ x,
472
+ y,
473
+ bBox
474
+ );
475
+ }
476
+ if (best) {
477
+ results.push(best);
478
+ }
479
+
480
+ }
481
+
482
+ // Brute force, try all positions on the chart in a 16x16 grid
483
+ if (!results.length) {
484
+ for (x = paneLeft + paneWidth - bBox.width; x >= paneLeft; x -= 16) {
485
+ for (y = paneTop; y < paneTop + paneHeight - bBox.height; y += 16) {
486
+ clearPoint = series.checkClearPoint(x, y, bBox, true);
487
+ if (clearPoint) {
488
+ results.push(clearPoint);
489
+ }
490
+ }
491
+ }
492
+ }
493
+
494
+ if (results.length) {
495
+
496
+ results.sort(function(a, b) {
497
+ return b.weight - a.weight;
498
+ });
499
+
500
+ best = results[0];
501
+
502
+ chart.boxesToAvoid.push({
503
+ left: best.x,
504
+ right: best.x + bBox.width,
505
+ top: best.y,
506
+ bottom: best.y + bBox.height
507
+ });
508
+
509
+ // Move it if needed
510
+ if (Math.round(best.x) !== Math.round(label.x) ||
511
+ Math.round(best.y) !== Math.round(label.y)) {
512
+ series.labelBySeries
513
+ .attr({
514
+ opacity: 0,
515
+ x: best.x - paneLeft,
516
+ y: best.y - paneTop,
517
+ anchorX: best.connectorPoint && best.connectorPoint.plotX,
518
+ anchorY: best.connectorPoint && best.connectorPoint.plotY
519
+ })
520
+ .animate({
521
+ opacity: 1
522
+ });
523
+
524
+ // Record closest point to stick to for sync redraw
525
+ series.options.kdNow = true;
526
+ series.buildKDTree();
527
+ var closest = series.searchPoint({
528
+ chartX: best.x,
529
+ chartY: best.y
530
+ }, true);
531
+ label.closest = [
532
+ closest,
533
+ best.x - paneLeft - closest.plotX,
534
+ best.y - paneTop - closest.plotY
535
+ ];
536
+
537
+ }
538
+
539
+ } else if (label) {
540
+ series.labelBySeries = label.destroy();
541
+ }
542
+ }
543
+ });
544
+ };
545
+
546
+ /**
547
+ * Prepare drawing series labels
548
+ */
549
+ function drawLabels(proceed) {
550
+
551
+ var chart = this,
552
+ delay = Math.max(
553
+ H.animObject(chart.renderer.globalAnimation).duration,
554
+ 250
555
+ ),
556
+ initial = !chart.hasRendered;
557
+
558
+ proceed.apply(chart, [].slice.call(arguments, 1));
559
+
560
+ chart.labelSeries = [];
561
+
562
+ clearTimeout(chart.seriesLabelTimer);
563
+
564
+ // Which series should have labels
565
+ each(chart.series, function(series) {
566
+ var options = series.options.label,
567
+ label = series.labelBySeries,
568
+ closest = label && label.closest;
569
+
570
+ if (options.enabled && series.visible && (series.graph || series.area)) {
571
+ chart.labelSeries.push(series);
572
+
573
+ // The labels are processing heavy, wait until the animation is done
574
+ if (initial) {
575
+ delay = Math.max(
576
+ delay,
577
+ H.animObject(series.options.animation).duration
578
+ );
579
+ }
580
+
581
+ // Keep the position updated to the axis while redrawing
582
+ if (closest) {
583
+ if (closest[0].plotX !== undefined) {
584
+ label.animate({
585
+ x: closest[0].plotX + closest[1],
586
+ y: closest[0].plotY + closest[2]
587
+ });
588
+ } else {
589
+ label.attr({
590
+ opacity: 0
591
+ });
592
+ }
593
+ }
594
+ }
595
+ });
596
+
597
+ chart.seriesLabelTimer = setTimeout(function() {
598
+ chart.drawSeriesLabels();
599
+ }, delay);
600
+
601
+ }
602
+ wrap(Chart.prototype, 'render', drawLabels);
603
+ wrap(Chart.prototype, 'redraw', drawLabels);
604
+
605
+ }(Highcharts));
606
+ }));