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
@@ -1,14 +1,15 @@
1
1
  /*
2
- Highstock JS v2.1.10 (2015-12-07)
2
+ Highcharts JS v5.0.11 (2017-05-04)
3
3
  Solid angular gauge module
4
4
 
5
- (c) 2010-2014 Torstein Honsi
5
+ (c) 2010-2017 Torstein Honsi
6
6
 
7
7
  License: www.highcharts.com/license
8
8
  */
9
- (function(a){typeof module==="object"&&module.exports?module.exports=a:a(Highcharts)})(function(a){var q=a.getOptions().plotOptions,r=a.pInt,s=a.pick,j=a.each,k;q.solidgauge=a.merge(q.gauge,{colorByPoint:!0});k={initDataClasses:function(b){var c=this,l=this.chart,d,g=0,e=this.options;this.dataClasses=d=[];j(b.dataClasses,function(f,h){var p,f=a.merge(f);d.push(f);if(!f.color)e.dataClassColor==="category"?(p=l.options.colors,f.color=p[g++],g===p.length&&(g=0)):f.color=c.tweenColors(a.Color(e.minColor),
10
- a.Color(e.maxColor),h/(b.dataClasses.length-1))})},initStops:function(b){this.stops=b.stops||[[0,this.options.minColor],[1,this.options.maxColor]];j(this.stops,function(b){b.color=a.Color(b[1])})},toColor:function(b,c){var a,d=this.stops,g,e=this.dataClasses,f,h;if(e)for(h=e.length;h--;){if(f=e[h],g=f.from,d=f.to,(g===void 0||b>=g)&&(d===void 0||b<=d)){a=f.color;if(c)c.dataClass=h;break}}else{this.isLog&&(b=this.val2lin(b));a=1-(this.max-b)/(this.max-this.min);for(h=d.length;h--;)if(a>d[h][0])break;
11
- g=d[h]||d[h+1];d=d[h+1]||g;a=1-(d[0]-a)/(d[0]-g[0]||1);a=this.tweenColors(g.color,d.color,a)}return a},tweenColors:function(b,c,a){var d;!c.rgba.length||!b.rgba.length?b=c.input||"none":(b=b.rgba,c=c.rgba,d=c[3]!==1||b[3]!==1,b=(d?"rgba(":"rgb(")+Math.round(c[0]+(b[0]-c[0])*(1-a))+","+Math.round(c[1]+(b[1]-c[1])*(1-a))+","+Math.round(c[2]+(b[2]-c[2])*(1-a))+(d?","+(c[3]+(b[3]-c[3])*(1-a)):"")+")");return b}};j(["fill","stroke"],function(b){a.addAnimSetter(b,function(c){c.elem.attr(b,k.tweenColors(a.Color(c.start),
12
- a.Color(c.end),c.pos))})});a.seriesTypes.solidgauge=a.extendClass(a.seriesTypes.gauge,{type:"solidgauge",pointAttrToOptions:{},bindAxes:function(){var b;a.seriesTypes.gauge.prototype.bindAxes.call(this);b=this.yAxis;a.extend(b,k);b.options.dataClasses&&b.initDataClasses(b.options);b.initStops(b.options)},drawPoints:function(){var b=this,c=b.yAxis,l=c.center,d=b.options,g=b.chart.renderer,e=d.overshoot,f=e&&typeof e==="number"?e/180*Math.PI:0;a.each(b.points,function(a){var e=a.graphic,i=c.startAngleRad+
13
- c.translate(a.y,null,null,null,!0),j=r(s(a.options.radius,d.radius,100))*l[2]/200,m=r(s(a.options.innerRadius,d.innerRadius,60))*l[2]/200,n=c.toColor(a.y,a),o=Math.min(c.startAngleRad,c.endAngleRad),k=Math.max(c.startAngleRad,c.endAngleRad);n==="none"&&(n=a.color||b.color||"none");if(n!=="none")a.color=n;i=Math.max(o-f,Math.min(k+f,i));d.wrap===!1&&(i=Math.max(o,Math.min(k,i)));o=Math.min(i,c.startAngleRad);i=Math.max(i,c.startAngleRad);i-o>2*Math.PI&&(i=o+2*Math.PI);a.shapeArgs=m={x:l[0],y:l[1],
14
- r:j,innerR:m,start:o,end:i,fill:n};a.startR=j;if(e){if(a=m.d,e.animate(m),a)m.d=a}else a.graphic=g.arc(m).attr({stroke:d.borderColor||"none","stroke-width":d.borderWidth||0,fill:n,"sweep-flag":0}).add(b.group)})},animate:function(b){if(!b)this.startAngleRad=this.yAxis.startAngleRad,a.seriesTypes.pie.prototype.animate.call(this,b)}})});
9
+ (function(l){"object"===typeof module&&module.exports?module.exports=l:l(Highcharts)})(function(l){(function(f){var l=f.pInt,u=f.pick,m=f.each,v=f.isNumber,w=f.wrap,n;w(f.Renderer.prototype.symbols,"arc",function(a,c,e,d,f,g){a=a(c,e,d,f,g);g.rounded&&(d=((g.r||d)-g.innerR)/2,g=["A",d,d,0,1,1,a[12],a[13]],a.splice.apply(a,[a.length-1,0].concat(["A",d,d,0,1,1,a[1],a[2]])),a.splice.apply(a,[11,3].concat(g)));return a});n={initDataClasses:function(a){var c=this,e=this.chart,d,t=0,g=this.options;this.dataClasses=
10
+ d=[];m(a.dataClasses,function(h,b){h=f.merge(h);d.push(h);h.color||("category"===g.dataClassColor?(b=e.options.colors,h.color=b[t++],t===b.length&&(t=0)):h.color=c.tweenColors(f.color(g.minColor),f.color(g.maxColor),b/(a.dataClasses.length-1)))})},initStops:function(a){this.stops=a.stops||[[0,this.options.minColor],[1,this.options.maxColor]];m(this.stops,function(a){a.color=f.color(a[1])})},toColor:function(a,c){var e=this.stops,d,f,g=this.dataClasses,h,b;if(g)for(b=g.length;b--;){if(h=g[b],d=h.from,
11
+ e=h.to,(void 0===d||a>=d)&&(void 0===e||a<=e)){f=h.color;c&&(c.dataClass=b);break}}else{this.isLog&&(a=this.val2lin(a));a=1-(this.max-a)/(this.max-this.min);for(b=e.length;b--&&!(a>e[b][0]););d=e[b]||e[b+1];e=e[b+1]||d;a=1-(e[0]-a)/(e[0]-d[0]||1);f=this.tweenColors(d.color,e.color,a)}return f},tweenColors:function(a,c,e){var d;c.rgba.length&&a.rgba.length?(a=a.rgba,c=c.rgba,d=1!==c[3]||1!==a[3],a=(d?"rgba(":"rgb(")+Math.round(c[0]+(a[0]-c[0])*(1-e))+","+Math.round(c[1]+(a[1]-c[1])*(1-e))+","+Math.round(c[2]+
12
+ (a[2]-c[2])*(1-e))+(d?","+(c[3]+(a[3]-c[3])*(1-e)):"")+")"):a=c.input||"none";return a}};m(["fill","stroke"],function(a){f.Fx.prototype[a+"Setter"]=function(){this.elem.attr(a,n.tweenColors(f.color(this.start),f.color(this.end),this.pos),null,!0)}});f.seriesType("solidgauge","gauge",{colorByPoint:!0},{translate:function(){var a=this.yAxis;f.extend(a,n);!a.dataClasses&&a.options.dataClasses&&a.initDataClasses(a.options);a.initStops(a.options);f.seriesTypes.gauge.prototype.translate.call(this)},drawPoints:function(){var a=
13
+ this,c=a.yAxis,e=c.center,d=a.options,t=a.chart.renderer,g=d.overshoot,h=v(g)?g/180*Math.PI:0,b;v(d.threshold)&&(b=c.startAngleRad+c.translate(d.threshold,null,null,null,!0));this.thresholdAngleRad=u(b,c.startAngleRad);m(a.points,function(b){var g=b.graphic,k=c.startAngleRad+c.translate(b.y,null,null,null,!0),m=l(u(b.options.radius,d.radius,100))*e[2]/200,p=l(u(b.options.innerRadius,d.innerRadius,60))*e[2]/200,q=c.toColor(b.y,b),r=Math.min(c.startAngleRad,c.endAngleRad),n=Math.max(c.startAngleRad,
14
+ c.endAngleRad);"none"===q&&(q=b.color||a.color||"none");"none"!==q&&(b.color=q);k=Math.max(r-h,Math.min(n+h,k));!1===d.wrap&&(k=Math.max(r,Math.min(n,k)));r=Math.min(k,a.thresholdAngleRad);k=Math.max(k,a.thresholdAngleRad);k-r>2*Math.PI&&(k=r+2*Math.PI);b.shapeArgs=p={x:e[0],y:e[1],r:m,innerR:p,start:r,end:k,rounded:d.rounded};b.startR=m;g?(b=p.d,g.animate(f.extend({fill:q},p)),b&&(p.d=b)):b.graphic=t.arc(p).addClass(b.getClassName(),!0).attr({fill:q,"sweep-flag":0}).add(a.group)})},animate:function(a){a||
15
+ (this.startAngleRad=this.thresholdAngleRad,f.seriesTypes.pie.prototype.animate.call(this,a))}})})(l)});
@@ -0,0 +1,8 @@
1
+ {
2
+ "version":3,
3
+ "file":"",
4
+ "lineCount":15,
5
+ "mappings":"A;;;;;;;;AASC,SAAQ,CAACA,CAAD,CAAU,CACO,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,CACID,MAAAC,QADJ,CACqBF,CADrB,CAGIA,CA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,CAFM,CAAA2D,IAAA,CAMP3B,CAAA4B,MANO,CAvDY,CAApC,CAvBmB,CAvBxB,CAqHCN,QAASA,QAAQ,CAACO,CAAD,CAAO,CAEfA,CAAL;CACI,IAAArB,cACA,CADqB,IAAAF,kBACrB,CAAAxF,CAAA8E,YAAAkC,IAAAxG,UAAAgG,QAAAxB,KAAA,CAAyC,IAAzC,CAA+C+B,CAA/C,CAFJ,CAFoB,CArHzB,CAHH,CAlMS,CAAZ,CAAA,CAmUChH,CAnUD,CADkB,CANtB;",
6
+ "sources":["Input_0"],
7
+ "names":["factory","module","exports","Highcharts","H","pInt","pick","each","isNumber","wrap","colorAxisMethods","Renderer","prototype","symbols","proceed","x","y","w","h","options","path","rounded","smallR","r","innerR","roundEnd","x2","y2","splice","apply","length","concat","roundStart","x1","y1","initDataClasses","userOptions","axis","chart","dataClasses","colorCounter","dataClass","i","merge","push","color","dataClassColor","colors","tweenColors","minColor","maxColor","initStops","stops","stop","toColor","value","point","from","to","undefined","isLog","val2lin","pos","max","min","hasAlpha","rgba","ret","Math","round","input","prop","Fx","elem","attr","start","end","seriesType","colorByPoint","translate","yAxis","extend","seriesTypes","gauge","call","drawPoints","series","center","renderer","overshoot","overshootVal","PI","thresholdAngleRad","threshold","startAngleRad","points","graphic","rotation","radius","innerRadius","axisMinAngle","endAngleRad","axisMaxAngle","minAngle","maxAngle","shapeArgs","startR","d","animate","fill","arc","addClass","getClassName","add","group","init","pie"]
8
+ }
@@ -1,273 +1,341 @@
1
1
  /**
2
- * @license Highstock JS v2.1.10 (2015-12-07)
2
+ * @license Highcharts JS v5.0.11 (2017-05-04)
3
3
  * Solid angular gauge module
4
4
  *
5
- * (c) 2010-2014 Torstein Honsi
5
+ * (c) 2010-2017 Torstein Honsi
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
9
-
10
- (function (factory) {
11
- if (typeof module === 'object' && module.exports) {
12
- module.exports = factory;
13
- } else {
14
- factory(Highcharts);
15
- }
16
- }(function (H) {
17
- 'use strict';
18
-
19
- var defaultPlotOptions = H.getOptions().plotOptions,
20
- pInt = H.pInt,
21
- pick = H.pick,
22
- each = H.each,
23
- colorAxisMethods,
24
- UNDEFINED;
25
-
26
- // The default options
27
- defaultPlotOptions.solidgauge = H.merge(defaultPlotOptions.gauge, {
28
- colorByPoint: true
29
- });
30
-
31
-
32
- // These methods are defined in the ColorAxis object, and copied here.
33
- // If we implement an AMD system we should make ColorAxis a dependency.
34
- colorAxisMethods = {
35
-
36
-
37
- initDataClasses: function (userOptions) {
38
- var axis = this,
39
- chart = this.chart,
40
- dataClasses,
41
- colorCounter = 0,
42
- options = this.options;
43
- this.dataClasses = dataClasses = [];
44
-
45
- each(userOptions.dataClasses, function (dataClass, i) {
46
- var colors;
47
-
48
- dataClass = H.merge(dataClass);
49
- dataClasses.push(dataClass);
50
- if (!dataClass.color) {
51
- if (options.dataClassColor === 'category') {
52
- colors = chart.options.colors;
53
- dataClass.color = colors[colorCounter++];
54
- // loop back to zero
55
- if (colorCounter === colors.length) {
56
- colorCounter = 0;
57
- }
58
- } else {
59
- dataClass.color = axis.tweenColors(H.Color(options.minColor), H.Color(options.maxColor), i / (userOptions.dataClasses.length - 1));
60
- }
61
- }
62
- });
63
- },
64
-
65
- initStops: function (userOptions) {
66
- this.stops = userOptions.stops || [
67
- [0, this.options.minColor],
68
- [1, this.options.maxColor]
69
- ];
70
- each(this.stops, function (stop) {
71
- stop.color = H.Color(stop[1]);
72
- });
73
- },
74
- /**
75
- * Translate from a value to a color
76
- */
77
- toColor: function (value, point) {
78
- var pos,
79
- stops = this.stops,
80
- from,
81
- to,
82
- color,
83
- dataClasses = this.dataClasses,
84
- dataClass,
85
- i;
86
-
87
- if (dataClasses) {
88
- i = dataClasses.length;
89
- while (i--) {
90
- dataClass = dataClasses[i];
91
- from = dataClass.from;
92
- to = dataClass.to;
93
- if ((from === UNDEFINED || value >= from) && (to === UNDEFINED || value <= to)) {
94
- color = dataClass.color;
95
- if (point) {
96
- point.dataClass = i;
97
- }
98
- break;
99
- }
100
- }
101
-
102
- } else {
103
-
104
- if (this.isLog) {
105
- value = this.val2lin(value);
106
- }
107
- pos = 1 - ((this.max - value) / (this.max - this.min));
108
- i = stops.length;
109
- while (i--) {
110
- if (pos > stops[i][0]) {
111
- break;
112
- }
113
- }
114
- from = stops[i] || stops[i + 1];
115
- to = stops[i + 1] || from;
116
-
117
- // The position within the gradient
118
- pos = 1 - (to[0] - pos) / ((to[0] - from[0]) || 1);
119
-
120
- color = this.tweenColors(
121
- from.color,
122
- to.color,
123
- pos
124
- );
125
- }
126
- return color;
127
- },
128
- /*
129
- * Return an intermediate color between two colors, according to pos where 0
130
- * is the from color and 1 is the to color.
131
- */
132
- tweenColors: function (from, to, pos) {
133
- // Check for has alpha, because rgba colors perform worse due to lack of
134
- // support in WebKit.
135
- var hasAlpha,
136
- ret;
137
-
138
- // Unsupported color, return to-color (#3920)
139
- if (!to.rgba.length || !from.rgba.length) {
140
- ret = to.input || 'none';
141
-
142
- // Interpolate
143
- } else {
144
- from = from.rgba;
145
- to = to.rgba;
146
- hasAlpha = (to[3] !== 1 || from[3] !== 1);
147
- ret = (hasAlpha ? 'rgba(' : 'rgb(') +
148
- Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
149
- Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
150
- Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
151
- (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
152
- }
153
- return ret;
154
- }
155
- };
156
-
157
- /**
158
- * Handle animation of the color attributes directly
159
- */
160
- each(['fill', 'stroke'], function (prop) {
161
- H.addAnimSetter(prop, function (fx) {
162
- fx.elem.attr(prop, colorAxisMethods.tweenColors(H.Color(fx.start), H.Color(fx.end), fx.pos));
163
- });
164
- });
165
-
166
- // The series prototype
167
- H.seriesTypes.solidgauge = H.extendClass(H.seriesTypes.gauge, {
168
- type: 'solidgauge',
169
- pointAttrToOptions: {}, // #4301, don't inherit line marker's attribs
170
- bindAxes: function () {
171
- var axis;
172
- H.seriesTypes.gauge.prototype.bindAxes.call(this);
173
-
174
- axis = this.yAxis;
175
- H.extend(axis, colorAxisMethods);
176
-
177
- // Prepare data classes
178
- if (axis.options.dataClasses) {
179
- axis.initDataClasses(axis.options);
180
- }
181
- axis.initStops(axis.options);
182
- },
183
-
184
- /**
185
- * Draw the points where each point is one needle
186
- */
187
- drawPoints: function () {
188
- var series = this,
189
- yAxis = series.yAxis,
190
- center = yAxis.center,
191
- options = series.options,
192
- renderer = series.chart.renderer,
193
- overshoot = options.overshoot,
194
- overshootVal = overshoot && typeof overshoot === 'number' ? overshoot / 180 * Math.PI : 0;
195
-
196
- H.each(series.points, function (point) {
197
- var graphic = point.graphic,
198
- rotation = yAxis.startAngleRad + yAxis.translate(point.y, null, null, null, true),
199
- radius = (pInt(pick(point.options.radius, options.radius, 100)) * center[2]) / 200,
200
- innerRadius = (pInt(pick(point.options.innerRadius, options.innerRadius, 60)) * center[2]) / 200,
201
- shapeArgs,
202
- d,
203
- toColor = yAxis.toColor(point.y, point),
204
- axisMinAngle = Math.min(yAxis.startAngleRad, yAxis.endAngleRad),
205
- axisMaxAngle = Math.max(yAxis.startAngleRad, yAxis.endAngleRad),
206
- minAngle,
207
- maxAngle;
208
-
209
- if (toColor === 'none') { // #3708
210
- toColor = point.color || series.color || 'none';
211
- }
212
- if (toColor !== 'none') {
213
- point.color = toColor;
214
- }
215
-
216
- // Handle overshoot and clipping to axis max/min
217
- rotation = Math.max(axisMinAngle - overshootVal, Math.min(axisMaxAngle + overshootVal, rotation));
218
-
219
- // Handle the wrap option
220
- if (options.wrap === false) {
221
- rotation = Math.max(axisMinAngle, Math.min(axisMaxAngle, rotation));
222
- }
223
-
224
- minAngle = Math.min(rotation, yAxis.startAngleRad);
225
- maxAngle = Math.max(rotation, yAxis.startAngleRad);
226
-
227
- if (maxAngle - minAngle > 2 * Math.PI) {
228
- maxAngle = minAngle + 2 * Math.PI;
229
- }
230
-
231
- point.shapeArgs = shapeArgs = {
232
- x: center[0],
233
- y: center[1],
234
- r: radius,
235
- innerR: innerRadius,
236
- start: minAngle,
237
- end: maxAngle,
238
- fill: toColor
239
- };
240
- point.startR = radius; // For PieSeries.animate
241
-
242
- if (graphic) {
243
- d = shapeArgs.d;
244
- graphic.animate(shapeArgs);
245
- if (d) {
246
- shapeArgs.d = d; // animate alters it
247
- }
248
- } else {
249
- point.graphic = renderer.arc(shapeArgs)
250
- .attr({
251
- stroke: options.borderColor || 'none',
252
- 'stroke-width': options.borderWidth || 0,
253
- fill: toColor,
254
- 'sweep-flag': 0
255
- })
256
- .add(series.group);
257
- }
258
- });
259
- },
260
-
261
- /**
262
- * Extend the pie slice animation by animating from start angle and up
263
- */
264
- animate: function (init) {
265
-
266
- if (!init) {
267
- this.startAngleRad = this.yAxis.startAngleRad;
268
- H.seriesTypes.pie.prototype.animate.call(this, init);
269
- }
270
- }
271
- });
272
-
9
+ 'use strict';
10
+ (function(factory) {
11
+ if (typeof module === 'object' && module.exports) {
12
+ module.exports = factory;
13
+ } else {
14
+ factory(Highcharts);
15
+ }
16
+ }(function(Highcharts) {
17
+ (function(H) {
18
+ /**
19
+ * Solid angular gauge module
20
+ *
21
+ * (c) 2010-2017 Torstein Honsi
22
+ *
23
+ * License: www.highcharts.com/license
24
+ */
25
+
26
+
27
+ var pInt = H.pInt,
28
+ pick = H.pick,
29
+ each = H.each,
30
+ isNumber = H.isNumber,
31
+ wrap = H.wrap,
32
+ Renderer = H.Renderer,
33
+ colorAxisMethods;
34
+
35
+ /**
36
+ * Symbol definition of an arc with round edges.
37
+ *
38
+ * @param {Number} x - The X coordinate for the top left position.
39
+ * @param {Number} y - The Y coordinate for the top left position.
40
+ * @param {Number} w - The pixel width.
41
+ * @param {Number} h - The pixel height.
42
+ * @param {Object} [options] - Additional options, depending on the actual
43
+ * symbol drawn.
44
+ * @param {boolean} [options.rounded] - Whether to draw rounded edges.
45
+ * @return {Array} Path of the created arc.
46
+ */
47
+ wrap(Renderer.prototype.symbols, 'arc', function(proceed, x, y, w, h, options) {
48
+ var arc = proceed,
49
+ path = arc(x, y, w, h, options);
50
+ if (options.rounded) {
51
+ var r = options.r || w,
52
+ smallR = (r - options.innerR) / 2,
53
+ x1 = path[1],
54
+ y1 = path[2],
55
+ x2 = path[12],
56
+ y2 = path[13],
57
+ roundStart = ['A', smallR, smallR, 0, 1, 1, x1, y1],
58
+ roundEnd = ['A', smallR, smallR, 0, 1, 1, x2, y2];
59
+ // Insert rounded edge on end, and remove line.
60
+ path.splice.apply(path, [path.length - 1, 0].concat(roundStart));
61
+ // Insert rounded edge on end, and remove line.
62
+ path.splice.apply(path, [11, 3].concat(roundEnd));
63
+ }
64
+ return path;
65
+ });
66
+
67
+ // These methods are defined in the ColorAxis object, and copied here.
68
+ // If we implement an AMD system we should make ColorAxis a dependency.
69
+ colorAxisMethods = {
70
+
71
+
72
+ initDataClasses: function(userOptions) {
73
+ var axis = this,
74
+ chart = this.chart,
75
+ dataClasses,
76
+ colorCounter = 0,
77
+ options = this.options;
78
+ this.dataClasses = dataClasses = [];
79
+
80
+ each(userOptions.dataClasses, function(dataClass, i) {
81
+ var colors;
82
+
83
+ dataClass = H.merge(dataClass);
84
+ dataClasses.push(dataClass);
85
+ if (!dataClass.color) {
86
+ if (options.dataClassColor === 'category') {
87
+ colors = chart.options.colors;
88
+ dataClass.color = colors[colorCounter++];
89
+ // loop back to zero
90
+ if (colorCounter === colors.length) {
91
+ colorCounter = 0;
92
+ }
93
+ } else {
94
+ dataClass.color = axis.tweenColors(H.color(options.minColor), H.color(options.maxColor), i / (userOptions.dataClasses.length - 1));
95
+ }
96
+ }
97
+ });
98
+ },
99
+
100
+ initStops: function(userOptions) {
101
+ this.stops = userOptions.stops || [
102
+ [0, this.options.minColor],
103
+ [1, this.options.maxColor]
104
+ ];
105
+ each(this.stops, function(stop) {
106
+ stop.color = H.color(stop[1]);
107
+ });
108
+ },
109
+ /**
110
+ * Translate from a value to a color
111
+ */
112
+ toColor: function(value, point) {
113
+ var pos,
114
+ stops = this.stops,
115
+ from,
116
+ to,
117
+ color,
118
+ dataClasses = this.dataClasses,
119
+ dataClass,
120
+ i;
121
+
122
+ if (dataClasses) {
123
+ i = dataClasses.length;
124
+ while (i--) {
125
+ dataClass = dataClasses[i];
126
+ from = dataClass.from;
127
+ to = dataClass.to;
128
+ if ((from === undefined || value >= from) && (to === undefined || value <= to)) {
129
+ color = dataClass.color;
130
+ if (point) {
131
+ point.dataClass = i;
132
+ }
133
+ break;
134
+ }
135
+ }
136
+
137
+ } else {
138
+
139
+ if (this.isLog) {
140
+ value = this.val2lin(value);
141
+ }
142
+ pos = 1 - ((this.max - value) / (this.max - this.min));
143
+ i = stops.length;
144
+ while (i--) {
145
+ if (pos > stops[i][0]) {
146
+ break;
147
+ }
148
+ }
149
+ from = stops[i] || stops[i + 1];
150
+ to = stops[i + 1] || from;
151
+
152
+ // The position within the gradient
153
+ pos = 1 - (to[0] - pos) / ((to[0] - from[0]) || 1);
154
+
155
+ color = this.tweenColors(
156
+ from.color,
157
+ to.color,
158
+ pos
159
+ );
160
+ }
161
+ return color;
162
+ },
163
+ /*
164
+ * Return an intermediate color between two colors, according to pos where 0
165
+ * is the from color and 1 is the to color.
166
+ */
167
+ tweenColors: function(from, to, pos) {
168
+ // Check for has alpha, because rgba colors perform worse due to lack of
169
+ // support in WebKit.
170
+ var hasAlpha,
171
+ ret;
172
+
173
+ // Unsupported color, return to-color (#3920)
174
+ if (!to.rgba.length || !from.rgba.length) {
175
+ ret = to.input || 'none';
176
+
177
+ // Interpolate
178
+ } else {
179
+ from = from.rgba;
180
+ to = to.rgba;
181
+ hasAlpha = (to[3] !== 1 || from[3] !== 1);
182
+ ret = (hasAlpha ? 'rgba(' : 'rgb(') +
183
+ Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
184
+ Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
185
+ Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
186
+ (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
187
+ }
188
+ return ret;
189
+ }
190
+ };
191
+
192
+ /**
193
+ * Handle animation of the color attributes directly
194
+ */
195
+ each(['fill', 'stroke'], function(prop) {
196
+ H.Fx.prototype[prop + 'Setter'] = function() {
197
+ this.elem.attr(
198
+ prop,
199
+ colorAxisMethods.tweenColors(
200
+ H.color(this.start),
201
+ H.color(this.end),
202
+ this.pos
203
+ ),
204
+ null,
205
+ true
206
+ );
207
+ };
208
+ });
209
+
210
+ // The solidgauge series type
211
+ H.seriesType('solidgauge', 'gauge', {
212
+ colorByPoint: true
213
+
214
+ }, {
215
+
216
+ /**
217
+ * Extend the translate function to extend the Y axis with the necessary
218
+ * decoration (#5895).
219
+ */
220
+ translate: function() {
221
+ var axis = this.yAxis;
222
+ H.extend(axis, colorAxisMethods);
223
+
224
+ // Prepare data classes
225
+ if (!axis.dataClasses && axis.options.dataClasses) {
226
+ axis.initDataClasses(axis.options);
227
+ }
228
+ axis.initStops(axis.options);
229
+
230
+ // Generate points and inherit data label position
231
+ H.seriesTypes.gauge.prototype.translate.call(this);
232
+ },
233
+
234
+ /**
235
+ * Draw the points where each point is one needle
236
+ */
237
+ drawPoints: function() {
238
+ var series = this,
239
+ yAxis = series.yAxis,
240
+ center = yAxis.center,
241
+ options = series.options,
242
+ renderer = series.chart.renderer,
243
+ overshoot = options.overshoot,
244
+ overshootVal = isNumber(overshoot) ? overshoot / 180 * Math.PI : 0,
245
+ thresholdAngleRad;
246
+
247
+ // Handle the threshold option
248
+ if (isNumber(options.threshold)) {
249
+ thresholdAngleRad = yAxis.startAngleRad + yAxis.translate(
250
+ options.threshold,
251
+ null,
252
+ null,
253
+ null,
254
+ true
255
+ );
256
+ }
257
+ this.thresholdAngleRad = pick(thresholdAngleRad, yAxis.startAngleRad);
258
+
259
+
260
+ each(series.points, function(point) {
261
+ var graphic = point.graphic,
262
+ rotation = yAxis.startAngleRad + yAxis.translate(point.y, null, null, null, true),
263
+ radius = (pInt(pick(point.options.radius, options.radius, 100)) * center[2]) / 200,
264
+ innerRadius = (pInt(pick(point.options.innerRadius, options.innerRadius, 60)) * center[2]) / 200,
265
+ shapeArgs,
266
+ d,
267
+ toColor = yAxis.toColor(point.y, point),
268
+ axisMinAngle = Math.min(yAxis.startAngleRad, yAxis.endAngleRad),
269
+ axisMaxAngle = Math.max(yAxis.startAngleRad, yAxis.endAngleRad),
270
+ minAngle,
271
+ maxAngle;
272
+
273
+ if (toColor === 'none') { // #3708
274
+ toColor = point.color || series.color || 'none';
275
+ }
276
+ if (toColor !== 'none') {
277
+ point.color = toColor;
278
+ }
279
+
280
+ // Handle overshoot and clipping to axis max/min
281
+ rotation = Math.max(axisMinAngle - overshootVal, Math.min(axisMaxAngle + overshootVal, rotation));
282
+
283
+ // Handle the wrap option
284
+ if (options.wrap === false) {
285
+ rotation = Math.max(axisMinAngle, Math.min(axisMaxAngle, rotation));
286
+ }
287
+
288
+ minAngle = Math.min(rotation, series.thresholdAngleRad);
289
+ maxAngle = Math.max(rotation, series.thresholdAngleRad);
290
+
291
+ if (maxAngle - minAngle > 2 * Math.PI) {
292
+ maxAngle = minAngle + 2 * Math.PI;
293
+ }
294
+
295
+ point.shapeArgs = shapeArgs = {
296
+ x: center[0],
297
+ y: center[1],
298
+ r: radius,
299
+ innerR: innerRadius,
300
+ start: minAngle,
301
+ end: maxAngle,
302
+ rounded: options.rounded
303
+ };
304
+ point.startR = radius; // For PieSeries.animate
305
+
306
+ if (graphic) {
307
+ d = shapeArgs.d;
308
+ graphic.animate(H.extend({
309
+ fill: toColor
310
+ }, shapeArgs));
311
+ if (d) {
312
+ shapeArgs.d = d; // animate alters it
313
+ }
314
+ } else {
315
+ point.graphic = renderer.arc(shapeArgs)
316
+ .addClass(point.getClassName(), true)
317
+ .attr({
318
+ fill: toColor,
319
+ 'sweep-flag': 0
320
+ })
321
+ .add(series.group);
322
+
323
+
324
+ }
325
+ });
326
+ },
327
+
328
+ /**
329
+ * Extend the pie slice animation by animating from start angle and up
330
+ */
331
+ animate: function(init) {
332
+
333
+ if (!init) {
334
+ this.startAngleRad = this.thresholdAngleRad;
335
+ H.seriesTypes.pie.prototype.animate.call(this, init);
336
+ }
337
+ }
338
+ });
339
+
340
+ }(Highcharts));
273
341
  }));