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,17 +1,25 @@
1
- (function(d){typeof module==="object"&&module.exports?module.exports=d:d(Highcharts)})(function(d){function A(b,a,c){var e;!a.rgba.length||!b.rgba.length?b=a.input||"none":(b=b.rgba,a=a.rgba,e=a[3]!==1||b[3]!==1,b=(e?"rgba(":"rgb(")+Math.round(a[0]+(b[0]-a[0])*(1-c))+","+Math.round(a[1]+(b[1]-a[1])*(1-c))+","+Math.round(a[2]+(b[2]-a[2])*(1-c))+(e?","+(a[3]+(b[3]-a[3])*(1-c)):"")+")");return b}var t=function(){},q=d.getOptions(),h=d.each,l=d.extend,B=d.format,u=d.pick,r=d.wrap,m=d.Chart,p=d.seriesTypes,
2
- v=p.pie,n=p.column,w=d.Tick,x=d.fireEvent,y=d.inArray,z=1;h(["fill","stroke"],function(b){d.addAnimSetter(b,function(a){a.elem.attr(b,A(d.Color(a.start),d.Color(a.end),a.pos))})});l(q.lang,{drillUpText:"\u25c1 Back to {series.name}"});q.drilldown={activeAxisLabelStyle:{cursor:"pointer",color:"#0d233a",fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",color:"#0d233a",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",
3
- x:-10,y:10}}};d.SVGRenderer.prototype.Element.prototype.fadeIn=function(b){this.attr({opacity:0.1,visibility:"inherit"}).animate({opacity:u(this.newOpacity,1)},b||{duration:250})};m.prototype.addSeriesAsDrilldown=function(b,a){this.addSingleSeriesAsDrilldown(b,a);this.applyDrilldown()};m.prototype.addSingleSeriesAsDrilldown=function(b,a){var c=b.series,e=c.xAxis,g=c.yAxis,f;f=b.color||c.color;var i,d=[],j=[],k,o;if(!this.drilldownLevels)this.drilldownLevels=[];k=c.options._levelNumber||0;(o=this.drilldownLevels[this.drilldownLevels.length-
4
- 1])&&o.levelNumber!==k&&(o=void 0);a=l({color:f,_ddSeriesId:z++},a);i=y(b,c.points);h(c.chart.series,function(a){if(a.xAxis===e&&!a.isDrilling)a.options._ddSeriesId=a.options._ddSeriesId||z++,a.options._colorIndex=a.userOptions._colorIndex,a.options._levelNumber=a.options._levelNumber||k,o?(d=o.levelSeries,j=o.levelSeriesOptions):(d.push(a),j.push(a.options))});f={levelNumber:k,seriesOptions:c.options,levelSeriesOptions:j,levelSeries:d,shapeArgs:b.shapeArgs,bBox:b.graphic?b.graphic.getBBox():{},color:f,
5
- lowerSeriesOptions:a,pointOptions:c.options.data[i],pointIndex:i,oldExtremes:{xMin:e&&e.userMin,xMax:e&&e.userMax,yMin:g&&g.userMin,yMax:g&&g.userMax}};this.drilldownLevels.push(f);f=f.lowerSeries=this.addSeries(a,!1);f.options._levelNumber=k+1;if(e)e.oldPos=e.pos,e.userMin=e.userMax=null,g.userMin=g.userMax=null;if(c.type===f.type)f.animate=f.animateDrilldown||t,f.options.animation=!0};m.prototype.applyDrilldown=function(){var b=this.drilldownLevels,a;if(b&&b.length>0)a=b[b.length-1].levelNumber,
6
- h(this.drilldownLevels,function(b){b.levelNumber===a&&h(b.levelSeries,function(b){b.options&&b.options._levelNumber===a&&b.remove(!1)})});this.redraw();this.showDrillUpButton()};m.prototype.getDrilldownBackText=function(){var b=this.drilldownLevels;if(b&&b.length>0)return b=b[b.length-1],b.series=b.seriesOptions,B(this.options.lang.drillUpText,b)};m.prototype.showDrillUpButton=function(){var b=this,a=this.getDrilldownBackText(),c=b.options.drilldown.drillUpButton,e,g;this.drillUpButton?this.drillUpButton.attr({text:a}).align():
7
- (g=(e=c.theme)&&e.states,this.drillUpButton=this.renderer.button(a,null,null,function(){b.drillUp()},e,g&&g.hover,g&&g.select).attr({align:c.position.align,zIndex:9}).add().align(c.position,!1,c.relativeTo||"plotBox"))};m.prototype.drillUp=function(){for(var b=this,a=b.drilldownLevels,c=a[a.length-1].levelNumber,e=a.length,g=b.series,f,i,d,j,k=function(a){var c;h(g,function(b){b.options._ddSeriesId===a._ddSeriesId&&(c=b)});c=c||b.addSeries(a,!1);if(c.type===d.type&&c.animateDrillupTo)c.animate=c.animateDrillupTo;
8
- a===i.seriesOptions&&(j=c)};e--;)if(i=a[e],i.levelNumber===c){a.pop();d=i.lowerSeries;if(!d.chart)for(f=g.length;f--;)if(g[f].options.id===i.lowerSeriesOptions.id&&g[f].options._levelNumber===c+1){d=g[f];break}d.xData=[];h(i.levelSeriesOptions,k);x(b,"drillup",{seriesOptions:i.seriesOptions});if(j.type===d.type)j.drilldownLevel=i,j.options.animation=b.options.drilldown.animation,d.animateDrillupFrom&&d.chart&&d.animateDrillupFrom(i);j.options._levelNumber=c;d.remove(!1);if(j.xAxis)f=i.oldExtremes,
9
- j.xAxis.setExtremes(f.xMin,f.xMax,!1),j.yAxis.setExtremes(f.yMin,f.yMax,!1)}this.redraw();this.drilldownLevels.length===0?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align();this.ddDupes.length=[]};n.prototype.supportsDrilldown=!0;n.prototype.animateDrillupTo=function(b){if(!b){var a=this,c=a.drilldownLevel;h(this.points,function(a){a.graphic&&a.graphic.hide();a.dataLabel&&a.dataLabel.hide();a.connector&&a.connector.hide()});setTimeout(function(){a.points&&
10
- h(a.points,function(a,b){var f=b===(c&&c.pointIndex)?"show":"fadeIn",d=f==="show"?!0:void 0;if(a.graphic)a.graphic[f](d);if(a.dataLabel)a.dataLabel[f](d);if(a.connector)a.connector[f](d)})},Math.max(this.chart.options.drilldown.animation.duration-50,0));this.animate=t}};n.prototype.animateDrilldown=function(b){var a=this,c=this.chart.drilldownLevels,e,d=this.chart.options.drilldown.animation,f=this.xAxis;if(!b)h(c,function(b){if(a.options._ddSeriesId===b.lowerSeriesOptions._ddSeriesId)e=b.shapeArgs,
11
- e.fill=b.color}),e.x+=u(f.oldPos,f.pos)-f.pos,h(this.points,function(a){a.graphic&&a.graphic.attr(e).animate(l(a.shapeArgs,{fill:a.color}),d);a.dataLabel&&a.dataLabel.fadeIn(d)}),this.animate=null};n.prototype.animateDrillupFrom=function(b){var a=this.chart.options.drilldown.animation,c=this.group,e=this;h(e.trackerGroups,function(a){if(e[a])e[a].on("mouseover")});delete this.group;h(this.points,function(e){var f=e.graphic,i=function(){f.destroy();c&&(c=c.destroy())};f&&(delete e.graphic,a?f.animate(l(b.shapeArgs,
12
- {fill:b.color}),d.merge(a,{complete:i})):(f.attr(b.shapeArgs),i()))})};v&&l(v.prototype,{supportsDrilldown:!0,animateDrillupTo:n.prototype.animateDrillupTo,animateDrillupFrom:n.prototype.animateDrillupFrom,animateDrilldown:function(b){var a=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],c=this.chart.options.drilldown.animation,e=a.shapeArgs,g=e.start,f=(e.end-g)/this.points.length;if(!b)h(this.points,function(b,h){b.graphic.attr(d.merge(e,{start:g+h*f,end:g+(h+1)*f,fill:a.color}))[c?
13
- "animate":"attr"](l(b.shapeArgs,{fill:b.color}),c)}),this.animate=null}});d.Point.prototype.doDrilldown=function(b,a){var c=this.series.chart,e=c.options.drilldown,d=(e.series||[]).length,f;if(!c.ddDupes)c.ddDupes=[];for(;d--&&!f;)e.series[d].id===this.drilldown&&y(this.drilldown,c.ddDupes)===-1&&(f=e.series[d],c.ddDupes.push(this.drilldown));x(c,"drilldown",{point:this,seriesOptions:f,category:a,points:a!==void 0&&this.series.xAxis.ddPoints[a].slice(0)});f&&(b?c.addSingleSeriesAsDrilldown(this,f):
14
- c.addSeriesAsDrilldown(this,f))};d.Axis.prototype.drilldownCategory=function(b){var a,c,d=this.ddPoints[b];for(a in d)(c=d[a])&&c.series&&c.series.visible&&c.doDrilldown&&c.doDrilldown(!0,b);this.chart.applyDrilldown()};d.Axis.prototype.getDDPoints=function(b,a){var c=this.ddPoints;if(!c)this.ddPoints=c={};c[b]||(c[b]=[]);if(c[b].levelNumber!==a)c[b].length=0;return c[b]};w.prototype.drillable=function(){var b=this.pos,a=this.label,c=this.axis,e=c.ddPoints&&c.ddPoints[b];if(a&&e&&e.length){if(!a.basicStyles)a.basicStyles=
15
- d.merge(a.styles);a.addClass("highcharts-drilldown-axis-label").css(c.chart.options.drilldown.activeAxisLabelStyle).on("click",function(){c.drilldownCategory(b)})}else if(a&&a.basicStyles)a.styles={},a.css(a.basicStyles),a.on("click",null)};r(w.prototype,"addLabel",function(b){b.call(this);this.drillable()});r(d.Point.prototype,"init",function(b,a,c,e){var g=b.call(this,a,c,e),b=(c=a.xAxis)&&c.ticks[e],c=c&&c.getDDPoints(e,a.options._levelNumber);if(g.drilldown&&(d.addEvent(g,"click",function(){a.xAxis&&
16
- a.chart.options.drilldown.allowPointDrilldown===!1?a.xAxis.drilldownCategory(e):g.doDrilldown()}),c))c.push(g),c.levelNumber=a.options._levelNumber;b&&b.drillable();return g});r(d.Series.prototype,"drawDataLabels",function(b){var a=this.chart.options.drilldown.activeDataLabelStyle;b.call(this);h(this.points,function(b){b.drilldown&&b.dataLabel&&b.dataLabel.attr({"class":"highcharts-drilldown-data-label"}).css(a)})});var s,q=function(b){b.call(this);h(this.points,function(a){a.drilldown&&a.graphic&&
17
- a.graphic.attr({"class":"highcharts-drilldown-point"}).css({cursor:"pointer"})})};for(s in p)p[s].prototype.supportsDrilldown&&r(p[s].prototype,"drawTracker",q)});
1
+ /*
2
+ Highcharts JS v5.0.11 (2017-05-04)
3
+ Highcharts Drilldown module
4
+
5
+ Author: Torstein Honsi
6
+ License: www.highcharts.com/license
7
+
8
+ */
9
+ (function(n){"object"===typeof module&&module.exports?module.exports=n:n(Highcharts)})(function(n){(function(f){function n(a,b,d){var c;b.rgba.length&&a.rgba.length?(a=a.rgba,b=b.rgba,c=1!==b[3]||1!==a[3],a=(c?"rgba(":"rgb(")+Math.round(b[0]+(a[0]-b[0])*(1-d))+","+Math.round(b[1]+(a[1]-b[1])*(1-d))+","+Math.round(b[2]+(a[2]-b[2])*(1-d))+(c?","+(b[3]+(a[3]-b[3])*(1-d)):"")+")"):a=b.input||"none";return a}var A=f.noop,t=f.color,B=f.defaultOptions,h=f.each,p=f.extend,H=f.format,C=f.objectEach,v=f.pick,
10
+ u=f.wrap,q=f.Chart,w=f.seriesTypes,D=w.pie,r=w.column,E=f.Tick,x=f.fireEvent,F=f.inArray,G=1;h(["fill","stroke"],function(a){f.Fx.prototype[a+"Setter"]=function(){this.elem.attr(a,n(t(this.start),t(this.end),this.pos),null,!0)}});p(B.lang,{drillUpText:"\u25c1 Back to {series.name}"});B.drilldown={animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}}};f.SVGRenderer.prototype.Element.prototype.fadeIn=function(a){this.attr({opacity:.1,visibility:"inherit"}).animate({opacity:v(this.newOpacity,
11
+ 1)},a||{duration:250})};q.prototype.addSeriesAsDrilldown=function(a,b){this.addSingleSeriesAsDrilldown(a,b);this.applyDrilldown()};q.prototype.addSingleSeriesAsDrilldown=function(a,b){var d=a.series,c=d.xAxis,e=d.yAxis,g,k=[],y=[],l,m,z;z={colorIndex:v(a.colorIndex,d.colorIndex)};this.drilldownLevels||(this.drilldownLevels=[]);l=d.options._levelNumber||0;(m=this.drilldownLevels[this.drilldownLevels.length-1])&&m.levelNumber!==l&&(m=void 0);b=p(p({_ddSeriesId:G++},z),b);g=F(a,d.points);h(d.chart.series,
12
+ function(a){a.xAxis!==c||a.isDrilling||(a.options._ddSeriesId=a.options._ddSeriesId||G++,a.options._colorIndex=a.userOptions._colorIndex,a.options._levelNumber=a.options._levelNumber||l,m?(k=m.levelSeries,y=m.levelSeriesOptions):(k.push(a),y.push(a.options)))});a=p({levelNumber:l,seriesOptions:d.options,levelSeriesOptions:y,levelSeries:k,shapeArgs:a.shapeArgs,bBox:a.graphic?a.graphic.getBBox():{},color:a.isNull?(new f.Color(t)).setOpacity(0).get():t,lowerSeriesOptions:b,pointOptions:d.options.data[g],
13
+ pointIndex:g,oldExtremes:{xMin:c&&c.userMin,xMax:c&&c.userMax,yMin:e&&e.userMin,yMax:e&&e.userMax}},z);this.drilldownLevels.push(a);b=a.lowerSeries=this.addSeries(b,!1);b.options._levelNumber=l+1;c&&(c.oldPos=c.pos,c.userMin=c.userMax=null,e.userMin=e.userMax=null);d.type===b.type&&(b.animate=b.animateDrilldown||A,b.options.animation=!0)};q.prototype.applyDrilldown=function(){var a=this.drilldownLevels,b;a&&0<a.length&&(b=a[a.length-1].levelNumber,h(this.drilldownLevels,function(a){a.levelNumber===
14
+ b&&h(a.levelSeries,function(a){a.options&&a.options._levelNumber===b&&a.remove(!1)})}));this.redraw();this.showDrillUpButton()};q.prototype.getDrilldownBackText=function(){var a=this.drilldownLevels;if(a&&0<a.length)return a=a[a.length-1],a.series=a.seriesOptions,H(this.options.lang.drillUpText,a)};q.prototype.showDrillUpButton=function(){var a=this,b=this.getDrilldownBackText(),d=a.options.drilldown.drillUpButton,c,e;this.drillUpButton?this.drillUpButton.attr({text:b}).align():(e=(c=d.theme)&&c.states,
15
+ this.drillUpButton=this.renderer.button(b,null,null,function(){a.drillUp()},c,e&&e.hover,e&&e.select).addClass("highcharts-drillup-button").attr({align:d.position.align,zIndex:7}).add().align(d.position,!1,d.relativeTo||"plotBox"))};q.prototype.drillUp=function(){for(var a=this,b=a.drilldownLevels,d=b[b.length-1].levelNumber,c=b.length,e=a.series,g,k,f,l,m=function(b){var c;h(e,function(a){a.options._ddSeriesId===b._ddSeriesId&&(c=a)});c=c||a.addSeries(b,!1);c.type===f.type&&c.animateDrillupTo&&(c.animate=
16
+ c.animateDrillupTo);b===k.seriesOptions&&(l=c)};c--;)if(k=b[c],k.levelNumber===d){b.pop();f=k.lowerSeries;if(!f.chart)for(g=e.length;g--;)if(e[g].options.id===k.lowerSeriesOptions.id&&e[g].options._levelNumber===d+1){f=e[g];break}f.xData=[];h(k.levelSeriesOptions,m);x(a,"drillup",{seriesOptions:k.seriesOptions});l.type===f.type&&(l.drilldownLevel=k,l.options.animation=a.options.drilldown.animation,f.animateDrillupFrom&&f.chart&&f.animateDrillupFrom(k));l.options._levelNumber=d;f.remove(!1);l.xAxis&&
17
+ (g=k.oldExtremes,l.xAxis.setExtremes(g.xMin,g.xMax,!1),l.yAxis.setExtremes(g.yMin,g.yMax,!1))}x(a,"drillupall");this.redraw();0===this.drilldownLevels.length?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align();this.ddDupes.length=[]};r.prototype.supportsDrilldown=!0;r.prototype.animateDrillupTo=function(a){if(!a){var b=this,d=b.drilldownLevel;h(this.points,function(a){var b=a.dataLabel;a.graphic&&a.graphic.hide();b&&(b.hidden="hidden"===
18
+ b.attr("visibility"),b.hidden||(b.hide(),a.connector&&a.connector.hide()))});setTimeout(function(){b.points&&h(b.points,function(a,b){b=b===(d&&d.pointIndex)?"show":"fadeIn";var c="show"===b?!0:void 0,e=a.dataLabel;if(a.graphic)a.graphic[b](c);if(e&&!e.hidden&&(e[b](c),a.connector))a.connector[b](c)})},Math.max(this.chart.options.drilldown.animation.duration-50,0));this.animate=A}};r.prototype.animateDrilldown=function(a){var b=this,d=this.chart.drilldownLevels,c,e=this.chart.options.drilldown.animation,
19
+ g=this.xAxis;a||(h(d,function(a){b.options._ddSeriesId===a.lowerSeriesOptions._ddSeriesId&&(c=a.shapeArgs)}),c.x+=v(g.oldPos,g.pos)-g.pos,h(this.points,function(a){a.graphic&&a.graphic.attr(c).animate(p(a.shapeArgs,{fill:a.color||b.color}),e);a.dataLabel&&a.dataLabel.fadeIn(e)}),this.animate=null)};r.prototype.animateDrillupFrom=function(a){var b=this.chart.options.drilldown.animation,d=this.group,c=d!==this.chart.seriesGroup,e=this;h(e.trackerGroups,function(a){if(e[a])e[a].on("mouseover")});c&&
20
+ delete this.group;h(this.points,function(e){var g=e.graphic,h=a.shapeArgs,l=function(){g.destroy();d&&c&&(d=d.destroy())};g&&(delete e.graphic,b?g.animate(h,f.merge(b,{complete:l})):(g.attr(h),l()))})};D&&p(D.prototype,{supportsDrilldown:!0,animateDrillupTo:r.prototype.animateDrillupTo,animateDrillupFrom:r.prototype.animateDrillupFrom,animateDrilldown:function(a){var b=this.chart.options.drilldown.animation,d=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1].shapeArgs,c=d.start,e=(d.end-
21
+ c)/this.points.length;a||(h(this.points,function(a,k){var g=a.shapeArgs;if(a.graphic)a.graphic.attr(f.merge(d,{start:c+k*e,end:c+(k+1)*e}))[b?"animate":"attr"](g,b)}),this.animate=null)}});f.Point.prototype.doDrilldown=function(a,b,d){var c=this.series.chart,e=c.options.drilldown,g=(e.series||[]).length,f;c.ddDupes||(c.ddDupes=[]);for(;g--&&!f;)e.series[g].id===this.drilldown&&-1===F(this.drilldown,c.ddDupes)&&(f=e.series[g],c.ddDupes.push(this.drilldown));x(c,"drilldown",{point:this,seriesOptions:f,
22
+ category:b,originalEvent:d,points:void 0!==b&&this.series.xAxis.getDDPoints(b).slice(0)},function(b){var c=b.point.series&&b.point.series.chart,d=b.seriesOptions;c&&d&&(a?c.addSingleSeriesAsDrilldown(b.point,d):c.addSeriesAsDrilldown(b.point,d))})};f.Axis.prototype.drilldownCategory=function(a,b){C(this.getDDPoints(a),function(d){d&&d.series&&d.series.visible&&d.doDrilldown&&d.doDrilldown(!0,a,b)});this.chart.applyDrilldown()};f.Axis.prototype.getDDPoints=function(a){var b=[];h(this.series,function(d){var c,
23
+ e=d.xData,f=d.points;for(c=0;c<e.length;c++)if(e[c]===a&&d.options.data[c]&&d.options.data[c].drilldown){b.push(f?f[c]:!0);break}});return b};E.prototype.drillable=function(){var a=this.pos,b=this.label,d=this.axis,c="xAxis"===d.coll&&d.getDDPoints,e=c&&d.getDDPoints(a);c&&(b&&e.length?(b.drillable=!0,b.addClass("highcharts-drilldown-axis-label").on("click",function(b){d.drilldownCategory(a,b)})):b&&b.drillable&&(b.on("click",null),b.removeClass("highcharts-drilldown-axis-label")))};u(E.prototype,
24
+ "addLabel",function(a){a.call(this);this.drillable()});u(f.Point.prototype,"init",function(a,b,d,c){var e=a.call(this,b,d,c);c=(a=b.xAxis)&&a.ticks[c];e.drilldown&&f.addEvent(e,"click",function(a){b.xAxis&&!1===b.chart.options.drilldown.allowPointDrilldown?b.xAxis.drilldownCategory(e.x,a):e.doDrilldown(void 0,void 0,a)});c&&c.drillable();return e});u(f.Series.prototype,"drawDataLabels",function(a){var b=this.chart.options.drilldown.activeDataLabelStyle,d=this.chart.renderer;a.call(this);h(this.points,
25
+ function(a){a.drilldown&&a.dataLabel&&("contrast"===b.color&&d.getContrast(a.color||this.color),a.dataLabel.addClass("highcharts-drilldown-data-label"))},this)});var I=function(a){a.call(this);h(this.points,function(a){a.drilldown&&a.graphic&&a.graphic.addClass("highcharts-drilldown-point")})};C(w,function(a){a.prototype.supportsDrilldown&&u(a.prototype,"drawTracker",I)})})(n)});
@@ -0,0 +1,8 @@
1
+ {
2
+ "version":3,
3
+ "file":"",
4
+ "lineCount":25,
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,CAACC,CAAD,CAAI,CAkCTC,QAASA,EAAW,CAACC,CAAD,CAAOC,CAAP,CAAWC,CAAX,CAAgB,CAAA,IAG5BC,CAICF,EAAAG,KAAAC,OAAL,EAAwBL,CAAAI,KAAAC,OAAxB,EAKIL,CAGA,CAHOA,CAAAI,KAGP,CAFAH,CAEA,CAFKA,CAAAG,KAEL,CADAD,CACA,CADsB,CACtB,GADYF,CAAA,CAAG,CAAH,CACZ,EADuC,CACvC,GAD2BD,CAAA,CAAK,CAAL,CAC3B,CAAAM,CAAA,EAAOH,CAAA,CAAW,OAAX,CAAqB,MAA5B,EACII,IAAAC,MAAA,CAAWP,CAAA,CAAG,CAAH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A,CAAAV,UAAA,EAGJ,OAAOlI,EA/B2D,CAAtE,CAkCAtC,EAAA,CAAKpB,CAAA0M,OAAAzK,UAAL,CAAyB,gBAAzB,CAA2C,QAAQ,CAACmK,CAAD,CAAU,CAAA,IACrDO,EAAM,IAAA3H,MAAArB,QAAAnB,UAAAoK,qBAD+C,CAErD/E,EAAW,IAAA7C,MAAA6C,SAEfuE,EAAAC,KAAA,CAAa,IAAb,CAEAtL,EAAA,CAAK,IAAAgE,OAAL;AAAkB,QAAQ,CAACrB,CAAD,CAAQ,CAE1BA,CAAAlB,UAAJ,EAAuBkB,CAAA6F,UAAvB,GACsB,UAGlB,GAHIoD,CAAA9L,MAGJ,EAFqBgH,CAAAgF,YAAA,CAAqBnJ,CAAA7C,MAArB,EAAoC,IAAAA,MAApC,CAErB,CAAA6C,CAAA6F,UAAArB,SAAA,CACc,iCADd,CAJJ,CAF8B,CAAlC,CAWG,IAXH,CANyD,CAA7D,CAqBA,KAAI4E,EAAqBA,QAAQ,CAACV,CAAD,CAAU,CACvCA,CAAAC,KAAA,CAAa,IAAb,CACAtL,EAAA,CAAK,IAAAgE,OAAL,CAAkB,QAAQ,CAACrB,CAAD,CAAQ,CAC1BA,CAAAlB,UAAJ,EAAuBkB,CAAA+B,QAAvB,EACI/B,CAAA+B,QAAAyC,SAAA,CAAuB,4BAAvB,CAF0B,CAAlC,CAFuC,CAW3ChH,EAAA,CAAWI,CAAX,CAAwB,QAAQ,CAACyL,CAAD,CAAa,CACrCA,CAAA9K,UAAAmH,kBAAJ,EACIhI,CAAA,CAAK2L,CAAA9K,UAAL,CAA2B,aAA3B,CAA0C6K,CAA1C,CAFqC,CAA7C,CAtwBS,CAAZ,CAAA,CA4wBC/M,CA5wBD,CADkB,CANtB;",
6
+ "sources":["Input_0"],
7
+ "names":["factory","module","exports","Highcharts","H","tweenColors","from","to","pos","hasAlpha","rgba","length","ret","Math","round","input","noop","color","defaultOptions","each","extend","format","objectEach","pick","wrap","Chart","seriesTypes","PieSeries","pie","ColumnSeries","column","Tick","fireEvent","inArray","ddSeriesId","prop","Fx","prototype","elem","attr","start","end","lang","drillUpText","drilldown","animation","duration","drillUpButton","position","align","x","y","SVGRenderer","Element","fadeIn","H.SVGRenderer.prototype.Element.prototype.fadeIn","opacity","visibility","animate","newOpacity","addSeriesAsDrilldown","Chart.prototype.addSeriesAsDrilldown","point","options","addSingleSeriesAsDrilldown","applyDrilldown","Chart.prototype.addSingleSeriesAsDrilldown","ddOptions","oldSeries","series","xAxis","yAxis","pointIndex","levelSeries","levelSeriesOptions","levelNumber","last","colorProp","colorIndex","drilldownLevels","_levelNumber","undefined","_ddSeriesId","points","chart","isDrilling","_colorIndex","userOptions","push","level","seriesOptions","shapeArgs","bBox","graphic","getBBox","isNull","setOpacity","Color","get","lowerSeriesOptions","pointOptions","data","oldExtremes","xMin","userMin","xMax","userMax","yMin","yMax","newSeries","lowerSeries","addSeries","oldPos","type","animateDrilldown","Chart.prototype.applyDrilldown","levelToRemove","remove","redraw","showDrillUpButton","getDrilldownBackText","Chart.prototype.getDrilldownBackText","lastLevel","Chart.prototype.showDrillUpButton","backText","buttonOptions","states","text","theme","renderer","button","drillUp","hover","select","addClass","zIndex","add","relativeTo","Chart.prototype.drillUp","i","chartSeries","seriesI","addedSeries","animateDrillupTo","pop","id","xData","drilldownLevel","animateDrillupFrom","setExtremes","destroy","ddDupes","supportsDrilldown","ColumnSeries.prototype.animateDrillupTo","init","dataLabel","hide","hidden","connector","setTimeout","verb","inherit","max","ColumnSeries.prototype.animateDrilldown","animateFrom","animationOptions","fill","ColumnSeries.prototype.animateDrillupFrom","group","removeGroup","seriesGroup","trackerGroups","key","on","animateTo","complete","merge","startAngle","Point","doDrilldown","H.Point.prototype.doDrilldown","_holdRedraw","category","originalEvent","getDDPoints","slice","e","Axis","drilldownCategory","H.Axis.prototype.drilldownCategory","visible","H.Axis.prototype.getDDPoints","drillable","Tick.prototype.drillable","label","axis","isDrillable","coll","ddPointsX","removeClass","proceed","call","tick","ticks","addEvent","allowPointDrilldown","Series","css","activeDataLabelStyle","getContrast","drawTrackerWrapper","seriesType"]
8
+ }
@@ -1,717 +1,798 @@
1
1
  /**
2
+ * @license Highcharts JS v5.0.11 (2017-05-04)
2
3
  * Highcharts Drilldown module
3
4
  *
4
5
  * Author: Torstein Honsi
5
6
  * License: www.highcharts.com/license
6
7
  *
7
8
  */
8
-
9
- (function (factory) {
10
- if (typeof module === 'object' && module.exports) {
11
- module.exports = factory;
12
- } else {
13
- factory(Highcharts);
14
- }
15
- }(function (H) {
16
-
17
- 'use strict';
18
-
19
- var noop = function () {},
20
- defaultOptions = H.getOptions(),
21
- each = H.each,
22
- extend = H.extend,
23
- format = H.format,
24
- pick = H.pick,
25
- wrap = H.wrap,
26
- Chart = H.Chart,
27
- seriesTypes = H.seriesTypes,
28
- PieSeries = seriesTypes.pie,
29
- ColumnSeries = seriesTypes.column,
30
- Tick = H.Tick,
31
- fireEvent = H.fireEvent,
32
- inArray = H.inArray,
33
- ddSeriesId = 1;
34
-
35
- // Utilities
36
- /*
37
- * Return an intermediate color between two colors, according to pos where 0
38
- * is the from color and 1 is the to color. This method is copied from ColorAxis.js
39
- * and should always be kept updated, until we get AMD support.
40
- */
41
- function tweenColors(from, to, pos) {
42
- // Check for has alpha, because rgba colors perform worse due to lack of
43
- // support in WebKit.
44
- var hasAlpha,
45
- ret;
46
-
47
- // Unsupported color, return to-color (#3920)
48
- if (!to.rgba.length || !from.rgba.length) {
49
- ret = to.input || 'none';
50
-
51
- // Interpolate
52
- } else {
53
- from = from.rgba;
54
- to = to.rgba;
55
- hasAlpha = (to[3] !== 1 || from[3] !== 1);
56
- ret = (hasAlpha ? 'rgba(' : 'rgb(') +
57
- Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
58
- Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
59
- Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
60
- (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
61
- }
62
- return ret;
63
- }
64
- /**
65
- * Handle animation of the color attributes directly
66
- */
67
- each(['fill', 'stroke'], function (prop) {
68
- H.addAnimSetter(prop, function (fx) {
69
- fx.elem.attr(prop, tweenColors(H.Color(fx.start), H.Color(fx.end), fx.pos));
70
- });
71
- });
72
-
73
- // Add language
74
- extend(defaultOptions.lang, {
75
- drillUpText: '◁ Back to {series.name}'
76
- });
77
- defaultOptions.drilldown = {
78
- activeAxisLabelStyle: {
79
- cursor: 'pointer',
80
- color: '#0d233a',
81
- fontWeight: 'bold',
82
- textDecoration: 'underline'
83
- },
84
- activeDataLabelStyle: {
85
- cursor: 'pointer',
86
- color: '#0d233a',
87
- fontWeight: 'bold',
88
- textDecoration: 'underline'
89
- },
90
- animation: {
91
- duration: 500
92
- },
93
- drillUpButton: {
94
- position: {
95
- align: 'right',
96
- x: -10,
97
- y: 10
98
- }
99
- // relativeTo: 'plotBox'
100
- // theme
101
- }
102
- };
103
-
104
- /**
105
- * A general fadeIn method
106
- */
107
- H.SVGRenderer.prototype.Element.prototype.fadeIn = function (animation) {
108
- this
109
- .attr({
110
- opacity: 0.1,
111
- visibility: 'inherit'
112
- })
113
- .animate({
114
- opacity: pick(this.newOpacity, 1) // newOpacity used in maps
115
- }, animation || {
116
- duration: 250
117
- });
118
- };
119
-
120
- Chart.prototype.addSeriesAsDrilldown = function (point, ddOptions) {
121
- this.addSingleSeriesAsDrilldown(point, ddOptions);
122
- this.applyDrilldown();
123
- };
124
- Chart.prototype.addSingleSeriesAsDrilldown = function (point, ddOptions) {
125
- var oldSeries = point.series,
126
- xAxis = oldSeries.xAxis,
127
- yAxis = oldSeries.yAxis,
128
- newSeries,
129
- color = point.color || oldSeries.color,
130
- pointIndex,
131
- levelSeries = [],
132
- levelSeriesOptions = [],
133
- level,
134
- levelNumber,
135
- last;
136
-
137
- if (!this.drilldownLevels) {
138
- this.drilldownLevels = [];
139
- }
140
-
141
- levelNumber = oldSeries.options._levelNumber || 0;
142
-
143
- // See if we can reuse the registered series from last run
144
- last = this.drilldownLevels[this.drilldownLevels.length - 1];
145
- if (last && last.levelNumber !== levelNumber) {
146
- last = undefined;
147
- }
148
-
149
-
150
- ddOptions = extend({
151
- color: color,
152
- _ddSeriesId: ddSeriesId++
153
- }, ddOptions);
154
- pointIndex = inArray(point, oldSeries.points);
155
-
156
- // Record options for all current series
157
- each(oldSeries.chart.series, function (series) {
158
- if (series.xAxis === xAxis && !series.isDrilling) {
159
- series.options._ddSeriesId = series.options._ddSeriesId || ddSeriesId++;
160
- series.options._colorIndex = series.userOptions._colorIndex;
161
- series.options._levelNumber = series.options._levelNumber || levelNumber; // #3182
162
-
163
- if (last) {
164
- levelSeries = last.levelSeries;
165
- levelSeriesOptions = last.levelSeriesOptions;
166
- } else {
167
- levelSeries.push(series);
168
- levelSeriesOptions.push(series.options);
169
- }
170
- }
171
- });
172
-
173
- // Add a record of properties for each drilldown level
174
- level = {
175
- levelNumber: levelNumber,
176
- seriesOptions: oldSeries.options,
177
- levelSeriesOptions: levelSeriesOptions,
178
- levelSeries: levelSeries,
179
- shapeArgs: point.shapeArgs,
180
- bBox: point.graphic ? point.graphic.getBBox() : {}, // no graphic in line series with markers disabled
181
- color: color,
182
- lowerSeriesOptions: ddOptions,
183
- pointOptions: oldSeries.options.data[pointIndex],
184
- pointIndex: pointIndex,
185
- oldExtremes: {
186
- xMin: xAxis && xAxis.userMin,
187
- xMax: xAxis && xAxis.userMax,
188
- yMin: yAxis && yAxis.userMin,
189
- yMax: yAxis && yAxis.userMax
190
- }
191
- };
192
-
193
- // Push it to the lookup array
194
- this.drilldownLevels.push(level);
195
-
196
- newSeries = level.lowerSeries = this.addSeries(ddOptions, false);
197
- newSeries.options._levelNumber = levelNumber + 1;
198
- if (xAxis) {
199
- xAxis.oldPos = xAxis.pos;
200
- xAxis.userMin = xAxis.userMax = null;
201
- yAxis.userMin = yAxis.userMax = null;
202
- }
203
-
204
- // Run fancy cross-animation on supported and equal types
205
- if (oldSeries.type === newSeries.type) {
206
- newSeries.animate = newSeries.animateDrilldown || noop;
207
- newSeries.options.animation = true;
208
- }
209
- };
210
-
211
- Chart.prototype.applyDrilldown = function () {
212
- var drilldownLevels = this.drilldownLevels,
213
- levelToRemove;
214
-
215
- if (drilldownLevels && drilldownLevels.length > 0) { // #3352, async loading
216
- levelToRemove = drilldownLevels[drilldownLevels.length - 1].levelNumber;
217
- each(this.drilldownLevels, function (level) {
218
- if (level.levelNumber === levelToRemove) {
219
- each(level.levelSeries, function (series) {
220
- if (series.options && series.options._levelNumber === levelToRemove) { // Not removed, not added as part of a multi-series drilldown
221
- series.remove(false);
222
- }
223
- });
224
- }
225
- });
226
- }
227
-
228
- this.redraw();
229
- this.showDrillUpButton();
230
- };
231
-
232
- Chart.prototype.getDrilldownBackText = function () {
233
- var drilldownLevels = this.drilldownLevels,
234
- lastLevel;
235
- if (drilldownLevels && drilldownLevels.length > 0) { // #3352, async loading
236
- lastLevel = drilldownLevels[drilldownLevels.length - 1];
237
- lastLevel.series = lastLevel.seriesOptions;
238
- return format(this.options.lang.drillUpText, lastLevel);
239
- }
240
-
241
- };
242
-
243
- Chart.prototype.showDrillUpButton = function () {
244
- var chart = this,
245
- backText = this.getDrilldownBackText(),
246
- buttonOptions = chart.options.drilldown.drillUpButton,
247
- attr,
248
- states;
249
-
250
-
251
- if (!this.drillUpButton) {
252
- attr = buttonOptions.theme;
253
- states = attr && attr.states;
254
-
255
- this.drillUpButton = this.renderer.button(
256
- backText,
257
- null,
258
- null,
259
- function () {
260
- chart.drillUp();
261
- },
262
- attr,
263
- states && states.hover,
264
- states && states.select
265
- )
266
- .attr({
267
- align: buttonOptions.position.align,
268
- zIndex: 9
269
- })
270
- .add()
271
- .align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox');
272
- } else {
273
- this.drillUpButton.attr({
274
- text: backText
275
- })
276
- .align();
277
- }
278
- };
279
-
280
- Chart.prototype.drillUp = function () {
281
- var chart = this,
282
- drilldownLevels = chart.drilldownLevels,
283
- levelNumber = drilldownLevels[drilldownLevels.length - 1].levelNumber,
284
- i = drilldownLevels.length,
285
- chartSeries = chart.series,
286
- seriesI,
287
- level,
288
- oldSeries,
289
- newSeries,
290
- oldExtremes,
291
- addSeries = function (seriesOptions) {
292
- var addedSeries;
293
- each(chartSeries, function (series) {
294
- if (series.options._ddSeriesId === seriesOptions._ddSeriesId) {
295
- addedSeries = series;
296
- }
297
- });
298
-
299
- addedSeries = addedSeries || chart.addSeries(seriesOptions, false);
300
- if (addedSeries.type === oldSeries.type && addedSeries.animateDrillupTo) {
301
- addedSeries.animate = addedSeries.animateDrillupTo;
302
- }
303
- if (seriesOptions === level.seriesOptions) {
304
- newSeries = addedSeries;
305
- }
306
- };
307
-
308
- while (i--) {
309
-
310
- level = drilldownLevels[i];
311
- if (level.levelNumber === levelNumber) {
312
- drilldownLevels.pop();
313
-
314
- // Get the lower series by reference or id
315
- oldSeries = level.lowerSeries;
316
- if (!oldSeries.chart) { // #2786
317
- seriesI = chartSeries.length; // #2919
318
- while (seriesI--) {
319
- if (chartSeries[seriesI].options.id === level.lowerSeriesOptions.id &&
320
- chartSeries[seriesI].options._levelNumber === levelNumber + 1) { // #3867
321
- oldSeries = chartSeries[seriesI];
322
- break;
323
- }
324
- }
325
- }
326
- oldSeries.xData = []; // Overcome problems with minRange (#2898)
327
-
328
- each(level.levelSeriesOptions, addSeries);
329
-
330
- fireEvent(chart, 'drillup', { seriesOptions: level.seriesOptions });
331
-
332
- if (newSeries.type === oldSeries.type) {
333
- newSeries.drilldownLevel = level;
334
- newSeries.options.animation = chart.options.drilldown.animation;
335
-
336
- if (oldSeries.animateDrillupFrom && oldSeries.chart) { // #2919
337
- oldSeries.animateDrillupFrom(level);
338
- }
339
- }
340
- newSeries.options._levelNumber = levelNumber;
341
-
342
- oldSeries.remove(false);
343
-
344
- // Reset the zoom level of the upper series
345
- if (newSeries.xAxis) {
346
- oldExtremes = level.oldExtremes;
347
- newSeries.xAxis.setExtremes(oldExtremes.xMin, oldExtremes.xMax, false);
348
- newSeries.yAxis.setExtremes(oldExtremes.yMin, oldExtremes.yMax, false);
349
- }
350
- }
351
- }
352
-
353
- this.redraw();
354
-
355
- if (this.drilldownLevels.length === 0) {
356
- this.drillUpButton = this.drillUpButton.destroy();
357
- } else {
358
- this.drillUpButton.attr({
359
- text: this.getDrilldownBackText()
360
- })
361
- .align();
362
- }
363
-
364
- this.ddDupes.length = []; // #3315
365
- };
366
-
367
-
368
- ColumnSeries.prototype.supportsDrilldown = true;
369
-
370
- /**
371
- * When drilling up, keep the upper series invisible until the lower series has
372
- * moved into place
373
- */
374
- ColumnSeries.prototype.animateDrillupTo = function (init) {
375
- if (!init) {
376
- var newSeries = this,
377
- level = newSeries.drilldownLevel;
378
-
379
- each(this.points, function (point) {
380
- if (point.graphic) { // #3407
381
- point.graphic.hide();
382
- }
383
- if (point.dataLabel) {
384
- point.dataLabel.hide();
385
- }
386
- if (point.connector) {
387
- point.connector.hide();
388
- }
389
- });
390
-
391
-
392
- // Do dummy animation on first point to get to complete
393
- setTimeout(function () {
394
- if (newSeries.points) { // May be destroyed in the meantime, #3389
395
- each(newSeries.points, function (point, i) {
396
- // Fade in other points
397
- var verb = i === (level && level.pointIndex) ? 'show' : 'fadeIn',
398
- inherit = verb === 'show' ? true : undefined;
399
- if (point.graphic) { // #3407
400
- point.graphic[verb](inherit);
401
- }
402
- if (point.dataLabel) {
403
- point.dataLabel[verb](inherit);
404
- }
405
- if (point.connector) {
406
- point.connector[verb](inherit);
407
- }
408
- });
409
- }
410
- }, Math.max(this.chart.options.drilldown.animation.duration - 50, 0));
411
-
412
- // Reset
413
- this.animate = noop;
414
- }
415
-
416
- };
417
-
418
- ColumnSeries.prototype.animateDrilldown = function (init) {
419
- var series = this,
420
- drilldownLevels = this.chart.drilldownLevels,
421
- animateFrom,
422
- animationOptions = this.chart.options.drilldown.animation,
423
- xAxis = this.xAxis;
424
-
425
- if (!init) {
426
- each(drilldownLevels, function (level) {
427
- if (series.options._ddSeriesId === level.lowerSeriesOptions._ddSeriesId) {
428
- animateFrom = level.shapeArgs;
429
- animateFrom.fill = level.color;
430
- }
431
- });
432
-
433
- animateFrom.x += (pick(xAxis.oldPos, xAxis.pos) - xAxis.pos);
434
-
435
- each(this.points, function (point) {
436
- if (point.graphic) {
437
- point.graphic
438
- .attr(animateFrom)
439
- .animate(
440
- extend(point.shapeArgs, { fill: point.color }),
441
- animationOptions
442
- );
443
- }
444
- if (point.dataLabel) {
445
- point.dataLabel.fadeIn(animationOptions);
446
- }
447
- });
448
- this.animate = null;
449
- }
450
-
451
- };
452
-
453
- /**
454
- * When drilling up, pull out the individual point graphics from the lower series
455
- * and animate them into the origin point in the upper series.
456
- */
457
- ColumnSeries.prototype.animateDrillupFrom = function (level) {
458
- var animationOptions = this.chart.options.drilldown.animation,
459
- group = this.group,
460
- series = this;
461
-
462
- // Cancel mouse events on the series group (#2787)
463
- each(series.trackerGroups, function (key) {
464
- if (series[key]) { // we don't always have dataLabelsGroup
465
- series[key].on('mouseover');
466
- }
467
- });
468
-
469
-
470
- delete this.group;
471
- each(this.points, function (point) {
472
- var graphic = point.graphic,
473
- complete = function () {
474
- graphic.destroy();
475
- if (group) {
476
- group = group.destroy();
477
- }
478
- };
479
-
480
- if (graphic) {
481
-
482
- delete point.graphic;
483
-
484
- if (animationOptions) {
485
- graphic.animate(
486
- extend(level.shapeArgs, { fill: level.color }),
487
- H.merge(animationOptions, { complete: complete })
488
- );
489
- } else {
490
- graphic.attr(level.shapeArgs);
491
- complete();
492
- }
493
- }
494
- });
495
- };
496
-
497
- if (PieSeries) {
498
- extend(PieSeries.prototype, {
499
- supportsDrilldown: true,
500
- animateDrillupTo: ColumnSeries.prototype.animateDrillupTo,
501
- animateDrillupFrom: ColumnSeries.prototype.animateDrillupFrom,
502
-
503
- animateDrilldown: function (init) {
504
- var level = this.chart.drilldownLevels[this.chart.drilldownLevels.length - 1],
505
- animationOptions = this.chart.options.drilldown.animation,
506
- animateFrom = level.shapeArgs,
507
- start = animateFrom.start,
508
- angle = animateFrom.end - start,
509
- startAngle = angle / this.points.length;
510
-
511
- if (!init) {
512
- each(this.points, function (point, i) {
513
- point.graphic
514
- .attr(H.merge(animateFrom, {
515
- start: start + i * startAngle,
516
- end: start + (i + 1) * startAngle,
517
- fill: level.color
518
- }))[animationOptions ? 'animate' : 'attr'](
519
- extend(point.shapeArgs, { fill: point.color }),
520
- animationOptions
521
- );
522
- });
523
- this.animate = null;
524
- }
525
- }
526
- });
527
- }
528
-
529
- H.Point.prototype.doDrilldown = function (_holdRedraw, category) {
530
- var series = this.series,
531
- chart = series.chart,
532
- drilldown = chart.options.drilldown,
533
- i = (drilldown.series || []).length,
534
- seriesOptions;
535
-
536
- if (!chart.ddDupes) {
537
- chart.ddDupes = [];
538
- }
539
-
540
- while (i-- && !seriesOptions) {
541
- if (drilldown.series[i].id === this.drilldown && inArray(this.drilldown, chart.ddDupes) === -1) {
542
- seriesOptions = drilldown.series[i];
543
- chart.ddDupes.push(this.drilldown);
544
- }
545
- }
546
-
547
- // Fire the event. If seriesOptions is undefined, the implementer can check for
548
- // seriesOptions, and call addSeriesAsDrilldown async if necessary.
549
- fireEvent(chart, 'drilldown', {
550
- point: this,
551
- seriesOptions: seriesOptions,
552
- category: category,
553
- points: category !== undefined && this.series.xAxis.ddPoints[category].slice(0)
554
- });
555
-
556
- if (seriesOptions) {
557
- if (_holdRedraw) {
558
- chart.addSingleSeriesAsDrilldown(this, seriesOptions);
559
- } else {
560
- chart.addSeriesAsDrilldown(this, seriesOptions);
561
- }
562
- }
563
- };
564
-
565
- /**
566
- * Drill down to a given category. This is the same as clicking on an axis label.
567
- */
568
- H.Axis.prototype.drilldownCategory = function (x) {
569
- var key,
570
- point,
571
- ddPointsX = this.ddPoints[x];
572
- for (key in ddPointsX) {
573
- point = ddPointsX[key];
574
- if (point && point.series && point.series.visible && point.doDrilldown) { // #3197
575
- point.doDrilldown(true, x);
576
- }
577
- }
578
- this.chart.applyDrilldown();
579
- };
580
-
581
- /**
582
- * Create and return a collection of points associated with the X position. Reset it for each level.
583
- */
584
- H.Axis.prototype.getDDPoints = function (x, levelNumber) {
585
- var ddPoints = this.ddPoints;
586
- if (!ddPoints) {
587
- this.ddPoints = ddPoints = {};
588
- }
589
- if (!ddPoints[x]) {
590
- ddPoints[x] = [];
591
- }
592
- if (ddPoints[x].levelNumber !== levelNumber) {
593
- ddPoints[x].length = 0; // reset
594
- }
595
- return ddPoints[x];
596
- };
597
-
598
-
599
- /**
600
- * Make a tick label drillable, or remove drilling on update
601
- */
602
- Tick.prototype.drillable = function () {
603
- var pos = this.pos,
604
- label = this.label,
605
- axis = this.axis,
606
- ddPointsX = axis.ddPoints && axis.ddPoints[pos];
607
-
608
- if (label && ddPointsX && ddPointsX.length) {
609
- if (!label.basicStyles) {
610
- label.basicStyles = H.merge(label.styles);
611
- }
612
- label
613
- .addClass('highcharts-drilldown-axis-label')
614
- .css(axis.chart.options.drilldown.activeAxisLabelStyle)
615
- .on('click', function () {
616
- axis.drilldownCategory(pos);
617
- });
618
-
619
- } else if (label && label.basicStyles) {
620
- label.styles = {}; // reset for full overwrite of styles
621
- label.css(label.basicStyles);
622
- label.on('click', null); // #3806
623
- }
624
- };
625
-
626
- /**
627
- * Always keep the drillability updated (#3951)
628
- */
629
- wrap(Tick.prototype, 'addLabel', function (proceed) {
630
- proceed.call(this);
631
- this.drillable();
632
- });
633
-
634
-
635
- /**
636
- * On initialization of each point, identify its label and make it clickable. Also, provide a
637
- * list of points associated to that label.
638
- */
639
- wrap(H.Point.prototype, 'init', function (proceed, series, options, x) {
640
- var point = proceed.call(this, series, options, x),
641
- xAxis = series.xAxis,
642
- tick = xAxis && xAxis.ticks[x],
643
- ddPointsX = xAxis && xAxis.getDDPoints(x, series.options._levelNumber);
644
-
645
- if (point.drilldown) {
646
-
647
- // Add the click event to the point
648
- H.addEvent(point, 'click', function () {
649
- if (series.xAxis && series.chart.options.drilldown.allowPointDrilldown === false) {
650
- series.xAxis.drilldownCategory(x);
651
- } else {
652
- point.doDrilldown();
653
- }
654
- });
655
- /*wrap(point, 'importEvents', function (proceed) { // wrapping importEvents makes point.click event work
656
- if (!this.hasImportedEvents) {
657
- proceed.call(this);
658
- H.addEvent(this, 'click', function () {
659
- this.doDrilldown();
660
- });
661
- }
662
- });*/
663
-
664
-
665
- // Register drilldown points on this X value
666
- if (ddPointsX) {
667
- ddPointsX.push(point);
668
- ddPointsX.levelNumber = series.options._levelNumber;
669
- }
670
-
671
- }
672
-
673
- // Add or remove click handler and style on the tick label
674
- if (tick) {
675
- tick.drillable();
676
- }
677
-
678
- return point;
679
- });
680
-
681
- wrap(H.Series.prototype, 'drawDataLabels', function (proceed) {
682
- var css = this.chart.options.drilldown.activeDataLabelStyle;
683
-
684
- proceed.call(this);
685
-
686
- each(this.points, function (point) {
687
- if (point.drilldown && point.dataLabel) {
688
- point.dataLabel
689
- .attr({
690
- 'class': 'highcharts-drilldown-data-label'
691
- })
692
- .css(css);
693
- }
694
- });
695
- });
696
-
697
- // Mark the trackers with a pointer
698
- var type,
699
- drawTrackerWrapper = function (proceed) {
700
- proceed.call(this);
701
- each(this.points, function (point) {
702
- if (point.drilldown && point.graphic) {
703
- point.graphic
704
- .attr({
705
- 'class': 'highcharts-drilldown-point'
706
- })
707
- .css({ cursor: 'pointer' });
708
- }
709
- });
710
- };
711
- for (type in seriesTypes) {
712
- if (seriesTypes[type].prototype.supportsDrilldown) {
713
- wrap(seriesTypes[type].prototype, 'drawTracker', drawTrackerWrapper);
714
- }
715
- }
716
-
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
+ * Highcharts Drilldown module
20
+ *
21
+ * Author: Torstein Honsi
22
+ * License: www.highcharts.com/license
23
+ *
24
+ */
25
+
26
+
27
+ var noop = H.noop,
28
+ color = H.color,
29
+ defaultOptions = H.defaultOptions,
30
+ each = H.each,
31
+ extend = H.extend,
32
+ format = H.format,
33
+ objectEach = H.objectEach,
34
+ pick = H.pick,
35
+ wrap = H.wrap,
36
+ Chart = H.Chart,
37
+ seriesTypes = H.seriesTypes,
38
+ PieSeries = seriesTypes.pie,
39
+ ColumnSeries = seriesTypes.column,
40
+ Tick = H.Tick,
41
+ fireEvent = H.fireEvent,
42
+ inArray = H.inArray,
43
+ ddSeriesId = 1;
44
+
45
+ // Utilities
46
+ /*
47
+ * Return an intermediate color between two colors, according to pos where 0
48
+ * is the from color and 1 is the to color. This method is copied from ColorAxis.js
49
+ * and should always be kept updated, until we get AMD support.
50
+ */
51
+ function tweenColors(from, to, pos) {
52
+ // Check for has alpha, because rgba colors perform worse due to lack of
53
+ // support in WebKit.
54
+ var hasAlpha,
55
+ ret;
56
+
57
+ // Unsupported color, return to-color (#3920)
58
+ if (!to.rgba.length || !from.rgba.length) {
59
+ ret = to.input || 'none';
60
+
61
+ // Interpolate
62
+ } else {
63
+ from = from.rgba;
64
+ to = to.rgba;
65
+ hasAlpha = (to[3] !== 1 || from[3] !== 1);
66
+ ret = (hasAlpha ? 'rgba(' : 'rgb(') +
67
+ Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
68
+ Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
69
+ Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
70
+ (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
71
+ }
72
+ return ret;
73
+ }
74
+ /**
75
+ * Handle animation of the color attributes directly
76
+ */
77
+ each(['fill', 'stroke'], function(prop) {
78
+ H.Fx.prototype[prop + 'Setter'] = function() {
79
+ this.elem.attr(
80
+ prop,
81
+ tweenColors(color(this.start), color(this.end), this.pos),
82
+ null,
83
+ true
84
+ );
85
+ };
86
+ });
87
+
88
+ // Add language
89
+ extend(defaultOptions.lang, {
90
+ drillUpText: '◁ Back to {series.name}'
91
+ });
92
+ defaultOptions.drilldown = {
93
+
94
+ animation: {
95
+ duration: 500
96
+ },
97
+ drillUpButton: {
98
+ position: {
99
+ align: 'right',
100
+ x: -10,
101
+ y: 10
102
+ }
103
+ // relativeTo: 'plotBox'
104
+ // theme
105
+ }
106
+ };
107
+
108
+ /**
109
+ * A general fadeIn method
110
+ */
111
+ H.SVGRenderer.prototype.Element.prototype.fadeIn = function(animation) {
112
+ this
113
+ .attr({
114
+ opacity: 0.1,
115
+ visibility: 'inherit'
116
+ })
117
+ .animate({
118
+ opacity: pick(this.newOpacity, 1) // newOpacity used in maps
119
+ }, animation || {
120
+ duration: 250
121
+ });
122
+ };
123
+
124
+ /**
125
+ * Add a series to the chart as drilldown from a specific point in the parent
126
+ * series. This method is used for async drilldown, when clicking a point in a
127
+ * series should result in loading and displaying a more high-resolution series.
128
+ * When not async, the setup is simpler using the {@link
129
+ * https://api.highcharts.com/highcharts/drilldown.series|drilldown.series}
130
+ * options structure.
131
+ *
132
+ * @memberOf Highcharts.Chart
133
+ * @function #addSeriesAsDrilldown
134
+ *
135
+ * @param {Highcharts.Point} point
136
+ * The point from which the drilldown will start.
137
+ * @param {SeriesOptions} options
138
+ * The series options for the new, detailed series.
139
+ *
140
+ * @sample highcharts/drilldown/async/ Async drilldown
141
+ */
142
+ Chart.prototype.addSeriesAsDrilldown = function(point, options) {
143
+ this.addSingleSeriesAsDrilldown(point, options);
144
+ this.applyDrilldown();
145
+ };
146
+ Chart.prototype.addSingleSeriesAsDrilldown = function(point, ddOptions) {
147
+ var oldSeries = point.series,
148
+ xAxis = oldSeries.xAxis,
149
+ yAxis = oldSeries.yAxis,
150
+ newSeries,
151
+ pointIndex,
152
+ levelSeries = [],
153
+ levelSeriesOptions = [],
154
+ level,
155
+ levelNumber,
156
+ last,
157
+ colorProp;
158
+
159
+
160
+
161
+ colorProp = {
162
+ colorIndex: pick(point.colorIndex, oldSeries.colorIndex)
163
+ };
164
+
165
+
166
+ if (!this.drilldownLevels) {
167
+ this.drilldownLevels = [];
168
+ }
169
+
170
+ levelNumber = oldSeries.options._levelNumber || 0;
171
+
172
+ // See if we can reuse the registered series from last run
173
+ last = this.drilldownLevels[this.drilldownLevels.length - 1];
174
+ if (last && last.levelNumber !== levelNumber) {
175
+ last = undefined;
176
+ }
177
+
178
+ ddOptions = extend(extend({
179
+ _ddSeriesId: ddSeriesId++
180
+ }, colorProp), ddOptions);
181
+ pointIndex = inArray(point, oldSeries.points);
182
+
183
+ // Record options for all current series
184
+ each(oldSeries.chart.series, function(series) {
185
+ if (series.xAxis === xAxis && !series.isDrilling) {
186
+ series.options._ddSeriesId = series.options._ddSeriesId || ddSeriesId++;
187
+ series.options._colorIndex = series.userOptions._colorIndex;
188
+ series.options._levelNumber = series.options._levelNumber || levelNumber; // #3182
189
+
190
+ if (last) {
191
+ levelSeries = last.levelSeries;
192
+ levelSeriesOptions = last.levelSeriesOptions;
193
+ } else {
194
+ levelSeries.push(series);
195
+ levelSeriesOptions.push(series.options);
196
+ }
197
+ }
198
+ });
199
+
200
+ // Add a record of properties for each drilldown level
201
+ level = extend({
202
+ levelNumber: levelNumber,
203
+ seriesOptions: oldSeries.options,
204
+ levelSeriesOptions: levelSeriesOptions,
205
+ levelSeries: levelSeries,
206
+ shapeArgs: point.shapeArgs,
207
+ bBox: point.graphic ? point.graphic.getBBox() : {}, // no graphic in line series with markers disabled
208
+ color: point.isNull ? new H.Color(color).setOpacity(0).get() : color,
209
+ lowerSeriesOptions: ddOptions,
210
+ pointOptions: oldSeries.options.data[pointIndex],
211
+ pointIndex: pointIndex,
212
+ oldExtremes: {
213
+ xMin: xAxis && xAxis.userMin,
214
+ xMax: xAxis && xAxis.userMax,
215
+ yMin: yAxis && yAxis.userMin,
216
+ yMax: yAxis && yAxis.userMax
217
+ }
218
+ }, colorProp);
219
+
220
+ // Push it to the lookup array
221
+ this.drilldownLevels.push(level);
222
+
223
+ newSeries = level.lowerSeries = this.addSeries(ddOptions, false);
224
+ newSeries.options._levelNumber = levelNumber + 1;
225
+ if (xAxis) {
226
+ xAxis.oldPos = xAxis.pos;
227
+ xAxis.userMin = xAxis.userMax = null;
228
+ yAxis.userMin = yAxis.userMax = null;
229
+ }
230
+
231
+ // Run fancy cross-animation on supported and equal types
232
+ if (oldSeries.type === newSeries.type) {
233
+ newSeries.animate = newSeries.animateDrilldown || noop;
234
+ newSeries.options.animation = true;
235
+ }
236
+ };
237
+
238
+ Chart.prototype.applyDrilldown = function() {
239
+ var drilldownLevels = this.drilldownLevels,
240
+ levelToRemove;
241
+
242
+ if (drilldownLevels && drilldownLevels.length > 0) { // #3352, async loading
243
+ levelToRemove = drilldownLevels[drilldownLevels.length - 1].levelNumber;
244
+ each(this.drilldownLevels, function(level) {
245
+ if (level.levelNumber === levelToRemove) {
246
+ each(level.levelSeries, function(series) {
247
+ if (series.options && series.options._levelNumber === levelToRemove) { // Not removed, not added as part of a multi-series drilldown
248
+ series.remove(false);
249
+ }
250
+ });
251
+ }
252
+ });
253
+ }
254
+
255
+ this.redraw();
256
+ this.showDrillUpButton();
257
+ };
258
+
259
+ Chart.prototype.getDrilldownBackText = function() {
260
+ var drilldownLevels = this.drilldownLevels,
261
+ lastLevel;
262
+ if (drilldownLevels && drilldownLevels.length > 0) { // #3352, async loading
263
+ lastLevel = drilldownLevels[drilldownLevels.length - 1];
264
+ lastLevel.series = lastLevel.seriesOptions;
265
+ return format(this.options.lang.drillUpText, lastLevel);
266
+ }
267
+
268
+ };
269
+
270
+ Chart.prototype.showDrillUpButton = function() {
271
+ var chart = this,
272
+ backText = this.getDrilldownBackText(),
273
+ buttonOptions = chart.options.drilldown.drillUpButton,
274
+ attr,
275
+ states;
276
+
277
+
278
+ if (!this.drillUpButton) {
279
+ attr = buttonOptions.theme;
280
+ states = attr && attr.states;
281
+
282
+ this.drillUpButton = this.renderer.button(
283
+ backText,
284
+ null,
285
+ null,
286
+ function() {
287
+ chart.drillUp();
288
+ },
289
+ attr,
290
+ states && states.hover,
291
+ states && states.select
292
+ )
293
+ .addClass('highcharts-drillup-button')
294
+ .attr({
295
+ align: buttonOptions.position.align,
296
+ zIndex: 7
297
+ })
298
+ .add()
299
+ .align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox');
300
+ } else {
301
+ this.drillUpButton.attr({
302
+ text: backText
303
+ })
304
+ .align();
305
+ }
306
+ };
307
+
308
+ /**
309
+ * When the chart is drilled down to a child series, calling `chart.drillUp()`
310
+ * will drill up to the parent series.
311
+ *
312
+ * @memberOf Highcharts.Chart
313
+ * @name #drillUp
314
+ */
315
+ Chart.prototype.drillUp = function() {
316
+ var chart = this,
317
+ drilldownLevels = chart.drilldownLevels,
318
+ levelNumber = drilldownLevels[drilldownLevels.length - 1].levelNumber,
319
+ i = drilldownLevels.length,
320
+ chartSeries = chart.series,
321
+ seriesI,
322
+ level,
323
+ oldSeries,
324
+ newSeries,
325
+ oldExtremes,
326
+ addSeries = function(seriesOptions) {
327
+ var addedSeries;
328
+ each(chartSeries, function(series) {
329
+ if (series.options._ddSeriesId === seriesOptions._ddSeriesId) {
330
+ addedSeries = series;
331
+ }
332
+ });
333
+
334
+ addedSeries = addedSeries || chart.addSeries(seriesOptions, false);
335
+ if (addedSeries.type === oldSeries.type && addedSeries.animateDrillupTo) {
336
+ addedSeries.animate = addedSeries.animateDrillupTo;
337
+ }
338
+ if (seriesOptions === level.seriesOptions) {
339
+ newSeries = addedSeries;
340
+ }
341
+ };
342
+
343
+ while (i--) {
344
+
345
+ level = drilldownLevels[i];
346
+ if (level.levelNumber === levelNumber) {
347
+ drilldownLevels.pop();
348
+
349
+ // Get the lower series by reference or id
350
+ oldSeries = level.lowerSeries;
351
+ if (!oldSeries.chart) { // #2786
352
+ seriesI = chartSeries.length; // #2919
353
+ while (seriesI--) {
354
+ if (chartSeries[seriesI].options.id === level.lowerSeriesOptions.id &&
355
+ chartSeries[seriesI].options._levelNumber === levelNumber + 1) { // #3867
356
+ oldSeries = chartSeries[seriesI];
357
+ break;
358
+ }
359
+ }
360
+ }
361
+ oldSeries.xData = []; // Overcome problems with minRange (#2898)
362
+
363
+ each(level.levelSeriesOptions, addSeries);
364
+
365
+ fireEvent(chart, 'drillup', {
366
+ seriesOptions: level.seriesOptions
367
+ });
368
+
369
+ if (newSeries.type === oldSeries.type) {
370
+ newSeries.drilldownLevel = level;
371
+ newSeries.options.animation = chart.options.drilldown.animation;
372
+
373
+ if (oldSeries.animateDrillupFrom && oldSeries.chart) { // #2919
374
+ oldSeries.animateDrillupFrom(level);
375
+ }
376
+ }
377
+ newSeries.options._levelNumber = levelNumber;
378
+
379
+ oldSeries.remove(false);
380
+
381
+ // Reset the zoom level of the upper series
382
+ if (newSeries.xAxis) {
383
+ oldExtremes = level.oldExtremes;
384
+ newSeries.xAxis.setExtremes(oldExtremes.xMin, oldExtremes.xMax, false);
385
+ newSeries.yAxis.setExtremes(oldExtremes.yMin, oldExtremes.yMax, false);
386
+ }
387
+ }
388
+ }
389
+
390
+ // Fire a once-off event after all series have been drilled up (#5158)
391
+ fireEvent(chart, 'drillupall');
392
+
393
+ this.redraw();
394
+
395
+ if (this.drilldownLevels.length === 0) {
396
+ this.drillUpButton = this.drillUpButton.destroy();
397
+ } else {
398
+ this.drillUpButton.attr({
399
+ text: this.getDrilldownBackText()
400
+ })
401
+ .align();
402
+ }
403
+
404
+ this.ddDupes.length = []; // #3315
405
+ };
406
+
407
+
408
+ ColumnSeries.prototype.supportsDrilldown = true;
409
+
410
+ /**
411
+ * When drilling up, keep the upper series invisible until the lower series has
412
+ * moved into place
413
+ */
414
+ ColumnSeries.prototype.animateDrillupTo = function(init) {
415
+ if (!init) {
416
+ var newSeries = this,
417
+ level = newSeries.drilldownLevel;
418
+
419
+ // First hide all items before animating in again
420
+ each(this.points, function(point) {
421
+ var dataLabel = point.dataLabel;
422
+
423
+ if (point.graphic) { // #3407
424
+ point.graphic.hide();
425
+ }
426
+
427
+ if (dataLabel) {
428
+ // The data label is initially hidden, make sure it is not faded
429
+ // in (#6127)
430
+ dataLabel.hidden = dataLabel.attr('visibility') === 'hidden';
431
+
432
+ if (!dataLabel.hidden) {
433
+ dataLabel.hide();
434
+ if (point.connector) {
435
+ point.connector.hide();
436
+ }
437
+ }
438
+ }
439
+ });
440
+
441
+
442
+ // Do dummy animation on first point to get to complete
443
+ setTimeout(function() {
444
+ if (newSeries.points) { // May be destroyed in the meantime, #3389
445
+ each(newSeries.points, function(point, i) {
446
+ // Fade in other points
447
+ var verb =
448
+ i === (level && level.pointIndex) ? 'show' : 'fadeIn',
449
+ inherit = verb === 'show' ? true : undefined,
450
+ dataLabel = point.dataLabel;
451
+
452
+
453
+ if (point.graphic) { // #3407
454
+ point.graphic[verb](inherit);
455
+ }
456
+
457
+ if (dataLabel && !dataLabel.hidden) { // #6127
458
+ dataLabel[verb](inherit);
459
+ if (point.connector) {
460
+ point.connector[verb](inherit);
461
+ }
462
+ }
463
+ });
464
+ }
465
+ }, Math.max(this.chart.options.drilldown.animation.duration - 50, 0));
466
+
467
+ // Reset
468
+ this.animate = noop;
469
+ }
470
+
471
+ };
472
+
473
+ ColumnSeries.prototype.animateDrilldown = function(init) {
474
+ var series = this,
475
+ drilldownLevels = this.chart.drilldownLevels,
476
+ animateFrom,
477
+ animationOptions = this.chart.options.drilldown.animation,
478
+ xAxis = this.xAxis;
479
+
480
+ if (!init) {
481
+ each(drilldownLevels, function(level) {
482
+ if (series.options._ddSeriesId === level.lowerSeriesOptions._ddSeriesId) {
483
+ animateFrom = level.shapeArgs;
484
+
485
+ }
486
+ });
487
+
488
+ animateFrom.x += (pick(xAxis.oldPos, xAxis.pos) - xAxis.pos);
489
+
490
+ each(this.points, function(point) {
491
+ var animateTo = point.shapeArgs;
492
+
493
+
494
+
495
+ if (point.graphic) {
496
+ point.graphic
497
+ .attr(animateFrom)
498
+ .animate(
499
+ extend(point.shapeArgs, {
500
+ fill: point.color || series.color
501
+ }),
502
+ animationOptions
503
+ );
504
+ }
505
+ if (point.dataLabel) {
506
+ point.dataLabel.fadeIn(animationOptions);
507
+ }
508
+ });
509
+ this.animate = null;
510
+ }
511
+
512
+ };
513
+
514
+ /**
515
+ * When drilling up, pull out the individual point graphics from the lower series
516
+ * and animate them into the origin point in the upper series.
517
+ */
518
+ ColumnSeries.prototype.animateDrillupFrom = function(level) {
519
+ var animationOptions = this.chart.options.drilldown.animation,
520
+ group = this.group,
521
+ // For 3d column series all columns are added to one group
522
+ // so we should not delete the whole group. #5297
523
+ removeGroup = group !== this.chart.seriesGroup,
524
+ series = this;
525
+
526
+ // Cancel mouse events on the series group (#2787)
527
+ each(series.trackerGroups, function(key) {
528
+ if (series[key]) { // we don't always have dataLabelsGroup
529
+ series[key].on('mouseover');
530
+ }
531
+ });
532
+
533
+ if (removeGroup) {
534
+ delete this.group;
535
+ }
536
+
537
+ each(this.points, function(point) {
538
+ var graphic = point.graphic,
539
+ animateTo = level.shapeArgs,
540
+ complete = function() {
541
+ graphic.destroy();
542
+ if (group && removeGroup) {
543
+ group = group.destroy();
544
+ }
545
+ };
546
+
547
+ if (graphic) {
548
+
549
+ delete point.graphic;
550
+
551
+
552
+
553
+ if (animationOptions) {
554
+ graphic.animate(
555
+ animateTo,
556
+ H.merge(animationOptions, {
557
+ complete: complete
558
+ })
559
+ );
560
+ } else {
561
+ graphic.attr(animateTo);
562
+ complete();
563
+ }
564
+ }
565
+ });
566
+ };
567
+
568
+ if (PieSeries) {
569
+ extend(PieSeries.prototype, {
570
+ supportsDrilldown: true,
571
+ animateDrillupTo: ColumnSeries.prototype.animateDrillupTo,
572
+ animateDrillupFrom: ColumnSeries.prototype.animateDrillupFrom,
573
+
574
+ animateDrilldown: function(init) {
575
+ var level = this.chart.drilldownLevels[this.chart.drilldownLevels.length - 1],
576
+ animationOptions = this.chart.options.drilldown.animation,
577
+ animateFrom = level.shapeArgs,
578
+ start = animateFrom.start,
579
+ angle = animateFrom.end - start,
580
+ startAngle = angle / this.points.length;
581
+
582
+ if (!init) {
583
+ each(this.points, function(point, i) {
584
+ var animateTo = point.shapeArgs;
585
+
586
+
587
+
588
+ if (point.graphic) {
589
+ point.graphic
590
+ .attr(H.merge(animateFrom, {
591
+ start: start + i * startAngle,
592
+ end: start + (i + 1) * startAngle
593
+ }))[animationOptions ? 'animate' : 'attr'](
594
+ animateTo,
595
+ animationOptions
596
+ );
597
+ }
598
+ });
599
+ this.animate = null;
600
+ }
601
+ }
602
+ });
603
+ }
604
+
605
+ H.Point.prototype.doDrilldown = function(_holdRedraw, category, originalEvent) {
606
+ var series = this.series,
607
+ chart = series.chart,
608
+ drilldown = chart.options.drilldown,
609
+ i = (drilldown.series || []).length,
610
+ seriesOptions;
611
+
612
+ if (!chart.ddDupes) {
613
+ chart.ddDupes = [];
614
+ }
615
+
616
+ while (i-- && !seriesOptions) {
617
+ if (drilldown.series[i].id === this.drilldown && inArray(this.drilldown, chart.ddDupes) === -1) {
618
+ seriesOptions = drilldown.series[i];
619
+ chart.ddDupes.push(this.drilldown);
620
+ }
621
+ }
622
+
623
+ // Fire the event. If seriesOptions is undefined, the implementer can check for
624
+ // seriesOptions, and call addSeriesAsDrilldown async if necessary.
625
+ fireEvent(chart, 'drilldown', {
626
+ point: this,
627
+ seriesOptions: seriesOptions,
628
+ category: category,
629
+ originalEvent: originalEvent,
630
+ points: category !== undefined && this.series.xAxis.getDDPoints(category).slice(0)
631
+ }, function(e) {
632
+ var chart = e.point.series && e.point.series.chart,
633
+ seriesOptions = e.seriesOptions;
634
+ if (chart && seriesOptions) {
635
+ if (_holdRedraw) {
636
+ chart.addSingleSeriesAsDrilldown(e.point, seriesOptions);
637
+ } else {
638
+ chart.addSeriesAsDrilldown(e.point, seriesOptions);
639
+ }
640
+ }
641
+ });
642
+
643
+
644
+ };
645
+
646
+ /**
647
+ * Drill down to a given category. This is the same as clicking on an axis label.
648
+ */
649
+ H.Axis.prototype.drilldownCategory = function(x, e) {
650
+ objectEach(this.getDDPoints(x), function(point) {
651
+ if (point && point.series && point.series.visible && point.doDrilldown) { // #3197
652
+ point.doDrilldown(true, x, e);
653
+ }
654
+ });
655
+ this.chart.applyDrilldown();
656
+ };
657
+
658
+ /**
659
+ * Return drillable points for this specific X value
660
+ */
661
+ H.Axis.prototype.getDDPoints = function(x) {
662
+ var ret = [];
663
+ each(this.series, function(series) {
664
+ var i,
665
+ xData = series.xData,
666
+ points = series.points;
667
+
668
+ for (i = 0; i < xData.length; i++) {
669
+ if (xData[i] === x && series.options.data[i] && series.options.data[i].drilldown) {
670
+ ret.push(points ? points[i] : true);
671
+ break;
672
+ }
673
+ }
674
+ });
675
+ return ret;
676
+ };
677
+
678
+
679
+ /**
680
+ * Make a tick label drillable, or remove drilling on update
681
+ */
682
+ Tick.prototype.drillable = function() {
683
+ var pos = this.pos,
684
+ label = this.label,
685
+ axis = this.axis,
686
+ isDrillable = axis.coll === 'xAxis' && axis.getDDPoints,
687
+ ddPointsX = isDrillable && axis.getDDPoints(pos);
688
+
689
+ if (isDrillable) {
690
+ if (label && ddPointsX.length) {
691
+ label.drillable = true;
692
+
693
+
694
+
695
+ label
696
+ .addClass('highcharts-drilldown-axis-label')
697
+
698
+ .on('click', function(e) {
699
+ axis.drilldownCategory(pos, e);
700
+ });
701
+
702
+ } else if (label && label.drillable) {
703
+
704
+
705
+
706
+ label.on('click', null); // #3806
707
+ label.removeClass('highcharts-drilldown-axis-label');
708
+ }
709
+ }
710
+ };
711
+
712
+ /**
713
+ * Always keep the drillability updated (#3951)
714
+ */
715
+ wrap(Tick.prototype, 'addLabel', function(proceed) {
716
+ proceed.call(this);
717
+ this.drillable();
718
+ });
719
+
720
+
721
+ /**
722
+ * On initialization of each point, identify its label and make it clickable. Also, provide a
723
+ * list of points associated to that label.
724
+ */
725
+ wrap(H.Point.prototype, 'init', function(proceed, series, options, x) {
726
+ var point = proceed.call(this, series, options, x),
727
+ xAxis = series.xAxis,
728
+ tick = xAxis && xAxis.ticks[x];
729
+
730
+ if (point.drilldown) {
731
+
732
+ // Add the click event to the point
733
+ H.addEvent(point, 'click', function(e) {
734
+ if (series.xAxis && series.chart.options.drilldown.allowPointDrilldown === false) {
735
+ series.xAxis.drilldownCategory(point.x, e); // #5822, x changed
736
+ } else {
737
+ point.doDrilldown(undefined, undefined, e);
738
+ }
739
+ });
740
+ /*wrap(point, 'importEvents', function (proceed) { // wrapping importEvents makes point.click event work
741
+ if (!this.hasImportedEvents) {
742
+ proceed.call(this);
743
+ H.addEvent(this, 'click', function () {
744
+ this.doDrilldown();
745
+ });
746
+ }
747
+ });*/
748
+
749
+ }
750
+
751
+ // Add or remove click handler and style on the tick label
752
+ if (tick) {
753
+ tick.drillable();
754
+ }
755
+
756
+ return point;
757
+ });
758
+
759
+ wrap(H.Series.prototype, 'drawDataLabels', function(proceed) {
760
+ var css = this.chart.options.drilldown.activeDataLabelStyle,
761
+ renderer = this.chart.renderer;
762
+
763
+ proceed.call(this);
764
+
765
+ each(this.points, function(point) {
766
+ var pointCSS = {};
767
+ if (point.drilldown && point.dataLabel) {
768
+ if (css.color === 'contrast') {
769
+ pointCSS.color = renderer.getContrast(point.color || this.color);
770
+ }
771
+ point.dataLabel
772
+ .addClass('highcharts-drilldown-data-label');
773
+
774
+
775
+ }
776
+ }, this);
777
+ });
778
+
779
+ // Mark the trackers with a pointer
780
+ var drawTrackerWrapper = function(proceed) {
781
+ proceed.call(this);
782
+ each(this.points, function(point) {
783
+ if (point.drilldown && point.graphic) {
784
+ point.graphic.addClass('highcharts-drilldown-point');
785
+
786
+
787
+ }
788
+ });
789
+ };
790
+
791
+ objectEach(seriesTypes, function(seriesType) {
792
+ if (seriesType.prototype.supportsDrilldown) {
793
+ wrap(seriesType.prototype, 'drawTracker', drawTrackerWrapper);
794
+ }
795
+ });
796
+
797
+ }(Highcharts));
717
798
  }));