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.
- checksums.yaml +4 -4
- data/app/assets/css/highcharts.css +760 -0
- data/app/assets/javascripts/highstock.js +511 -419
- data/app/assets/javascripts/highstock/highstock.js +472 -0
- data/app/assets/javascripts/highstock/highstock.js.map +8 -0
- data/app/assets/javascripts/highstock/highstock.src.js +28809 -0
- data/app/assets/javascripts/highstock/modules/accessibility.js +48 -0
- data/app/assets/javascripts/highstock/modules/accessibility.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/accessibility.src.js +1131 -0
- data/app/assets/javascripts/highstock/modules/annotations.js +14 -0
- data/app/assets/javascripts/highstock/modules/annotations.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/annotations.src.js +407 -0
- data/app/assets/javascripts/highstock/modules/boost-canvas.js +23 -0
- data/app/assets/javascripts/highstock/modules/boost-canvas.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/boost-canvas.src.js +771 -0
- data/app/assets/javascripts/highstock/modules/boost.js +51 -12
- data/app/assets/javascripts/highstock/modules/boost.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/boost.src.js +2580 -492
- data/app/assets/javascripts/highstock/modules/broken-axis.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/canvasrenderer.experimental.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/data.js +19 -19
- data/app/assets/javascripts/highstock/modules/data.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/data.src.js +974 -950
- data/app/assets/javascripts/highstock/modules/drilldown.js +25 -17
- data/app/assets/javascripts/highstock/modules/drilldown.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/drilldown.src.js +790 -709
- data/app/assets/javascripts/highstock/modules/export-data.js +17 -0
- data/app/assets/javascripts/highstock/modules/export-data.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/export-data.src.js +417 -0
- data/app/assets/javascripts/highstock/modules/exporting.js +21 -18
- data/app/assets/javascripts/highstock/modules/exporting.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/exporting.src.js +1013 -768
- data/app/assets/javascripts/highstock/modules/funnel.js +6 -7
- data/app/assets/javascripts/highstock/modules/funnel.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/funnel.src.js +284 -308
- data/app/assets/javascripts/highstock/modules/gantt.js +24 -0
- data/app/assets/javascripts/highstock/modules/gantt.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/gantt.src.js +793 -0
- data/app/assets/javascripts/highstock/modules/grid-axis.js +19 -0
- data/app/assets/javascripts/highstock/modules/grid-axis.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/grid-axis.src.js +545 -0
- data/app/assets/javascripts/highstock/modules/heatmap.js +20 -18
- data/app/assets/javascripts/highstock/modules/heatmap.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/heatmap.src.js +738 -633
- data/app/assets/javascripts/highstock/modules/map-parser.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/map.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/no-data-to-display.js +5 -5
- data/app/assets/javascripts/highstock/modules/no-data-to-display.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/no-data-to-display.src.js +140 -133
- data/app/assets/javascripts/highstock/modules/offline-exporting.js +12 -7
- data/app/assets/javascripts/highstock/modules/offline-exporting.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/offline-exporting.src.js +543 -270
- data/app/assets/javascripts/highstock/modules/overlapping-datalabels.js +10 -0
- data/app/assets/javascripts/highstock/modules/overlapping-datalabels.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/overlapping-datalabels.src.js +187 -0
- data/app/assets/javascripts/highstock/modules/series-label.js +19 -0
- data/app/assets/javascripts/highstock/modules/series-label.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/series-label.src.js +606 -0
- data/app/assets/javascripts/highstock/modules/solid-gauge.js +9 -8
- data/app/assets/javascripts/highstock/modules/solid-gauge.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/solid-gauge.src.js +334 -266
- data/app/assets/javascripts/highstock/modules/static-scale.js +12 -0
- data/app/assets/javascripts/highstock/modules/static-scale.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/static-scale.src.js +64 -0
- data/app/assets/javascripts/highstock/modules/stock.js +123 -0
- data/app/assets/javascripts/highstock/modules/stock.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/stock.src.js +6247 -0
- data/app/assets/javascripts/highstock/modules/treemap.js +22 -23
- data/app/assets/javascripts/highstock/modules/treemap.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/treemap.src.js +884 -859
- data/app/assets/javascripts/highstock/modules/xrange-series.js +15 -0
- data/app/assets/javascripts/highstock/modules/xrange-series.js.map +8 -0
- data/app/assets/javascripts/highstock/modules/xrange-series.src.js +258 -0
- data/app/assets/javascripts/highstock/themes/dark-blue.js +307 -244
- data/app/assets/javascripts/highstock/themes/dark-green.js +303 -244
- data/app/assets/javascripts/highstock/themes/dark-unica.js +231 -201
- data/app/assets/javascripts/highstock/themes/gray.js +314 -245
- data/app/assets/javascripts/highstock/themes/grid-light.js +91 -66
- data/app/assets/javascripts/highstock/themes/grid.js +124 -96
- data/app/assets/javascripts/highstock/themes/sand-signika.js +119 -94
- data/app/assets/javascripts/highstock/themes/skies.js +108 -85
- data/lib/highstock/rails/version.rb +1 -1
- metadata +54 -11
- data/app/assets/javascripts/highstock/adapters/standalone-framework.js +0 -18
- data/app/assets/javascripts/highstock/adapters/standalone-framework.src.js +0 -635
- data/app/assets/javascripts/highstock/highcharts-3d.js +0 -48
- data/app/assets/javascripts/highstock/highcharts-3d.src.js +0 -1711
- data/app/assets/javascripts/highstock/highcharts-more.js +0 -55
- data/app/assets/javascripts/highstock/highstock-all.js +0 -637
- data/app/assets/javascripts/highstock/modules/canvas-tools.js +0 -133
- data/app/assets/javascripts/highstock/modules/canvas-tools.src.js +0 -3114
@@ -1,13 +1,12 @@
|
|
1
1
|
/*
|
2
|
-
|
2
|
+
Highcharts JS v5.0.11 (2017-05-04)
|
3
3
|
Highcharts funnel module
|
4
4
|
|
5
|
-
(c) 2010-
|
5
|
+
(c) 2010-2017 Torstein Honsi
|
6
6
|
|
7
7
|
License: www.highcharts.com/license
|
8
8
|
*/
|
9
|
-
(function(
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
2*b;o--;)f=a[o],c=(e=f.half)?1:-1,h=f.plotY,g=this.getX(h,e),f.labelPos=[0,h,g+(b-5)*c,h,g+b*c,h,e?"right":"left",0];r.pie.prototype.drawDataLabels.call(this)}});q.plotOptions.pyramid=b.merge(q.plotOptions.funnel,{neckWidth:"0%",neckHeight:"0%",reversed:!0});b.seriesTypes.pyramid=b.extendClass(b.seriesTypes.funnel,{type:"pyramid"})});
|
9
|
+
(function(e){"object"===typeof module&&module.exports?module.exports=e:e(Highcharts)})(function(e){(function(g){var e=g.seriesType,z=g.seriesTypes,H=g.noop,D=g.pick,I=g.each;e("funnel","pie",{animation:!1,center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,size:!0},{animate:H,translate:function(){var b=function(a,b){return/%$/.test(a)?b*parseInt(a,10)/100:parseInt(a,10)},E=0,c=this.chart,f=this.options,d=f.reversed,e=f.ignoreHiddenPoint,t=c.plotWidth,c=c.plotHeight,
|
10
|
+
q=0,g=f.center,h=b(g[0],t),r=b(g[1],c),z=b(f.width,t),l,v,m=b(f.height,c),w=b(f.neckWidth,t),F=b(f.neckHeight,c),x=r-m/2+m-F,b=this.data,A,B,D="left"===f.dataLabels.position?1:0,C,n,G,u,k,y,p;this.getWidthAt=v=function(a){var b=r-m/2;return a>x||m===F?w:w+(z-w)*(1-(a-b)/(m-F))};this.getX=function(a,b,c){return h+(b?-1:1)*(v(d?2*r-a:a)/2+c.labelDistance)};this.center=[h,r,m];this.centerX=h;I(b,function(a){e&&!1===a.visible||(E+=a.y)});I(b,function(a){p=null;B=E?a.y/E:0;n=r-m/2+q*m;k=n+B*m;l=v(n);C=
|
11
|
+
h-l/2;G=C+l;l=v(k);u=h-l/2;y=u+l;n>x?(C=u=h-w/2,G=y=h+w/2):k>x&&(p=k,l=v(x),u=h-l/2,y=u+l,k=x);d&&(n=2*r-n,k=2*r-k,p=p?2*r-p:null);A=["M",C,n,"L",G,n,y,k];p&&A.push(y,p,u,p);A.push(u,k,"Z");a.shapeType="path";a.shapeArgs={d:A};a.percentage=100*B;a.plotX=h;a.plotY=(n+(p||k))/2;a.tooltipPos=[h,a.plotY];a.slice=H;a.half=D;e&&!1===a.visible||(q+=B)})},drawPoints:z.column.prototype.drawPoints,sortByAngle:function(b){b.sort(function(b,c){return b.plotY-c.plotY})},drawDataLabels:function(){var b=this.data,
|
12
|
+
e=this.options.dataLabels.distance,c,f,d,g=b.length,t,q;for(this.center[2]-=2*e;g--;)d=b[g],f=(c=d.half)?1:-1,q=d.plotY,d.labelDistance=D(d.options.dataLabels&&d.options.dataLabels.distance,e),this.maxLabelDistance=Math.max(d.labelDistance,this.maxLabelDistance||0),t=this.getX(q,c,d),d.labelPos=[0,q,t+(d.labelDistance-5)*f,q,t+d.labelDistance*f,q,c?"right":"left",0];z.pie.prototype.drawDataLabels.call(this)}});e("pyramid","funnel",{neckWidth:"0%",neckHeight:"0%",reversed:!0})})(e)});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{
|
2
|
+
"version":3,
|
3
|
+
"file":"",
|
4
|
+
"lineCount":12,
|
5
|
+
"mappings":"A;;;;;;;;AASC,SAAQ,CAACA,CAAD,CAAU,CACO,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,CACID,MAAAC,QADJ,CACqBF,CADrB,CAGIA,CAAA,CAAQG,UAAR,CAJW,CAAlB,CAAA,CAMC,QAAQ,CAACA,CAAD,CAAa,CAClB,SAAQ,CAACA,CAAD,CAAa,CAAA,IAWdC,EAAaD,CAAAC,WAXC,CAYdC,EAAcF,CAAAE,YAZA,CAadC,EAAOH,CAAAG,KAbO,CAcdC,EAAOJ,CAAAI,KAdO,CAedC,EAAOL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ADPD,CACO,CADItB,CAAAd,KACJ,EAAW,CAAX,CAAgB,EAWvB,CAVAU,CAUA,CAVII,CAAAS,MAUJ,CATAT,CAAAC,cASA,CATsBhD,CAAA,CAClB+C,CAAA3B,QAAAc,WADkB,EACUa,CAAA3B,QAAAc,WAAAkC,SADV,CAElBpB,CAFkB,CAStB,CA9BS7B,IA0BTsD,iBAIA,CAJ0BC,IAAAC,IAAA,CAAS5B,CAAAC,cAAT,CA1BjB7B,IA0B+CsD,iBAA9B,EAAyD,CAAzD,CAI1B,CAHAD,CAGA,CA9BSrD,IA2BL0B,KAAA,CAAYF,CAAZ,CAAe0B,CAAf,CAAyBtB,CAAzB,CAGJ,CAAAA,CAAA6B,SAAA,CAAiB,CACb,CADa,CAEbjC,CAFa,CAGb6B,CAHa,EAGRzB,CAAAC,cAHQ,CAGc,CAHd,EAGmBsB,CAHnB,CAIb3B,CAJa,CAKb6B,CALa,CAKTzB,CAAAC,cALS,CAKasB,CALb,CAMb3B,CANa,CAOb0B,CAAA,CAAW,OAAX,CAAqB,MAPR,CAQb,CARa,CAYrBvE,EAAA+E,IAAAhB,UAAAM,eAAAW,KAAA,CAA8C,IAA9C,CA3CuB,CA9L/B,CAdJ,CAgQAjF,EAAA,CAAW,SAAX,CAAsB,QAAtB,CAAgC,CAC5BQ,UAAW,IADiB,CAE5BE,WAAY,IAFgB,CAG5BC,SAAU,CAAA,CAHkB,CAAhC,CAlRkB,CAArB,CAAA,CAwRCZ,CAxRD,CADkB,CANtB;",
|
6
|
+
"sources":["Input_0"],
|
7
|
+
"names":["factory","module","exports","Highcharts","seriesType","seriesTypes","noop","pick","each","animation","center","width","neckWidth","height","neckHeight","reversed","size","animate","translate","getLength","length","relativeTo","test","parseInt","sum","chart","series","options","ignoreHiddenPoint","plotWidth","plotHeight","cumulative","centerX","centerY","tempWidth","getWidthAt","neckY","data","path","fraction","half","dataLabels","position","x1","y1","x2","x3","y3","x4","y5","y","top","getX","series.getX","point","labelDistance","visible","push","shapeType","shapeArgs","d","percentage","plotX","plotY","tooltipPos","slice","drawPoints","column","prototype","sortByAngle","points","sort","a","b","drawDataLabels","distance","leftSide","sign","i","x","maxLabelDistance","Math","max","labelPos","pie","call"]
|
8
|
+
}
|
@@ -1,322 +1,298 @@
|
|
1
1
|
/**
|
2
|
-
* @license
|
2
|
+
* @license Highcharts JS v5.0.11 (2017-05-04)
|
3
3
|
* Highcharts funnel module
|
4
4
|
*
|
5
|
-
* (c) 2010-
|
5
|
+
* (c) 2010-2017 Torstein Honsi
|
6
6
|
*
|
7
7
|
* License: www.highcharts.com/license
|
8
8
|
*/
|
9
|
-
|
10
|
-
(function
|
9
|
+
'use strict';
|
10
|
+
(function(factory) {
|
11
11
|
if (typeof module === 'object' && module.exports) {
|
12
12
|
module.exports = factory;
|
13
13
|
} else {
|
14
14
|
factory(Highcharts);
|
15
15
|
}
|
16
|
-
}(function
|
17
|
-
|
18
|
-
|
16
|
+
}(function(Highcharts) {
|
17
|
+
(function(Highcharts) {
|
18
|
+
/**
|
19
|
+
* Highcharts funnel module
|
20
|
+
*
|
21
|
+
* (c) 2010-2017 Torstein Honsi
|
22
|
+
*
|
23
|
+
* License: www.highcharts.com/license
|
24
|
+
*/
|
25
|
+
/* eslint indent:0 */
|
19
26
|
|
20
|
-
// create shortcuts
|
21
|
-
var
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
x = this.getX(y, leftSide);
|
290
|
-
|
291
|
-
// set the anchor point for data labels
|
292
|
-
point.labelPos = [
|
293
|
-
0, // first break of connector
|
294
|
-
y, // a/a
|
295
|
-
x + (labelDistance - 5) * sign, // second break, right outside point shape
|
296
|
-
y, // a/a
|
297
|
-
x + labelDistance * sign, // landing point for connector
|
298
|
-
y, // a/a
|
299
|
-
leftSide ? 'right' : 'left', // alignment
|
300
|
-
0 // center angle
|
301
|
-
];
|
302
|
-
}
|
303
|
-
|
304
|
-
seriesTypes.pie.prototype.drawDataLabels.call(this);
|
305
|
-
}
|
306
|
-
|
307
|
-
});
|
308
|
-
|
309
|
-
/**
|
310
|
-
* Pyramid series type.
|
311
|
-
* A pyramid series is a special type of funnel, without neck and reversed by default.
|
312
|
-
*/
|
313
|
-
defaultOptions.plotOptions.pyramid = Highcharts.merge(defaultOptions.plotOptions.funnel, {
|
314
|
-
neckWidth: '0%',
|
315
|
-
neckHeight: '0%',
|
316
|
-
reversed: true
|
317
|
-
});
|
318
|
-
Highcharts.seriesTypes.pyramid = Highcharts.extendClass(Highcharts.seriesTypes.funnel, {
|
319
|
-
type: 'pyramid'
|
320
|
-
});
|
27
|
+
// create shortcuts
|
28
|
+
var seriesType = Highcharts.seriesType,
|
29
|
+
seriesTypes = Highcharts.seriesTypes,
|
30
|
+
noop = Highcharts.noop,
|
31
|
+
pick = Highcharts.pick,
|
32
|
+
each = Highcharts.each;
|
33
|
+
|
34
|
+
|
35
|
+
seriesType('funnel', 'pie', {
|
36
|
+
animation: false,
|
37
|
+
center: ['50%', '50%'],
|
38
|
+
width: '90%',
|
39
|
+
neckWidth: '30%',
|
40
|
+
height: '100%',
|
41
|
+
neckHeight: '25%',
|
42
|
+
reversed: false,
|
43
|
+
size: true, // to avoid adapting to data label size in Pie.drawDataLabels
|
44
|
+
|
45
|
+
|
46
|
+
},
|
47
|
+
|
48
|
+
// Properties
|
49
|
+
{
|
50
|
+
animate: noop,
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Overrides the pie translate method
|
54
|
+
*/
|
55
|
+
translate: function() {
|
56
|
+
|
57
|
+
var
|
58
|
+
// Get positions - either an integer or a percentage string must be given
|
59
|
+
getLength = function(length, relativeTo) {
|
60
|
+
return (/%$/).test(length) ?
|
61
|
+
relativeTo * parseInt(length, 10) / 100 :
|
62
|
+
parseInt(length, 10);
|
63
|
+
},
|
64
|
+
|
65
|
+
sum = 0,
|
66
|
+
series = this,
|
67
|
+
chart = series.chart,
|
68
|
+
options = series.options,
|
69
|
+
reversed = options.reversed,
|
70
|
+
ignoreHiddenPoint = options.ignoreHiddenPoint,
|
71
|
+
plotWidth = chart.plotWidth,
|
72
|
+
plotHeight = chart.plotHeight,
|
73
|
+
cumulative = 0, // start at top
|
74
|
+
center = options.center,
|
75
|
+
centerX = getLength(center[0], plotWidth),
|
76
|
+
centerY = getLength(center[1], plotHeight),
|
77
|
+
width = getLength(options.width, plotWidth),
|
78
|
+
tempWidth,
|
79
|
+
getWidthAt,
|
80
|
+
height = getLength(options.height, plotHeight),
|
81
|
+
neckWidth = getLength(options.neckWidth, plotWidth),
|
82
|
+
neckHeight = getLength(options.neckHeight, plotHeight),
|
83
|
+
neckY = (centerY - height / 2) + height - neckHeight,
|
84
|
+
data = series.data,
|
85
|
+
path,
|
86
|
+
fraction,
|
87
|
+
half = options.dataLabels.position === 'left' ? 1 : 0,
|
88
|
+
|
89
|
+
x1,
|
90
|
+
y1,
|
91
|
+
x2,
|
92
|
+
x3,
|
93
|
+
y3,
|
94
|
+
x4,
|
95
|
+
y5;
|
96
|
+
|
97
|
+
// Return the width at a specific y coordinate
|
98
|
+
series.getWidthAt = getWidthAt = function(y) {
|
99
|
+
var top = (centerY - height / 2);
|
100
|
+
|
101
|
+
return y > neckY || height === neckHeight ?
|
102
|
+
neckWidth :
|
103
|
+
neckWidth + (width - neckWidth) * (1 - (y - top) / (height - neckHeight));
|
104
|
+
};
|
105
|
+
series.getX = function(y, half, point) {
|
106
|
+
return centerX + (half ? -1 : 1) * ((getWidthAt(reversed ? 2 * centerY - y : y) / 2) + point.labelDistance);
|
107
|
+
};
|
108
|
+
|
109
|
+
// Expose
|
110
|
+
series.center = [centerX, centerY, height];
|
111
|
+
series.centerX = centerX;
|
112
|
+
|
113
|
+
/*
|
114
|
+
* Individual point coordinate naming:
|
115
|
+
*
|
116
|
+
* x1,y1 _________________ x2,y1
|
117
|
+
* \ /
|
118
|
+
* \ /
|
119
|
+
* \ /
|
120
|
+
* \ /
|
121
|
+
* \ /
|
122
|
+
* x3,y3 _________ x4,y3
|
123
|
+
*
|
124
|
+
* Additional for the base of the neck:
|
125
|
+
*
|
126
|
+
* | |
|
127
|
+
* | |
|
128
|
+
* | |
|
129
|
+
* x3,y5 _________ x4,y5
|
130
|
+
*/
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
// get the total sum
|
136
|
+
each(data, function(point) {
|
137
|
+
if (!ignoreHiddenPoint || point.visible !== false) {
|
138
|
+
sum += point.y;
|
139
|
+
}
|
140
|
+
});
|
141
|
+
|
142
|
+
each(data, function(point) {
|
143
|
+
// set start and end positions
|
144
|
+
y5 = null;
|
145
|
+
fraction = sum ? point.y / sum : 0;
|
146
|
+
y1 = centerY - height / 2 + cumulative * height;
|
147
|
+
y3 = y1 + fraction * height;
|
148
|
+
//tempWidth = neckWidth + (width - neckWidth) * ((height - neckHeight - y1) / (height - neckHeight));
|
149
|
+
tempWidth = getWidthAt(y1);
|
150
|
+
x1 = centerX - tempWidth / 2;
|
151
|
+
x2 = x1 + tempWidth;
|
152
|
+
tempWidth = getWidthAt(y3);
|
153
|
+
x3 = centerX - tempWidth / 2;
|
154
|
+
x4 = x3 + tempWidth;
|
155
|
+
|
156
|
+
// the entire point is within the neck
|
157
|
+
if (y1 > neckY) {
|
158
|
+
x1 = x3 = centerX - neckWidth / 2;
|
159
|
+
x2 = x4 = centerX + neckWidth / 2;
|
160
|
+
|
161
|
+
// the base of the neck
|
162
|
+
} else if (y3 > neckY) {
|
163
|
+
y5 = y3;
|
164
|
+
|
165
|
+
tempWidth = getWidthAt(neckY);
|
166
|
+
x3 = centerX - tempWidth / 2;
|
167
|
+
x4 = x3 + tempWidth;
|
168
|
+
|
169
|
+
y3 = neckY;
|
170
|
+
}
|
171
|
+
|
172
|
+
if (reversed) {
|
173
|
+
y1 = 2 * centerY - y1;
|
174
|
+
y3 = 2 * centerY - y3;
|
175
|
+
y5 = (y5 ? 2 * centerY - y5 : null);
|
176
|
+
}
|
177
|
+
// save the path
|
178
|
+
path = [
|
179
|
+
'M',
|
180
|
+
x1, y1,
|
181
|
+
'L',
|
182
|
+
x2, y1,
|
183
|
+
x4, y3
|
184
|
+
];
|
185
|
+
if (y5) {
|
186
|
+
path.push(x4, y5, x3, y5);
|
187
|
+
}
|
188
|
+
path.push(x3, y3, 'Z');
|
189
|
+
|
190
|
+
// prepare for using shared dr
|
191
|
+
point.shapeType = 'path';
|
192
|
+
point.shapeArgs = {
|
193
|
+
d: path
|
194
|
+
};
|
195
|
+
|
196
|
+
|
197
|
+
// for tooltips and data labels
|
198
|
+
point.percentage = fraction * 100;
|
199
|
+
point.plotX = centerX;
|
200
|
+
point.plotY = (y1 + (y5 || y3)) / 2;
|
201
|
+
|
202
|
+
// Placement of tooltips and data labels
|
203
|
+
point.tooltipPos = [
|
204
|
+
centerX,
|
205
|
+
point.plotY
|
206
|
+
];
|
207
|
+
|
208
|
+
// Slice is a noop on funnel points
|
209
|
+
point.slice = noop;
|
210
|
+
|
211
|
+
// Mimicking pie data label placement logic
|
212
|
+
point.half = half;
|
213
|
+
|
214
|
+
if (!ignoreHiddenPoint || point.visible !== false) {
|
215
|
+
cumulative += fraction;
|
216
|
+
}
|
217
|
+
});
|
218
|
+
},
|
219
|
+
/**
|
220
|
+
* Draw a single point (wedge)
|
221
|
+
* @param {Object} point The point object
|
222
|
+
* @param {Object} color The color of the point
|
223
|
+
* @param {Number} brightness The brightness relative to the color
|
224
|
+
*/
|
225
|
+
drawPoints: seriesTypes.column.prototype.drawPoints,
|
226
|
+
|
227
|
+
/**
|
228
|
+
* Funnel items don't have angles (#2289)
|
229
|
+
*/
|
230
|
+
sortByAngle: function(points) {
|
231
|
+
points.sort(function(a, b) {
|
232
|
+
return a.plotY - b.plotY;
|
233
|
+
});
|
234
|
+
},
|
235
|
+
|
236
|
+
/**
|
237
|
+
* Extend the pie data label method
|
238
|
+
*/
|
239
|
+
drawDataLabels: function() {
|
240
|
+
var series = this,
|
241
|
+
data = series.data,
|
242
|
+
labelDistance = series.options.dataLabels.distance,
|
243
|
+
leftSide,
|
244
|
+
sign,
|
245
|
+
point,
|
246
|
+
i = data.length,
|
247
|
+
x,
|
248
|
+
y;
|
249
|
+
|
250
|
+
// In the original pie label anticollision logic, the slots are distributed
|
251
|
+
// from one labelDistance above to one labelDistance below the pie. In funnels
|
252
|
+
// we don't want this.
|
253
|
+
series.center[2] -= 2 * labelDistance;
|
254
|
+
|
255
|
+
// Set the label position array for each point.
|
256
|
+
while (i--) {
|
257
|
+
point = data[i];
|
258
|
+
leftSide = point.half;
|
259
|
+
sign = leftSide ? 1 : -1;
|
260
|
+
y = point.plotY;
|
261
|
+
point.labelDistance = pick(
|
262
|
+
point.options.dataLabels && point.options.dataLabels.distance,
|
263
|
+
labelDistance
|
264
|
+
);
|
265
|
+
|
266
|
+
series.maxLabelDistance = Math.max(point.labelDistance, series.maxLabelDistance || 0);
|
267
|
+
x = series.getX(y, leftSide, point);
|
268
|
+
|
269
|
+
// set the anchor point for data labels
|
270
|
+
point.labelPos = [
|
271
|
+
0, // first break of connector
|
272
|
+
y, // a/a
|
273
|
+
x + (point.labelDistance - 5) * sign, // second break, right outside point shape
|
274
|
+
y, // a/a
|
275
|
+
x + point.labelDistance * sign, // landing point for connector
|
276
|
+
y, // a/a
|
277
|
+
leftSide ? 'right' : 'left', // alignment
|
278
|
+
0 // center angle
|
279
|
+
];
|
280
|
+
}
|
281
|
+
|
282
|
+
seriesTypes.pie.prototype.drawDataLabels.call(this);
|
283
|
+
}
|
284
|
+
|
285
|
+
});
|
286
|
+
|
287
|
+
/**
|
288
|
+
* Pyramid series type.
|
289
|
+
* A pyramid series is a special type of funnel, without neck and reversed by default.
|
290
|
+
*/
|
291
|
+
seriesType('pyramid', 'funnel', {
|
292
|
+
neckWidth: '0%',
|
293
|
+
neckHeight: '0%',
|
294
|
+
reversed: true
|
295
|
+
});
|
321
296
|
|
297
|
+
}(Highcharts));
|
322
298
|
}));
|