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,30 +1,29 @@
1
1
  /*
2
- Highstock JS v2.1.10 (2015-12-07)
2
+ Highcharts JS v5.0.11 (2017-05-04)
3
3
 
4
4
  (c) 2014 Highsoft AS
5
5
  Authors: Jon Arild Nygard / Oystein Moseng
6
6
 
7
7
  License: www.highcharts.com/license
8
8
  */
9
- (function(f){typeof module==="object"&&module.exports?module.exports=f:f(Highcharts)})(function(f){var j=f.seriesTypes,A=f.map,o=f.merge,t=f.extend,u=f.extendClass,v=f.getOptions().plotOptions,w=function(){},k=f.each,s=f.grep,i=f.pick,m=f.Series,B=f.stableSort,x=f.Color,C=function(a,b,c){var d,c=c||this;for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a)},y=function(a,b,c,d){d=d||this;a=a||[];k(a,function(e,g){c=b.call(d,c,e,g,a)});return c},r=function(a,b,c){c=c||this;a=b.call(c,a);a!==!1&&r(a,b,
10
- c)};v.treemap=o(v.scatter,{showInLegend:!1,marker:!1,borderColor:"#E0E0E0",borderWidth:1,dataLabels:{enabled:!0,defer:!1,verticalAlign:"middle",formatter:function(){return this.point.name||this.point.id},inside:!0},tooltip:{headerFormat:"",pointFormat:"<b>{point.name}</b>: {point.node.val}</b><br/>"},layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,states:{hover:{borderColor:"#A0A0A0",brightness:j.heatmap?0:0.1,shadow:!1}},drillUpButton:{position:{align:"right",
11
- x:-10,y:10}}});j.treemap=u(j.scatter,o({pointAttrToOptions:{},pointArrayMap:["value"],axisTypes:j.heatmap?["xAxis","yAxis","colorAxis"]:["xAxis","yAxis"],optionalAxis:"colorAxis",getSymbol:w,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",translateColors:j.heatmap&&j.heatmap.prototype.translateColors},{type:"treemap",trackerGroups:["group","dataLabelsGroup"],pointClass:u(f.Point,{setVisible:j.pie.prototype.pointClass.prototype.setVisible}),getListOfParents:function(a,b){var c=
12
- y(a,function(a,c,b){c=i(c.parent,"");a[c]===void 0&&(a[c]=[]);a[c].push(b);return a},{});C(c,function(a,c,g){c!==""&&f.inArray(c,b)===-1&&(k(a,function(a){g[""].push(a)}),delete g[c])});return c},getTree:function(){var a,b=this;a=A(this.data,function(a){return a.id});a=b.getListOfParents(this.data,a);b.nodeMap=[];a=b.buildNode("",-1,0,a,null);r(this.nodeMap[this.rootNode],function(a){var d=!1,e=a.parent;a.visible=!0;if(e||e==="")d=b.nodeMap[e];return d});r(this.nodeMap[this.rootNode].children,function(a){var b=
13
- !1;k(a,function(a){a.visible=!0;a.children.length&&(b=(b||[]).concat(a.children))});return b});this.setTreeValues(a);return a},init:function(a,b){m.prototype.init.call(this,a,b);this.options.allowDrillToNode&&this.drillTo()},buildNode:function(a,b,c,d,e){var g=this,h=[],z=g.points[b],q;k(d[a]||[],function(b){q=g.buildNode(g.points[b].id,b,c+1,d,a);h.push(q)});b={id:a,i:b,children:h,level:c,parent:e,visible:!1};g.nodeMap[b.id]=b;if(z)z.node=b;return b},setTreeValues:function(a){var b=this,c=b.options,
14
- d=0,e=[],g,h=b.points[a.i];k(a.children,function(a){a=b.setTreeValues(a);e.push(a);a.ignore?r(a.children,function(a){var c=!1;k(a,function(a){t(a,{ignore:!0,isLeaf:!1,visible:!1});a.children.length&&(c=(c||[]).concat(a.children))});return c}):d+=a.val});B(e,function(a,c){return a.sortIndex-c.sortIndex});g=i(h&&h.value,d);t(a,{children:e,childrenTotal:d,ignore:!(i(h&&h.visible,!0)&&g>0),isLeaf:a.visible&&!d,levelDynamic:c.levelIsConstant?a.level:a.level-b.nodeMap[b.rootNode].level,name:i(h&&h.name,
15
- ""),sortIndex:i(h&&h.sortIndex,-g),val:g});return a},calculateChildrenAreas:function(a,b){var c=this,d=c.options,e=this.levelMap[a.levelDynamic+1],g=i(c[e&&e.layoutAlgorithm]&&e.layoutAlgorithm,d.layoutAlgorithm),h=d.alternateStartingDirection,f=[],d=s(a.children,function(a){return!a.ignore});if(e&&e.layoutStartingDirection)b.direction=e.layoutStartingDirection==="vertical"?0:1;f=c[g](b,d);k(d,function(a,d){var e=f[d];a.values=o(e,{val:a.childrenTotal,direction:h?1-b.direction:b.direction});a.pointValues=
16
- o(e,{x:e.x/c.axisRatio,width:e.width/c.axisRatio});a.children.length&&c.calculateChildrenAreas(a,a.values)})},setPointValues:function(){var a=this.xAxis,b=this.yAxis;k(this.points,function(c){var d=c.node.pointValues,e,g,h;d?(e=Math.round(a.translate(d.x,0,0,0,1)),g=Math.round(a.translate(d.x+d.width,0,0,0,1)),h=Math.round(b.translate(d.y,0,0,0,1)),d=Math.round(b.translate(d.y+d.height,0,0,0,1)),c.shapeType="rect",c.shapeArgs={x:Math.min(e,g),y:Math.min(h,d),width:Math.abs(g-e),height:Math.abs(d-
17
- h)},c.plotX=c.shapeArgs.x+c.shapeArgs.width/2,c.plotY=c.shapeArgs.y+c.shapeArgs.height/2):(delete c.plotX,delete c.plotY)})},setColorRecursive:function(a,b){var c=this,d,e;if(a){d=c.points[a.i];e=c.levelMap[a.levelDynamic];b=i(d&&d.options.color,e&&e.color,b);if(d)d.color=b;a.children.length&&k(a.children,function(a){c.setColorRecursive(a,b)})}},algorithmGroup:function(a,b,c,d){this.height=a;this.width=b;this.plot=d;this.startDirection=this.direction=c;this.lH=this.nH=this.lW=this.nW=this.total=0;
18
- this.elArr=[];this.lP={total:0,lH:0,nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(a,c){return Math.max(a/c,c/a)}};this.addElement=function(a){this.lP.total=this.elArr[this.elArr.length-1];this.total+=a;this.direction===0?(this.lW=this.nW,this.lP.lH=this.lP.total/this.lW,this.lP.lR=this.lP.aspectRatio(this.lW,this.lP.lH),this.nW=this.total/this.height,this.lP.nH=this.lP.total/this.nW,this.lP.nR=this.lP.aspectRatio(this.nW,this.lP.nH)):(this.lH=this.nH,this.lP.lW=this.lP.total/this.lH,this.lP.lR=this.lP.aspectRatio(this.lP.lW,
19
- this.lH),this.nH=this.total/this.width,this.lP.nW=this.lP.total/this.nH,this.lP.nR=this.lP.aspectRatio(this.lP.nW,this.nH));this.elArr.push(a)};this.reset=function(){this.lW=this.nW=0;this.elArr=[];this.total=0}},algorithmCalcPoints:function(a,b,c,d){var e,g,h,f,q=c.lW,n=c.lH,l=c.plot,i,j=0,p=c.elArr.length-1;b?(q=c.nW,n=c.nH):i=c.elArr[c.elArr.length-1];k(c.elArr,function(a){if(b||j<p)c.direction===0?(e=l.x,g=l.y,h=q,f=a/h):(e=l.x,g=l.y,f=n,h=a/f),d.push({x:e,y:g,width:h,height:f}),c.direction===
20
- 0?l.y+=f:l.x+=h;j+=1});c.reset();c.direction===0?c.width-=q:c.height-=n;l.y=l.parent.y+(l.parent.height-c.height);l.x=l.parent.x+(l.parent.width-c.width);if(a)c.direction=1-c.direction;b||c.addElement(i)},algorithmLowAspectRatio:function(a,b,c){var d=[],e=this,g,f={x:b.x,y:b.y,parent:b},i=0,j=c.length-1,n=new this.algorithmGroup(b.height,b.width,b.direction,f);k(c,function(c){g=b.width*b.height*(c.val/b.val);n.addElement(g);n.lP.nR>n.lP.lR&&e.algorithmCalcPoints(a,!1,n,d,f);i===j&&e.algorithmCalcPoints(a,
21
- !0,n,d,f);i+=1});return d},algorithmFill:function(a,b,c){var d=[],e,f=b.direction,h=b.x,i=b.y,j=b.width,n=b.height,l,o,m,p;k(c,function(c){e=b.width*b.height*(c.val/b.val);l=h;o=i;f===0?(p=n,m=e/p,j-=m,h+=m):(m=j,p=e/m,n-=p,i+=p);d.push({x:l,y:o,width:m,height:p});a&&(f=1-f)});return d},strip:function(a,b){return this.algorithmLowAspectRatio(!1,a,b)},squarified:function(a,b){return this.algorithmLowAspectRatio(!0,a,b)},sliceAndDice:function(a,b){return this.algorithmFill(!0,a,b)},stripes:function(a,
22
- b){return this.algorithmFill(!1,a,b)},translate:function(){var a,b;m.prototype.translate.call(this);this.rootNode=i(this.options.rootId,"");this.levelMap=y(this.options.levels,function(a,b){a[b.level]=b;return a},{});b=this.tree=this.getTree();this.axisRatio=this.xAxis.len/this.yAxis.len;this.nodeMap[""].pointValues=a={x:0,y:0,width:100,height:100};this.nodeMap[""].values=a=o(a,{width:a.width*this.axisRatio,direction:this.options.layoutStartingDirection==="vertical"?0:1,val:b.val});this.calculateChildrenAreas(b,
23
- a);this.colorAxis?this.translateColors():this.options.colorByPoint||this.setColorRecursive(this.tree,void 0);b=this.nodeMap[this.rootNode].pointValues;this.xAxis.setExtremes(b.x,b.x+b.width,!1);this.yAxis.setExtremes(b.y,b.y+b.height,!1);this.xAxis.setScale();this.yAxis.setScale();this.setPointValues()},drawDataLabels:function(){var a=this,b=s(a.points,function(a){return a.node.visible}),c,d;k(b,function(b){d=a.levelMap[b.node.levelDynamic];c={style:{}};if(!b.node.isLeaf)c.enabled=!1;if(d&&d.dataLabels)c=
24
- o(c,d.dataLabels),a._hasPointLabels=!0;if(b.shapeArgs)c.style.width=b.shapeArgs.width;b.dlOptions=o(c,b.options.dataLabels)});m.prototype.drawDataLabels.call(this)},alignDataLabel:j.column.prototype.alignDataLabel,pointAttribs:function(a,b){var c=this.levelMap[a.node.levelDynamic]||{},d=this.options,e=b&&d.states[b]||{},c={stroke:a.borderColor||c.borderColor||e.borderColor||d.borderColor,"stroke-width":i(a.borderWidth,c.borderWidth,e.borderWidth,d.borderWidth),dashstyle:a.borderDashStyle||c.borderDashStyle||
25
- e.borderDashStyle||d.borderDashStyle,fill:a.color||this.color,zIndex:b==="hover"?1:0};if(a.node.level<=this.nodeMap[this.rootNode].level)c.fill="none",c["stroke-width"]=0;else if(a.node.isLeaf){if(b)c.fill=x(c.fill).brighten(e.brightness).get()}else c.fill=i(d.interactByLeaf,!d.allowDrillToNode)?"none":x(c.fill).setOpacity(b==="hover"?0.75:0.15).get();return c},drawPoints:function(){var a=this,b=s(a.points,function(a){return a.node.visible});k(b,function(c){var b="levelGroup-"+c.node.levelDynamic;
26
- a[b]||(a[b]=a.chart.renderer.g(b).attr({zIndex:1E3-c.node.levelDynamic}).add(a.group));c.group=a[b];c.pointAttr={"":a.pointAttribs(c),hover:a.pointAttribs(c,"hover"),select:{}}});j.column.prototype.drawPoints.call(this);a.options.allowDrillToNode&&k(b,function(b){var d;if(b.graphic)d=b.drillId=a.options.interactByLeaf?a.drillToByLeaf(b):a.drillToByGroup(b),b.graphic.css({cursor:d?"pointer":"default"})})},drillTo:function(){var a=this;f.addEvent(a,"click",function(b){var b=b.point,c=b.drillId,d;c&&
27
- (d=a.nodeMap[a.rootNode].name||a.rootNode,b.setState(""),a.drillToNode(c),a.showDrillUpButton(d))})},drillToByGroup:function(a){var b=!1;if(a.node.level-this.nodeMap[this.rootNode].level===1&&!a.node.isLeaf)b=a.id;return b},drillToByLeaf:function(a){var b=!1;if(a.node.parent!==this.rootNode&&a.node.isLeaf)for(a=a.node;!b;)if(a=this.nodeMap[a.parent],a.parent===this.rootNode)b=a.id;return b},drillUp:function(){var a=null;this.rootNode&&(a=this.nodeMap[this.rootNode],a=a.parent!==null?this.nodeMap[a.parent]:
28
- this.nodeMap[""]);if(a!==null)this.drillToNode(a.id),a.id===""?this.drillUpButton=this.drillUpButton.destroy():(a=this.nodeMap[a.parent],this.showDrillUpButton(a.name||a.id))},drillToNode:function(a){this.options.rootId=a;this.isDirty=!0;this.chart.redraw()},showDrillUpButton:function(a){var b=this,a=a||"< Back",c=b.options.drillUpButton,d,e;if(c.text)a=c.text;this.drillUpButton?this.drillUpButton.attr({text:a}).align():(e=(d=c.theme)&&d.states,this.drillUpButton=this.chart.renderer.button(a,null,
29
- null,function(){b.drillUp()},d,e&&e.hover,e&&e.select).attr({align:c.position.align,zIndex:9}).add().align(c.position,!1,c.relativeTo||"plotBox"))},buildKDTree:w,drawLegendSymbol:f.LegendSymbolMixin.drawRectangle,getExtremes:function(){m.prototype.getExtremes.call(this,this.colorValueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;m.prototype.getExtremes.call(this)},getExtremesFromAll:!0,bindAxes:function(){var a={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,dataMin:0,minPadding:0,max:100,
30
- dataMax:100,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]};m.prototype.bindAxes.call(this);f.extend(this.yAxis.options,a);f.extend(this.xAxis.options,a)}}))});
9
+ (function(n){"object"===typeof module&&module.exports?module.exports=n:n(Highcharts)})(function(n){(function(f){var n=f.seriesType,q=f.seriesTypes,E=f.map,v=f.merge,y=f.extend,z=f.noop,m=f.each,x=f.grep,F=f.isNumber,A=f.isString,k=f.pick,u=f.Series,G=f.stableSort,H=function(a,b,c){c=c||this;f.objectEach(a,function(e,d){b.call(c,e,d,a)})},B=function(a,b,c,e){e=e||this;a=a||[];m(a,function(d,g){c=b.call(e,c,d,g,a)});return c},w=function(a,b,c){c=c||this;a=b.call(c,a);!1!==a&&w(a,b,c)};n("treemap","scatter",
10
+ {showInLegend:!1,marker:!1,dataLabels:{enabled:!0,defer:!1,verticalAlign:"middle",formatter:function(){return this.point.name||this.point.id},inside:!0},tooltip:{headerFormat:"",pointFormat:"\x3cb\x3e{point.name}\x3c/b\x3e: {point.value}\x3c/b\x3e\x3cbr/\x3e"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,drillUpButton:{position:{align:"right",x:-10,y:10}}},{pointArrayMap:["value"],axisTypes:q.heatmap?["xAxis",
11
+ "yAxis","colorAxis"]:["xAxis","yAxis"],optionalAxis:"colorAxis",getSymbol:z,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",translateColors:q.heatmap&&q.heatmap.prototype.translateColors,trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,b){a=B(a,function(a,b,d){b=k(b.parent,"");void 0===a[b]&&(a[b]=[]);a[b].push(d);return a},{});H(a,function(a,e,d){""!==e&&-1===f.inArray(e,b)&&(m(a,function(a){d[""].push(a)}),delete d[e])});return a},getTree:function(){var a=
12
+ E(this.data,function(a){return a.id}),a=this.getListOfParents(this.data,a);this.nodeMap=[];return this.buildNode("",-1,0,a,null)},init:function(a,b){u.prototype.init.call(this,a,b);this.options.allowDrillToNode&&f.addEvent(this,"click",this.onClickDrillToNode)},buildNode:function(a,b,c,e,d){var g=this,h=[],C=g.points[b],D;m(e[a]||[],function(b){D=g.buildNode(g.points[b].id,b,c+1,e,a);h.push(D)});b={id:a,i:b,children:h,level:c,parent:d,visible:!1};g.nodeMap[b.id]=b;C&&(C.node=b);return b},setTreeValues:function(a){var b=
13
+ this,c=b.options,e=0,d=[],g,h=b.points[a.i];w(b.nodeMap[b.rootNode],function(a){var c=!1,d=a.parent;a.visible=!0;if(d||""===d)c=b.nodeMap[d];return c});w(b.nodeMap[b.rootNode].children,function(a){var b=!1;m(a,function(a){a.visible=!0;a.children.length&&(b=(b||[]).concat(a.children))});return b});m(a.children,function(a){a=b.setTreeValues(a);d.push(a);a.ignore?w(a.children,function(a){var b=!1;m(a,function(a){y(a,{ignore:!0,isLeaf:!1,visible:!1});a.children.length&&(b=(b||[]).concat(a.children))});
14
+ return b}):e+=a.val});G(d,function(a,b){return a.sortIndex-b.sortIndex});g=k(h&&h.options.value,e);h&&(h.value=g);y(a,{children:d,childrenTotal:e,ignore:!(k(h&&h.visible,!0)&&0<g),isLeaf:a.visible&&!e,levelDynamic:c.levelIsConstant?a.level:a.level-b.nodeMap[b.rootNode].level,name:k(h&&h.name,""),sortIndex:k(h&&h.sortIndex,-g),val:g});return a},calculateChildrenAreas:function(a,b){var c=this,e=c.options,d=this.levelMap[a.levelDynamic+1],g=k(c[d&&d.layoutAlgorithm]&&d.layoutAlgorithm,e.layoutAlgorithm),
15
+ h=e.alternateStartingDirection,f=[];a=x(a.children,function(a){return!a.ignore});d&&d.layoutStartingDirection&&(b.direction="vertical"===d.layoutStartingDirection?0:1);f=c[g](b,a);m(a,function(a,d){d=f[d];a.values=v(d,{val:a.childrenTotal,direction:h?1-b.direction:b.direction});a.pointValues=v(d,{x:d.x/c.axisRatio,width:d.width/c.axisRatio});a.children.length&&c.calculateChildrenAreas(a,a.values)})},setPointValues:function(){var a=this.xAxis,b=this.yAxis;m(this.points,function(c){var e=c.node,d=e.pointValues,
16
+ g,h;d&&e.visible?(e=Math.round(a.translate(d.x,0,0,0,1))-0,g=Math.round(a.translate(d.x+d.width,0,0,0,1))-0,h=Math.round(b.translate(d.y,0,0,0,1))-0,d=Math.round(b.translate(d.y+d.height,0,0,0,1))-0,c.shapeType="rect",c.shapeArgs={x:Math.min(e,g),y:Math.min(h,d),width:Math.abs(g-e),height:Math.abs(d-h)},c.plotX=c.shapeArgs.x+c.shapeArgs.width/2,c.plotY=c.shapeArgs.y+c.shapeArgs.height/2):(delete c.plotX,delete c.plotY)})},setColorRecursive:function(a,b,c){var e=this,d,g;a&&(d=e.points[a.i],g=e.levelMap[a.levelDynamic],
17
+ b=k(d&&d.options.color,g&&g.color,b,e.color),c=k(d&&d.options.colorIndex,g&&g.colorIndex,c,e.colorIndex),d&&(d.color=b,d.colorIndex=c),a.children.length&&m(a.children,function(a){e.setColorRecursive(a,b,c)}))},algorithmGroup:function(a,b,c,e){this.height=a;this.width=b;this.plot=e;this.startDirection=this.direction=c;this.lH=this.nH=this.lW=this.nW=this.total=0;this.elArr=[];this.lP={total:0,lH:0,nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(a,b){return Math.max(a/b,b/a)}};this.addElement=function(a){this.lP.total=
18
+ this.elArr[this.elArr.length-1];this.total+=a;0===this.direction?(this.lW=this.nW,this.lP.lH=this.lP.total/this.lW,this.lP.lR=this.lP.aspectRatio(this.lW,this.lP.lH),this.nW=this.total/this.height,this.lP.nH=this.lP.total/this.nW,this.lP.nR=this.lP.aspectRatio(this.nW,this.lP.nH)):(this.lH=this.nH,this.lP.lW=this.lP.total/this.lH,this.lP.lR=this.lP.aspectRatio(this.lP.lW,this.lH),this.nH=this.total/this.width,this.lP.nW=this.lP.total/this.nH,this.lP.nR=this.lP.aspectRatio(this.lP.nW,this.nH));this.elArr.push(a)};
19
+ this.reset=function(){this.lW=this.nW=0;this.elArr=[];this.total=0}},algorithmCalcPoints:function(a,b,c,e){var d,g,h,f,k=c.lW,p=c.lH,l=c.plot,n,r=0,t=c.elArr.length-1;b?(k=c.nW,p=c.nH):n=c.elArr[c.elArr.length-1];m(c.elArr,function(a){if(b||r<t)0===c.direction?(d=l.x,g=l.y,h=k,f=a/h):(d=l.x,g=l.y,f=p,h=a/f),e.push({x:d,y:g,width:h,height:f}),0===c.direction?l.y+=f:l.x+=h;r+=1});c.reset();0===c.direction?c.width-=k:c.height-=p;l.y=l.parent.y+(l.parent.height-c.height);l.x=l.parent.x+(l.parent.width-
20
+ c.width);a&&(c.direction=1-c.direction);b||c.addElement(n)},algorithmLowAspectRatio:function(a,b,c){var e=[],d=this,g,h={x:b.x,y:b.y,parent:b},f=0,k=c.length-1,p=new this.algorithmGroup(b.height,b.width,b.direction,h);m(c,function(c){g=c.val/b.val*b.height*b.width;p.addElement(g);p.lP.nR>p.lP.lR&&d.algorithmCalcPoints(a,!1,p,e,h);f===k&&d.algorithmCalcPoints(a,!0,p,e,h);f+=1});return e},algorithmFill:function(a,b,c){var e=[],d,g=b.direction,f=b.x,k=b.y,n=b.width,p=b.height,l,q,r,t;m(c,function(c){d=
21
+ c.val/b.val*b.height*b.width;l=f;q=k;0===g?(t=p,r=d/t,n-=r,f+=r):(r=n,t=d/r,p-=t,k+=t);e.push({x:l,y:q,width:r,height:t});a&&(g=1-g)});return e},strip:function(a,b){return this.algorithmLowAspectRatio(!1,a,b)},squarified:function(a,b){return this.algorithmLowAspectRatio(!0,a,b)},sliceAndDice:function(a,b){return this.algorithmFill(!0,a,b)},stripes:function(a,b){return this.algorithmFill(!1,a,b)},translate:function(){var a=this.rootNode=k(this.rootNode,this.options.rootId,""),b,c;u.prototype.translate.call(this);
22
+ this.levelMap=B(this.options.levels,function(a,b){a[b.level]=b;return a},{});c=this.tree=this.getTree();b=this.nodeMap[a];""===a||b&&b.children.length||(this.drillToNode("",!1),a=this.rootNode,b=this.nodeMap[a]);this.setTreeValues(c);this.axisRatio=this.xAxis.len/this.yAxis.len;this.nodeMap[""].pointValues=a={x:0,y:0,width:100,height:100};this.nodeMap[""].values=a=v(a,{width:a.width*this.axisRatio,direction:"vertical"===this.options.layoutStartingDirection?0:1,val:c.val});this.calculateChildrenAreas(c,
23
+ a);this.colorAxis?this.translateColors():this.options.colorByPoint||this.setColorRecursive(this.tree);this.options.allowDrillToNode&&(b=b.pointValues,this.xAxis.setExtremes(b.x,b.x+b.width,!1),this.yAxis.setExtremes(b.y,b.y+b.height,!1),this.xAxis.setScale(),this.yAxis.setScale());this.setPointValues()},drawDataLabels:function(){var a=this,b=x(a.points,function(a){return a.node.visible}),c,e;m(b,function(b){e=a.levelMap[b.node.levelDynamic];c={style:{}};b.node.isLeaf||(c.enabled=!1);e&&e.dataLabels&&
24
+ (c=v(c,e.dataLabels),a._hasPointLabels=!0);b.shapeArgs&&(c.style.width=b.shapeArgs.width,b.dataLabel&&b.dataLabel.css({width:b.shapeArgs.width+"px"}));b.dlOptions=v(c,b.options.dataLabels)});u.prototype.drawDataLabels.call(this)},alignDataLabel:function(a){q.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:a.node.zIndex+1})},drawPoints:function(){var a=this,b=x(a.points,function(a){return a.node.visible});m(b,function(b){var c="levelGroup-"+b.node.levelDynamic;
25
+ a[c]||(a[c]=a.chart.renderer.g(c).attr({zIndex:1E3-b.node.levelDynamic}).add(a.group));b.group=a[c]});q.column.prototype.drawPoints.call(this);a.options.allowDrillToNode&&m(b,function(b){b.graphic&&(b.drillId=a.options.interactByLeaf?a.drillToByLeaf(b):a.drillToByGroup(b))})},onClickDrillToNode:function(a){var b=(a=a.point)&&a.drillId;A(b)&&(a.setState(""),this.drillToNode(b))},drillToByGroup:function(a){var b=!1;1!==a.node.level-this.nodeMap[this.rootNode].level||a.node.isLeaf||(b=a.id);return b},
26
+ drillToByLeaf:function(a){var b=!1;if(a.node.parent!==this.rootNode&&a.node.isLeaf)for(a=a.node;!b;)a=this.nodeMap[a.parent],a.parent===this.rootNode&&(b=a.id);return b},drillUp:function(){var a=this.nodeMap[this.rootNode];a&&A(a.parent)&&this.drillToNode(a.parent)},drillToNode:function(a,b){var c=this.nodeMap[a];this.rootNode=a;""===a?this.drillUpButton=this.drillUpButton.destroy():this.showDrillUpButton(c&&c.name||a);this.isDirty=!0;k(b,!0)&&this.chart.redraw()},showDrillUpButton:function(a){var b=
27
+ this;a=a||"\x3c Back";var c=b.options.drillUpButton,e,d;c.text&&(a=c.text);this.drillUpButton?this.drillUpButton.attr({text:a}).align():(d=(e=c.theme)&&e.states,this.drillUpButton=this.chart.renderer.button(a,null,null,function(){b.drillUp()},e,d&&d.hover,d&&d.select).attr({align:c.position.align,zIndex:7}).add().align(c.position,!1,c.relativeTo||"plotBox"))},buildKDTree:z,drawLegendSymbol:f.LegendSymbolMixin.drawRectangle,getExtremes:function(){u.prototype.getExtremes.call(this,this.colorValueData);
28
+ this.valueMin=this.dataMin;this.valueMax=this.dataMax;u.prototype.getExtremes.call(this)},getExtremesFromAll:!0,bindAxes:function(){var a={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,dataMin:0,minPadding:0,max:100,dataMax:100,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]};u.prototype.bindAxes.call(this);f.extend(this.yAxis.options,a);f.extend(this.xAxis.options,a)}},{getClassName:function(){var a=f.Point.prototype.getClassName.call(this),b=this.series,c=b.options;this.node.level<=b.nodeMap[b.rootNode].level?
29
+ a+=" highcharts-above-level":this.node.isLeaf||k(c.interactByLeaf,!c.allowDrillToNode)?this.node.isLeaf||(a+=" highcharts-internal-node"):a+=" highcharts-internal-node-interactive";return a},isValid:function(){return F(this.value)},setState:function(a){f.Point.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})},setVisible:q.pie.prototype.pointClass.prototype.setVisible})})(n)});
@@ -0,0 +1,8 @@
1
+ {
2
+ "version":3,
3
+ "file":"",
4
+ "lineCount":29,
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,CAAA,IAQLC,EAAaD,CAAAC,WARR,CASLC,EAAcF,CAAAE,YATT,CAULC,EAAMH,CAAAG,IAVD,CAWLC,EAAQJ,CAAAI,MAXH,CAYLC,EAASL,CAAAK,OAZJ,CAaLC,EAAON,CAAAM,KAbF,CAcLC,EAAOP,CAAAO,KAdF,CAeLC,EAAOR,CAAAQ,KAfF,CAgBLC,EAAWT,CAAAS,SAhBN,CAiBLC,EAAWV,CAAAU,SAjBN,CAkBLC,EAAOX,CAAAW,KAlBF,CAmBLC,EAASZ,CAAAY,OAnBJ,CAoBLC,EAAab,CAAAa,WApBR,CAsBLC,EAAaA,QAAQ,CAACC,CAAD,CAAOC,CAAP,CAAaC,CAAb,CAAsB,CACvCA,CAAA,CAAUA,CAAV,EAAqB,IACrBjB,EAAAkB,WAAA,CAAaH,CAAb,CAAmB,QAAQ,CAACI,CAAD,CAAMC,CAAN,CAAW,CAClCJ,CAAAK,KAAA,CAAUJ,CAAV,CAAmBE,CAAnB,CAAwBC,CAAxB,CAA6BL,CAA7B,CADkC,CAAtC,CAFuC,CAtBtC,CA4BLO,EAASA,QAAQ,CAACC,CAAD,CAAMP,CAAN,CAAYQ,CAAZ,CAAsBP,CAAtB,CAA+B,CAC5CA,CAAA,CAAUA,CAAV,EAAqB,IACrBM,EAAA,CAAMA,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hDS,CAAZ,CAAA,CA22BCjQ,CA32BD,CADkB,CANtB;",
6
+ "sources":["Input_0"],
7
+ "names":["factory","module","exports","Highcharts","H","seriesType","seriesTypes","map","merge","extend","noop","each","grep","isNumber","isString","pick","Series","stableSort","eachObject","list","func","context","objectEach","val","key","call","reduce","arr","previous","current","i","recursive","item","next","showInLegend","marker","dataLabels","enabled","defer","verticalAlign","formatter","point","name","id","inside","tooltip","headerFormat","pointFormat","ignoreHiddenPoint","layoutAlgorithm","layoutStartingDirection","alternateStartingDirection","levelIsConstant","drillUpButton","position","align","x","y","pointArrayMap","axisTypes","heatmap","optionalAxis","getSymbol","parallelArrays","colorKey","translateColors","prototype","trackerGroups","getListOfParents","data","ids","listOfParents","prev","curr","parent","undefined","push","children","inArray","child","getTree","allIds","d","parentList","series","nodeMap","buildNode","init","chart","options","allowDrillToNode","addEvent","onClickDrillToNode","level","points","node","visible","setTreeValues","tree","childrenTotal","rootNode","p","length","concat","ignore","isLeaf","a","b","sortIndex","value","levelDynamic","calculateChildrenAreas","area","levelMap","algorithm","alternate","childrenValues","n","direction","index","values","pointValues","axisRatio","width","setPointValues","xAxis","yAxis","x2","y1","x1","Math","round","translate","crispCorr","y2","height","shapeType","shapeArgs","min","abs","plotX","plotY","setColorRecursive","color","colorIndex","algorithmGroup","h","w","plot","startDirection","lH","nH","lW","nW","total","elArr","lP","nR","lR","aspectRatio","max","addElement","this.addElement","el","reset","this.reset","algorithmCalcPoints","directionChange","last","group","childrenArea","pX","pY","pW","pH","gW","gH","keep","end","algorithmLowAspectRatio","pTot","algorithmFill","strip","squarified","sliceAndDice","stripes","rootId","levels","drillToNode","len","seriesArea","colorAxis","colorByPoint","setExtremes","setScale","drawDataLabels","style","_hasPointLabels","dataLabel","css","dlOptions","alignDataLabel","column","apply","arguments","attr","zIndex","drawPoints","groupKey","renderer","g","add","graphic","drillId","interactByLeaf","drillToByLeaf","drillToByGroup","event","setState","nodeParent","drillUp","redraw","destroy","showDrillUpButton","isDirty","backText","buttonOptions","states","text","theme","button","hover","select","relativeTo","buildKDTree","drawLegendSymbol","LegendSymbolMixin","drawRectangle","getExtremes","colorValueData","valueMin","dataMin","valueMax","dataMax","getExtremesFromAll","bindAxes","treeAxis","endOnTick","gridLineWidth","lineWidth","minPadding","maxPadding","startOnTick","title","tickPositions","getClassName","className","Point","isValid","state","setVisible","pie","pointClass"]
8
+ }
@@ -1,868 +1,893 @@
1
1
  /**
2
- * @license Highstock JS v2.1.10 (2015-12-07)
2
+ * @license Highcharts JS v5.0.11 (2017-05-04)
3
3
  *
4
4
  * (c) 2014 Highsoft AS
5
5
  * Authors: Jon Arild Nygard / Oystein Moseng
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
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
+ * (c) 2014 Highsoft AS
20
+ * Authors: Jon Arild Nygard / Oystein Moseng
21
+ *
22
+ * License: www.highcharts.com/license
23
+ */
9
24
 
10
- (function (factory) {
11
- if (typeof module === 'object' && module.exports) {
12
- module.exports = factory;
13
- } else {
14
- factory(Highcharts);
15
- }
16
- }(function (H) {
17
- var seriesTypes = H.seriesTypes,
18
- map = H.map,
19
- merge = H.merge,
20
- extend = H.extend,
21
- extendClass = H.extendClass,
22
- defaultOptions = H.getOptions(),
23
- plotOptions = defaultOptions.plotOptions,
24
- noop = function () {
25
- },
26
- each = H.each,
27
- grep = H.grep,
28
- pick = H.pick,
29
- Series = H.Series,
30
- stableSort = H.stableSort,
31
- Color = H.Color,
32
- eachObject = function (list, func, context) {
33
- var key;
34
- context = context || this;
35
- for (key in list) {
36
- if (list.hasOwnProperty(key)) {
37
- func.call(context, list[key], key, list);
38
- }
39
- }
40
- },
41
- reduce = function (arr, func, previous, context) {
42
- context = context || this;
43
- arr = arr || []; // @note should each be able to handle empty values automatically?
44
- each(arr, function (current, i) {
45
- previous = func.call(context, previous, current, i, arr);
46
- });
47
- return previous;
48
- },
49
- // @todo find correct name for this function.
50
- recursive = function (item, func, context) {
51
- var next;
52
- context = context || this;
53
- next = func.call(context, item);
54
- if (next !== false) {
55
- recursive(next, func, context);
56
- }
57
- };
58
-
59
- // Define default options
60
- plotOptions.treemap = merge(plotOptions.scatter, {
61
- showInLegend: false,
62
- marker: false,
63
- borderColor: '#E0E0E0',
64
- borderWidth: 1,
65
- dataLabels: {
66
- enabled: true,
67
- defer: false,
68
- verticalAlign: 'middle',
69
- formatter: function () { // #2945
70
- return this.point.name || this.point.id;
71
- },
72
- inside: true
73
- },
74
- tooltip: {
75
- headerFormat: '',
76
- pointFormat: '<b>{point.name}</b>: {point.node.val}</b><br/>'
77
- },
78
- layoutAlgorithm: 'sliceAndDice',
79
- layoutStartingDirection: 'vertical',
80
- alternateStartingDirection: false,
81
- levelIsConstant: true,
82
- states: {
83
- hover: {
84
- borderColor: '#A0A0A0',
85
- brightness: seriesTypes.heatmap ? 0 : 0.1,
86
- shadow: false
87
- }
88
- },
89
- drillUpButton: {
90
- position: {
91
- align: 'right',
92
- x: -10,
93
- y: 10
94
- }
95
- }
96
- });
97
-
98
- // Stolen from heatmap
99
- var colorSeriesMixin = {
100
- // mapping between SVG attributes and the corresponding options
101
- pointAttrToOptions: {},
102
- pointArrayMap: ['value'],
103
- axisTypes: seriesTypes.heatmap ? ['xAxis', 'yAxis', 'colorAxis'] : ['xAxis', 'yAxis'],
104
- optionalAxis: 'colorAxis',
105
- getSymbol: noop,
106
- parallelArrays: ['x', 'y', 'value', 'colorValue'],
107
- colorKey: 'colorValue', // Point color option key
108
- translateColors: seriesTypes.heatmap && seriesTypes.heatmap.prototype.translateColors
109
- };
110
-
111
- // The Treemap series type
112
- seriesTypes.treemap = extendClass(seriesTypes.scatter, merge(colorSeriesMixin, {
113
- type: 'treemap',
114
- trackerGroups: ['group', 'dataLabelsGroup'],
115
- pointClass: extendClass(H.Point, {
116
- setVisible: seriesTypes.pie.prototype.pointClass.prototype.setVisible
117
- }),
118
- /**
119
- * Creates an object map from parent id to childrens index.
120
- * @param {Array} data List of points set in options.
121
- * @param {string} data[].parent Parent id of point.
122
- * @param {Array} ids List of all point ids.
123
- * @return {Object} Map from parent id to children index in data.
124
- */
125
- getListOfParents: function (data, ids) {
126
- var listOfParents = reduce(data, function (prev, curr, i) {
127
- var parent = pick(curr.parent, '');
128
- if (prev[parent] === undefined) {
129
- prev[parent] = [];
130
- }
131
- prev[parent].push(i);
132
- return prev;
133
- }, {});
134
-
135
- // If parent does not exist, hoist parent to root of tree.
136
- eachObject(listOfParents, function (children, parent, list) {
137
- if ((parent !== '') && (H.inArray(parent, ids) === -1)) {
138
- each(children, function (child) {
139
- list[''].push(child);
140
- });
141
- delete list[parent];
142
- }
143
- });
144
- return listOfParents;
145
- },
146
- /**
147
- * Creates a tree structured object from the series points
148
- */
149
- getTree: function () {
150
- var tree,
151
- series = this,
152
- allIds = map(this.data, function (d) {
153
- return d.id;
154
- }),
155
- parentList = series.getListOfParents(this.data, allIds);
156
-
157
- series.nodeMap = [];
158
- tree = series.buildNode('', -1, 0, parentList, null);
159
- recursive(this.nodeMap[this.rootNode], function (node) {
160
- var next = false,
161
- p = node.parent;
162
- node.visible = true;
163
- if (p || p === '') {
164
- next = series.nodeMap[p];
165
- }
166
- return next;
167
- });
168
- recursive(this.nodeMap[this.rootNode].children, function (children) {
169
- var next = false;
170
- each(children, function (child) {
171
- child.visible = true;
172
- if (child.children.length) {
173
- next = (next || []).concat(child.children);
174
- }
175
- });
176
- return next;
177
- });
178
- this.setTreeValues(tree);
179
- return tree;
180
- },
181
- init: function (chart, options) {
182
- var series = this;
183
- Series.prototype.init.call(series, chart, options);
184
- if (series.options.allowDrillToNode) {
185
- series.drillTo();
186
- }
187
- },
188
- buildNode: function (id, i, level, list, parent) {
189
- var series = this,
190
- children = [],
191
- point = series.points[i],
192
- node,
193
- child;
194
-
195
- // Actions
196
- each((list[id] || []), function (i) {
197
- child = series.buildNode(series.points[i].id, i, (level + 1), list, id);
198
- children.push(child);
199
- });
200
- node = {
201
- id: id,
202
- i: i,
203
- children: children,
204
- level: level,
205
- parent: parent,
206
- visible: false // @todo move this to better location
207
- };
208
- series.nodeMap[node.id] = node;
209
- if (point) {
210
- point.node = node;
211
- }
212
- return node;
213
- },
214
- setTreeValues: function (tree) {
215
- var series = this,
216
- options = series.options,
217
- childrenTotal = 0,
218
- children = [],
219
- val,
220
- point = series.points[tree.i];
221
-
222
- // First give the children some values
223
- each(tree.children, function (child) {
224
- child = series.setTreeValues(child);
225
- children.push(child);
226
-
227
- if (!child.ignore) {
228
- childrenTotal += child.val;
229
- } else {
230
- // @todo Add predicate to avoid looping already ignored children
231
- recursive(child.children, function (children) {
232
- var next = false;
233
- each(children, function (node) {
234
- extend(node, {
235
- ignore: true,
236
- isLeaf: false,
237
- visible: false
238
- });
239
- if (node.children.length) {
240
- next = (next || []).concat(node.children);
241
- }
242
- });
243
- return next;
244
- });
245
- }
246
- });
247
- // Sort the children
248
- stableSort(children, function (a, b) {
249
- return a.sortIndex - b.sortIndex;
250
- });
251
- // Set the values
252
- val = pick(point && point.value, childrenTotal);
253
- extend(tree, {
254
- children: children,
255
- childrenTotal: childrenTotal,
256
- // Ignore this node if point is not visible
257
- ignore: !(pick(point && point.visible, true) && (val > 0)),
258
- isLeaf: tree.visible && !childrenTotal,
259
- levelDynamic: (options.levelIsConstant ? tree.level : (tree.level - series.nodeMap[series.rootNode].level)),
260
- name: pick(point && point.name, ''),
261
- sortIndex: pick(point && point.sortIndex, -val),
262
- val: val
263
- });
264
- return tree;
265
- },
266
- /**
267
- * Recursive function which calculates the area for all children of a node.
268
- * @param {Object} node The node which is parent to the children.
269
- * @param {Object} area The rectangular area of the parent.
270
- */
271
- calculateChildrenAreas: function (parent, area) {
272
- var series = this,
273
- options = series.options,
274
- level = this.levelMap[parent.levelDynamic + 1],
275
- algorithm = pick((series[level && level.layoutAlgorithm] && level.layoutAlgorithm), options.layoutAlgorithm),
276
- alternate = options.alternateStartingDirection,
277
- childrenValues = [],
278
- children;
279
-
280
- // Collect all children which should be included
281
- children = grep(parent.children, function (n) {
282
- return !n.ignore;
283
- });
284
-
285
- if (level && level.layoutStartingDirection) {
286
- area.direction = level.layoutStartingDirection === 'vertical' ? 0 : 1;
287
- }
288
- childrenValues = series[algorithm](area, children);
289
- each(children, function (child, index) {
290
- var values = childrenValues[index];
291
- child.values = merge(values, {
292
- val: child.childrenTotal,
293
- direction: (alternate ? 1 - area.direction : area.direction)
294
- });
295
- child.pointValues = merge(values, {
296
- x: (values.x / series.axisRatio),
297
- width: (values.width / series.axisRatio)
298
- });
299
- // If node has children, then call method recursively
300
- if (child.children.length) {
301
- series.calculateChildrenAreas(child, child.values);
302
- }
303
- });
304
- },
305
- setPointValues: function () {
306
- var series = this,
307
- xAxis = series.xAxis,
308
- yAxis = series.yAxis;
309
- each(series.points, function (point) {
310
- var node = point.node,
311
- values = node.pointValues,
312
- x1,
313
- x2,
314
- y1,
315
- y2;
316
- // Points which is ignored, have no values.
317
- if (values) {
318
- x1 = Math.round(xAxis.translate(values.x, 0, 0, 0, 1));
319
- x2 = Math.round(xAxis.translate(values.x + values.width, 0, 0, 0, 1));
320
- y1 = Math.round(yAxis.translate(values.y, 0, 0, 0, 1));
321
- y2 = Math.round(yAxis.translate(values.y + values.height, 0, 0, 0, 1));
322
- // Set point values
323
- point.shapeType = 'rect';
324
- point.shapeArgs = {
325
- x: Math.min(x1, x2),
326
- y: Math.min(y1, y2),
327
- width: Math.abs(x2 - x1),
328
- height: Math.abs(y2 - y1)
329
- };
330
- point.plotX = point.shapeArgs.x + (point.shapeArgs.width / 2);
331
- point.plotY = point.shapeArgs.y + (point.shapeArgs.height / 2);
332
- } else {
333
- // Reset visibility
334
- delete point.plotX;
335
- delete point.plotY;
336
- }
337
- });
338
- },
339
- setColorRecursive: function (node, color) {
340
- var series = this,
341
- point,
342
- level;
343
- if (node) {
344
- point = series.points[node.i];
345
- level = series.levelMap[node.levelDynamic];
346
- // Select either point color, level color or inherited color.
347
- color = pick(point && point.options.color, level && level.color, color);
348
- if (point) {
349
- point.color = color;
350
- }
351
- // Do it all again with the children
352
- if (node.children.length) {
353
- each(node.children, function (child) {
354
- series.setColorRecursive(child, color);
355
- });
356
- }
357
- }
358
- },
359
- algorithmGroup: function (h, w, d, p) {
360
- this.height = h;
361
- this.width = w;
362
- this.plot = p;
363
- this.direction = d;
364
- this.startDirection = d;
365
- this.total = 0;
366
- this.nW = 0;
367
- this.lW = 0;
368
- this.nH = 0;
369
- this.lH = 0;
370
- this.elArr = [];
371
- this.lP = {
372
- total: 0,
373
- lH: 0,
374
- nH: 0,
375
- lW: 0,
376
- nW: 0,
377
- nR: 0,
378
- lR: 0,
379
- aspectRatio: function (w, h) {
380
- return Math.max((w / h), (h / w));
381
- }
382
- };
383
- this.addElement = function (el) {
384
- this.lP.total = this.elArr[this.elArr.length - 1];
385
- this.total = this.total + el;
386
- if (this.direction === 0) {
387
- // Calculate last point old aspect ratio
388
- this.lW = this.nW;
389
- this.lP.lH = this.lP.total / this.lW;
390
- this.lP.lR = this.lP.aspectRatio(this.lW, this.lP.lH);
391
- // Calculate last point new aspect ratio
392
- this.nW = this.total / this.height;
393
- this.lP.nH = this.lP.total / this.nW;
394
- this.lP.nR = this.lP.aspectRatio(this.nW, this.lP.nH);
395
- } else {
396
- // Calculate last point old aspect ratio
397
- this.lH = this.nH;
398
- this.lP.lW = this.lP.total / this.lH;
399
- this.lP.lR = this.lP.aspectRatio(this.lP.lW, this.lH);
400
- // Calculate last point new aspect ratio
401
- this.nH = this.total / this.width;
402
- this.lP.nW = this.lP.total / this.nH;
403
- this.lP.nR = this.lP.aspectRatio(this.lP.nW, this.nH);
404
- }
405
- this.elArr.push(el);
406
- };
407
- this.reset = function () {
408
- this.nW = 0;
409
- this.lW = 0;
410
- this.elArr = [];
411
- this.total = 0;
412
- };
413
- },
414
- algorithmCalcPoints: function (directionChange, last, group, childrenArea) {
415
- var pX,
416
- pY,
417
- pW,
418
- pH,
419
- gW = group.lW,
420
- gH = group.lH,
421
- plot = group.plot,
422
- keep,
423
- i = 0,
424
- end = group.elArr.length - 1;
425
- if (last) {
426
- gW = group.nW;
427
- gH = group.nH;
428
- } else {
429
- keep = group.elArr[group.elArr.length - 1];
430
- }
431
- each(group.elArr, function (p) {
432
- if (last || (i < end)) {
433
- if (group.direction === 0) {
434
- pX = plot.x;
435
- pY = plot.y;
436
- pW = gW;
437
- pH = p / pW;
438
- } else {
439
- pX = plot.x;
440
- pY = plot.y;
441
- pH = gH;
442
- pW = p / pH;
443
- }
444
- childrenArea.push({
445
- x: pX,
446
- y: pY,
447
- width: pW,
448
- height: pH
449
- });
450
- if (group.direction === 0) {
451
- plot.y = plot.y + pH;
452
- } else {
453
- plot.x = plot.x + pW;
454
- }
455
- }
456
- i = i + 1;
457
- });
458
- // Reset variables
459
- group.reset();
460
- if (group.direction === 0) {
461
- group.width = group.width - gW;
462
- } else {
463
- group.height = group.height - gH;
464
- }
465
- plot.y = plot.parent.y + (plot.parent.height - group.height);
466
- plot.x = plot.parent.x + (plot.parent.width - group.width);
467
- if (directionChange) {
468
- group.direction = 1 - group.direction;
469
- }
470
- // If not last, then add uncalculated element
471
- if (!last) {
472
- group.addElement(keep);
473
- }
474
- },
475
- algorithmLowAspectRatio: function (directionChange, parent, children) {
476
- var childrenArea = [],
477
- series = this,
478
- pTot,
479
- plot = {
480
- x: parent.x,
481
- y: parent.y,
482
- parent: parent
483
- },
484
- direction = parent.direction,
485
- i = 0,
486
- end = children.length - 1,
487
- group = new this.algorithmGroup(parent.height, parent.width, direction, plot);
488
- // Loop through and calculate all areas
489
- each(children, function (child) {
490
- pTot = (parent.width * parent.height) * (child.val / parent.val);
491
- group.addElement(pTot);
492
- if (group.lP.nR > group.lP.lR) {
493
- series.algorithmCalcPoints(directionChange, false, group, childrenArea, plot);
494
- }
495
- // If last child, then calculate all remaining areas
496
- if (i === end) {
497
- series.algorithmCalcPoints(directionChange, true, group, childrenArea, plot);
498
- }
499
- i = i + 1;
500
- });
501
- return childrenArea;
502
- },
503
- algorithmFill: function (directionChange, parent, children) {
504
- var childrenArea = [],
505
- pTot,
506
- direction = parent.direction,
507
- x = parent.x,
508
- y = parent.y,
509
- width = parent.width,
510
- height = parent.height,
511
- pX,
512
- pY,
513
- pW,
514
- pH;
515
- each(children, function (child) {
516
- pTot = (parent.width * parent.height) * (child.val / parent.val);
517
- pX = x;
518
- pY = y;
519
- if (direction === 0) {
520
- pH = height;
521
- pW = pTot / pH;
522
- width = width - pW;
523
- x = x + pW;
524
- } else {
525
- pW = width;
526
- pH = pTot / pW;
527
- height = height - pH;
528
- y = y + pH;
529
- }
530
- childrenArea.push({
531
- x: pX,
532
- y: pY,
533
- width: pW,
534
- height: pH
535
- });
536
- if (directionChange) {
537
- direction = 1 - direction;
538
- }
539
- });
540
- return childrenArea;
541
- },
542
- strip: function (parent, children) {
543
- return this.algorithmLowAspectRatio(false, parent, children);
544
- },
545
- squarified: function (parent, children) {
546
- return this.algorithmLowAspectRatio(true, parent, children);
547
- },
548
- sliceAndDice: function (parent, children) {
549
- return this.algorithmFill(true, parent, children);
550
- },
551
- stripes: function (parent, children) {
552
- return this.algorithmFill(false, parent, children);
553
- },
554
- translate: function () {
555
- var pointValues,
556
- seriesArea,
557
- tree,
558
- val;
559
-
560
- // Call prototype function
561
- Series.prototype.translate.call(this);
562
-
563
- // Assign variables
564
- this.rootNode = pick(this.options.rootId, '');
565
- // Create a object map from level to options
566
- this.levelMap = reduce(this.options.levels, function (arr, item) {
567
- arr[item.level] = item;
568
- return arr;
569
- }, {});
570
- tree = this.tree = this.getTree(); // @todo Only if series.isDirtyData is true
571
-
572
- // Calculate plotting values.
573
- this.axisRatio = (this.xAxis.len / this.yAxis.len);
574
- this.nodeMap[''].pointValues = pointValues = { x: 0, y: 0, width: 100, height: 100 };
575
- this.nodeMap[''].values = seriesArea = merge(pointValues, {
576
- width: (pointValues.width * this.axisRatio),
577
- direction: (this.options.layoutStartingDirection === 'vertical' ? 0 : 1),
578
- val: tree.val
579
- });
580
- this.calculateChildrenAreas(tree, seriesArea);
581
-
582
- // Logic for point colors
583
- if (this.colorAxis) {
584
- this.translateColors();
585
- } else if (!this.options.colorByPoint) {
586
- this.setColorRecursive(this.tree, undefined);
587
- }
588
-
589
- // Update axis extremes according to the root node.
590
- val = this.nodeMap[this.rootNode].pointValues;
591
- this.xAxis.setExtremes(val.x, val.x + val.width, false);
592
- this.yAxis.setExtremes(val.y, val.y + val.height, false);
593
- this.xAxis.setScale();
594
- this.yAxis.setScale();
595
-
596
- // Assign values to points.
597
- this.setPointValues();
598
- },
599
- /**
600
- * Extend drawDataLabels with logic to handle custom options related to the treemap series:
601
- * - Points which is not a leaf node, has dataLabels disabled by default.
602
- * - Options set on series.levels is merged in.
603
- * - Width of the dataLabel is set to match the width of the point shape.
604
- */
605
- drawDataLabels: function () {
606
- var series = this,
607
- points = grep(series.points, function (n) {
608
- return n.node.visible;
609
- }),
610
- options,
611
- level;
612
- each(points, function (point) {
613
- level = series.levelMap[point.node.levelDynamic];
614
- // Set options to new object to avoid problems with scope
615
- options = { style: {} };
616
-
617
- // If not a leaf, then label should be disabled as default
618
- if (!point.node.isLeaf) {
619
- options.enabled = false;
620
- }
621
-
622
- // If options for level exists, include them as well
623
- if (level && level.dataLabels) {
624
- options = merge(options, level.dataLabels);
625
- series._hasPointLabels = true;
626
- }
627
-
628
- // Set dataLabel width to the width of the point shape.
629
- if (point.shapeArgs) {
630
- options.style.width = point.shapeArgs.width;
631
- }
632
-
633
- // Merge custom options with point options
634
- point.dlOptions = merge(options, point.options.dataLabels);
635
- });
636
- Series.prototype.drawDataLabels.call(this);
637
- },
638
- alignDataLabel: seriesTypes.column.prototype.alignDataLabel,
639
-
640
- /**
641
- * Get presentational attributes
642
- */
643
- pointAttribs: function (point, state) {
644
- var level = this.levelMap[point.node.levelDynamic] || {},
645
- options = this.options,
646
- attr,
647
- stateOptions = (state && options.states[state]) || {};
648
-
649
- // Set attributes by precedence. Point trumps level trumps series. Stroke width uses pick
650
- // because it can be 0.
651
- attr = {
652
- 'stroke': point.borderColor || level.borderColor || stateOptions.borderColor || options.borderColor,
653
- 'stroke-width': pick(point.borderWidth, level.borderWidth, stateOptions.borderWidth, options.borderWidth),
654
- 'dashstyle': point.borderDashStyle || level.borderDashStyle || stateOptions.borderDashStyle || options.borderDashStyle,
655
- 'fill': point.color || this.color,
656
- 'zIndex': state === 'hover' ? 1 : 0
657
- };
658
-
659
- if (point.node.level <= this.nodeMap[this.rootNode].level) {
660
- // Hide levels above the current view
661
- attr.fill = 'none';
662
- attr['stroke-width'] = 0;
663
- } else if (!point.node.isLeaf) {
664
- // If not a leaf, then remove fill
665
- // @todo let users set the opacity
666
- attr.fill = pick(options.interactByLeaf, !options.allowDrillToNode) ? 'none' : Color(attr.fill).setOpacity(state === 'hover' ? 0.75 : 0.15).get();
667
- } else if (state) {
668
- // Brighten and hoist the hover nodes
669
- attr.fill = Color(attr.fill).brighten(stateOptions.brightness).get();
670
- }
671
-
672
- return attr;
673
- },
674
-
675
- /**
676
- * Extending ColumnSeries drawPoints
677
- */
678
- drawPoints: function () {
679
- var series = this,
680
- points = grep(series.points, function (n) {
681
- return n.node.visible;
682
- });
683
-
684
- each(points, function (point) {
685
- var groupKey = 'levelGroup-' + point.node.levelDynamic;
686
- if (!series[groupKey]) {
687
- series[groupKey] = series.chart.renderer.g(groupKey)
688
- .attr({
689
- zIndex: 1000 - point.node.levelDynamic // @todo Set the zIndex based upon the number of levels, instead of using 1000
690
- })
691
- .add(series.group);
692
- }
693
- point.group = series[groupKey];
694
- // Preliminary code in prepraration for HC5 that uses pointAttribs for all series
695
- point.pointAttr = {
696
- '': series.pointAttribs(point),
697
- 'hover': series.pointAttribs(point, 'hover'),
698
- 'select': {}
699
- };
700
- });
701
- // Call standard drawPoints
702
- seriesTypes.column.prototype.drawPoints.call(this);
703
-
704
- // If drillToNode is allowed, set a point cursor on clickables & add drillId to point
705
- if (series.options.allowDrillToNode) {
706
- each(points, function (point) {
707
- var cursor,
708
- drillId;
709
- if (point.graphic) {
710
- drillId = point.drillId = series.options.interactByLeaf ? series.drillToByLeaf(point) : series.drillToByGroup(point);
711
- cursor = drillId ? 'pointer' : 'default';
712
- point.graphic.css({ cursor: cursor });
713
- }
714
- });
715
- }
716
- },
717
- /**
718
- * Add drilling on the suitable points
719
- */
720
- drillTo: function () {
721
- var series = this;
722
- H.addEvent(series, 'click', function (event) {
723
- var point = event.point,
724
- drillId = point.drillId,
725
- drillName;
726
- // If a drill id is returned, add click event and cursor.
727
- if (drillId) {
728
- drillName = series.nodeMap[series.rootNode].name || series.rootNode;
729
- point.setState(''); // Remove hover
730
- series.drillToNode(drillId);
731
- series.showDrillUpButton(drillName);
732
- }
733
- });
734
- },
735
- /**
736
- * Finds the drill id for a parent node.
737
- * Returns false if point should not have a click event
738
- * @param {Object} point
739
- * @return {string || boolean} Drill to id or false when point should not have a click event
740
- */
741
- drillToByGroup: function (point) {
742
- var series = this,
743
- drillId = false;
744
- if ((point.node.level - series.nodeMap[series.rootNode].level) === 1 && !point.node.isLeaf) {
745
- drillId = point.id;
746
- }
747
- return drillId;
748
- },
749
- /**
750
- * Finds the drill id for a leaf node.
751
- * Returns false if point should not have a click event
752
- * @param {Object} point
753
- * @return {string || boolean} Drill to id or false when point should not have a click event
754
- */
755
- drillToByLeaf: function (point) {
756
- var series = this,
757
- drillId = false,
758
- nodeParent;
759
- if ((point.node.parent !== series.rootNode) && (point.node.isLeaf)) {
760
- nodeParent = point.node;
761
- while (!drillId) {
762
- nodeParent = series.nodeMap[nodeParent.parent];
763
- if (nodeParent.parent === series.rootNode) {
764
- drillId = nodeParent.id;
765
- }
766
- }
767
- }
768
- return drillId;
769
- },
770
- drillUp: function () {
771
- var drillPoint = null,
772
- node,
773
- parent;
774
- if (this.rootNode) {
775
- node = this.nodeMap[this.rootNode];
776
- if (node.parent !== null) {
777
- drillPoint = this.nodeMap[node.parent];
778
- } else {
779
- drillPoint = this.nodeMap[''];
780
- }
781
- }
782
-
783
- if (drillPoint !== null) {
784
- this.drillToNode(drillPoint.id);
785
- if (drillPoint.id === '') {
786
- this.drillUpButton = this.drillUpButton.destroy();
787
- } else {
788
- parent = this.nodeMap[drillPoint.parent];
789
- this.showDrillUpButton((parent.name || parent.id));
790
- }
791
- }
792
- },
793
- drillToNode: function (id) {
794
- this.options.rootId = id;
795
- this.isDirty = true; // Force redraw
796
- this.chart.redraw();
797
- },
798
- showDrillUpButton: function (name) {
799
- var series = this,
800
- backText = (name || '< Back'),
801
- buttonOptions = series.options.drillUpButton,
802
- attr,
803
- states;
804
-
805
- if (buttonOptions.text) {
806
- backText = buttonOptions.text;
807
- }
808
- if (!this.drillUpButton) {
809
- attr = buttonOptions.theme;
810
- states = attr && attr.states;
811
-
812
- this.drillUpButton = this.chart.renderer.button(
813
- backText,
814
- null,
815
- null,
816
- function () {
817
- series.drillUp();
818
- },
819
- attr,
820
- states && states.hover,
821
- states && states.select
822
- )
823
- .attr({
824
- align: buttonOptions.position.align,
825
- zIndex: 9
826
- })
827
- .add()
828
- .align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox');
829
- } else {
830
- this.drillUpButton.attr({
831
- text: backText
832
- })
833
- .align();
834
- }
835
- },
836
- buildKDTree: noop,
837
- drawLegendSymbol: H.LegendSymbolMixin.drawRectangle,
838
- getExtremes: function () {
839
- // Get the extremes from the value data
840
- Series.prototype.getExtremes.call(this, this.colorValueData);
841
- this.valueMin = this.dataMin;
842
- this.valueMax = this.dataMax;
843
-
844
- // Get the extremes from the y data
845
- Series.prototype.getExtremes.call(this);
846
- },
847
- getExtremesFromAll: true,
848
- bindAxes: function () {
849
- var treeAxis = {
850
- endOnTick: false,
851
- gridLineWidth: 0,
852
- lineWidth: 0,
853
- min: 0,
854
- dataMin: 0,
855
- minPadding: 0,
856
- max: 100,
857
- dataMax: 100,
858
- maxPadding: 0,
859
- startOnTick: false,
860
- title: null,
861
- tickPositions: []
862
- };
863
- Series.prototype.bindAxes.call(this);
864
- H.extend(this.yAxis.options, treeAxis);
865
- H.extend(this.xAxis.options, treeAxis);
866
- }
867
- }));
25
+ var seriesType = H.seriesType,
26
+ seriesTypes = H.seriesTypes,
27
+ map = H.map,
28
+ merge = H.merge,
29
+ extend = H.extend,
30
+ noop = H.noop,
31
+ each = H.each,
32
+ grep = H.grep,
33
+ isNumber = H.isNumber,
34
+ isString = H.isString,
35
+ pick = H.pick,
36
+ Series = H.Series,
37
+ stableSort = H.stableSort,
38
+ color = H.Color,
39
+ eachObject = function(list, func, context) {
40
+ context = context || this;
41
+ H.objectEach(list, function(val, key) {
42
+ func.call(context, val, key, list);
43
+ });
44
+ },
45
+ reduce = function(arr, func, previous, context) {
46
+ context = context || this;
47
+ arr = arr || []; // @note should each be able to handle empty values automatically?
48
+ each(arr, function(current, i) {
49
+ previous = func.call(context, previous, current, i, arr);
50
+ });
51
+ return previous;
52
+ },
53
+ // @todo find correct name for this function.
54
+ // @todo Similar to reduce, this function is likely redundant
55
+ recursive = function(item, func, context) {
56
+ var next;
57
+ context = context || this;
58
+ next = func.call(context, item);
59
+ if (next !== false) {
60
+ recursive(next, func, context);
61
+ }
62
+ };
63
+
64
+ // The Treemap series type
65
+ seriesType('treemap', 'scatter', {
66
+ showInLegend: false,
67
+ marker: false,
68
+ dataLabels: {
69
+ enabled: true,
70
+ defer: false,
71
+ verticalAlign: 'middle',
72
+ formatter: function() { // #2945
73
+ return this.point.name || this.point.id;
74
+ },
75
+ inside: true
76
+ },
77
+ tooltip: {
78
+ headerFormat: '',
79
+ pointFormat: '<b>{point.name}</b>: {point.value}</b><br/>'
80
+ },
81
+ ignoreHiddenPoint: true,
82
+ layoutAlgorithm: 'sliceAndDice',
83
+ layoutStartingDirection: 'vertical',
84
+ alternateStartingDirection: false,
85
+ levelIsConstant: true,
86
+ drillUpButton: {
87
+ position: {
88
+ align: 'right',
89
+ x: -10,
90
+ y: 10
91
+ }
92
+ },
93
+
94
+
95
+ // Prototype members
96
+ }, {
97
+ pointArrayMap: ['value'],
98
+ axisTypes: seriesTypes.heatmap ? ['xAxis', 'yAxis', 'colorAxis'] : ['xAxis', 'yAxis'],
99
+ optionalAxis: 'colorAxis',
100
+ getSymbol: noop,
101
+ parallelArrays: ['x', 'y', 'value', 'colorValue'],
102
+ colorKey: 'colorValue', // Point color option key
103
+ translateColors: seriesTypes.heatmap && seriesTypes.heatmap.prototype.translateColors,
104
+ trackerGroups: ['group', 'dataLabelsGroup'],
105
+ /**
106
+ * Creates an object map from parent id to childrens index.
107
+ * @param {Array} data List of points set in options.
108
+ * @param {string} data[].parent Parent id of point.
109
+ * @param {Array} ids List of all point ids.
110
+ * @return {Object} Map from parent id to children index in data.
111
+ */
112
+ getListOfParents: function(data, ids) {
113
+ var listOfParents = reduce(data, function(prev, curr, i) {
114
+ var parent = pick(curr.parent, '');
115
+ if (prev[parent] === undefined) {
116
+ prev[parent] = [];
117
+ }
118
+ prev[parent].push(i);
119
+ return prev;
120
+ }, {});
121
+
122
+ // If parent does not exist, hoist parent to root of tree.
123
+ eachObject(listOfParents, function(children, parent, list) {
124
+ if ((parent !== '') && (H.inArray(parent, ids) === -1)) {
125
+ each(children, function(child) {
126
+ list[''].push(child);
127
+ });
128
+ delete list[parent];
129
+ }
130
+ });
131
+ return listOfParents;
132
+ },
133
+ /**
134
+ * Creates a tree structured object from the series points
135
+ */
136
+ getTree: function() {
137
+ var series = this,
138
+ allIds = map(this.data, function(d) {
139
+ return d.id;
140
+ }),
141
+ parentList = series.getListOfParents(this.data, allIds);
142
+
143
+ series.nodeMap = [];
144
+ return series.buildNode('', -1, 0, parentList, null);
145
+ },
146
+ init: function(chart, options) {
147
+ var series = this;
148
+ Series.prototype.init.call(series, chart, options);
149
+ if (series.options.allowDrillToNode) {
150
+ H.addEvent(series, 'click', series.onClickDrillToNode);
151
+ }
152
+ },
153
+ buildNode: function(id, i, level, list, parent) {
154
+ var series = this,
155
+ children = [],
156
+ point = series.points[i],
157
+ node,
158
+ child;
159
+
160
+ // Actions
161
+ each((list[id] || []), function(i) {
162
+ child = series.buildNode(series.points[i].id, i, (level + 1), list, id);
163
+ children.push(child);
164
+ });
165
+ node = {
166
+ id: id,
167
+ i: i,
168
+ children: children,
169
+ level: level,
170
+ parent: parent,
171
+ visible: false // @todo move this to better location
172
+ };
173
+ series.nodeMap[node.id] = node;
174
+ if (point) {
175
+ point.node = node;
176
+ }
177
+ return node;
178
+ },
179
+ setTreeValues: function(tree) {
180
+ var series = this,
181
+ options = series.options,
182
+ childrenTotal = 0,
183
+ children = [],
184
+ val,
185
+ point = series.points[tree.i];
186
+ // Parents of the root node is by default visible
187
+ recursive(series.nodeMap[series.rootNode], function(node) {
188
+ var next = false,
189
+ p = node.parent;
190
+ node.visible = true;
191
+ if (p || p === '') {
192
+ next = series.nodeMap[p];
193
+ }
194
+ return next;
195
+ });
196
+ // Children of the root node is by default visible
197
+ recursive(series.nodeMap[series.rootNode].children, function(children) {
198
+ var next = false;
199
+ each(children, function(child) {
200
+ child.visible = true;
201
+ if (child.children.length) {
202
+ next = (next || []).concat(child.children);
203
+ }
204
+ });
205
+ return next;
206
+ });
207
+
208
+ // First give the children some values
209
+ each(tree.children, function(child) {
210
+ child = series.setTreeValues(child);
211
+ children.push(child);
212
+
213
+ if (!child.ignore) {
214
+ childrenTotal += child.val;
215
+ } else {
216
+ // @todo Add predicate to avoid looping already ignored children
217
+ recursive(child.children, function(children) {
218
+ var next = false;
219
+ each(children, function(node) {
220
+ extend(node, {
221
+ ignore: true,
222
+ isLeaf: false,
223
+ visible: false
224
+ });
225
+ if (node.children.length) {
226
+ next = (next || []).concat(node.children);
227
+ }
228
+ });
229
+ return next;
230
+ });
231
+ }
232
+ });
233
+ // Sort the children
234
+ stableSort(children, function(a, b) {
235
+ return a.sortIndex - b.sortIndex;
236
+ });
237
+ // Set the values
238
+ val = pick(point && point.options.value, childrenTotal);
239
+ if (point) {
240
+ point.value = val;
241
+ }
242
+ extend(tree, {
243
+ children: children,
244
+ childrenTotal: childrenTotal,
245
+ // Ignore this node if point is not visible
246
+ ignore: !(pick(point && point.visible, true) && (val > 0)),
247
+ isLeaf: tree.visible && !childrenTotal,
248
+ levelDynamic: (options.levelIsConstant ? tree.level : (tree.level - series.nodeMap[series.rootNode].level)),
249
+ name: pick(point && point.name, ''),
250
+ sortIndex: pick(point && point.sortIndex, -val),
251
+ val: val
252
+ });
253
+ return tree;
254
+ },
255
+ /**
256
+ * Recursive function which calculates the area for all children of a node.
257
+ * @param {Object} node The node which is parent to the children.
258
+ * @param {Object} area The rectangular area of the parent.
259
+ */
260
+ calculateChildrenAreas: function(parent, area) {
261
+ var series = this,
262
+ options = series.options,
263
+ level = this.levelMap[parent.levelDynamic + 1],
264
+ algorithm = pick((series[level && level.layoutAlgorithm] && level.layoutAlgorithm), options.layoutAlgorithm),
265
+ alternate = options.alternateStartingDirection,
266
+ childrenValues = [],
267
+ children;
268
+
269
+ // Collect all children which should be included
270
+ children = grep(parent.children, function(n) {
271
+ return !n.ignore;
272
+ });
273
+
274
+ if (level && level.layoutStartingDirection) {
275
+ area.direction = level.layoutStartingDirection === 'vertical' ? 0 : 1;
276
+ }
277
+ childrenValues = series[algorithm](area, children);
278
+ each(children, function(child, index) {
279
+ var values = childrenValues[index];
280
+ child.values = merge(values, {
281
+ val: child.childrenTotal,
282
+ direction: (alternate ? 1 - area.direction : area.direction)
283
+ });
284
+ child.pointValues = merge(values, {
285
+ x: (values.x / series.axisRatio),
286
+ width: (values.width / series.axisRatio)
287
+ });
288
+ // If node has children, then call method recursively
289
+ if (child.children.length) {
290
+ series.calculateChildrenAreas(child, child.values);
291
+ }
292
+ });
293
+ },
294
+ setPointValues: function() {
295
+ var series = this,
296
+ xAxis = series.xAxis,
297
+ yAxis = series.yAxis;
298
+ each(series.points, function(point) {
299
+ var node = point.node,
300
+ values = node.pointValues,
301
+ x1,
302
+ x2,
303
+ y1,
304
+ y2,
305
+ crispCorr = 0;
306
+
307
+
308
+
309
+ // Points which is ignored, have no values.
310
+ if (values && node.visible) {
311
+ x1 = Math.round(xAxis.translate(values.x, 0, 0, 0, 1)) - crispCorr;
312
+ x2 = Math.round(xAxis.translate(values.x + values.width, 0, 0, 0, 1)) - crispCorr;
313
+ y1 = Math.round(yAxis.translate(values.y, 0, 0, 0, 1)) - crispCorr;
314
+ y2 = Math.round(yAxis.translate(values.y + values.height, 0, 0, 0, 1)) - crispCorr;
315
+ // Set point values
316
+ point.shapeType = 'rect';
317
+ point.shapeArgs = {
318
+ x: Math.min(x1, x2),
319
+ y: Math.min(y1, y2),
320
+ width: Math.abs(x2 - x1),
321
+ height: Math.abs(y2 - y1)
322
+ };
323
+ point.plotX = point.shapeArgs.x + (point.shapeArgs.width / 2);
324
+ point.plotY = point.shapeArgs.y + (point.shapeArgs.height / 2);
325
+ } else {
326
+ // Reset visibility
327
+ delete point.plotX;
328
+ delete point.plotY;
329
+ }
330
+ });
331
+ },
332
+ setColorRecursive: function(node, color, colorIndex) {
333
+ var series = this,
334
+ point,
335
+ level;
336
+ if (node) {
337
+ point = series.points[node.i];
338
+ level = series.levelMap[node.levelDynamic];
339
+ // Select either point color, level color or inherited color.
340
+ color = pick(
341
+ point && point.options.color,
342
+ level && level.color,
343
+ color,
344
+ series.color
345
+ );
346
+ colorIndex = pick(
347
+ point && point.options.colorIndex,
348
+ level && level.colorIndex,
349
+ colorIndex,
350
+ series.colorIndex
351
+ );
352
+
353
+ if (point) {
354
+ point.color = color;
355
+ point.colorIndex = colorIndex;
356
+ }
357
+
358
+ // Do it all again with the children
359
+ if (node.children.length) {
360
+ each(node.children, function(child) {
361
+ series.setColorRecursive(child, color, colorIndex);
362
+ });
363
+ }
364
+ }
365
+ },
366
+ algorithmGroup: function(h, w, d, p) {
367
+ this.height = h;
368
+ this.width = w;
369
+ this.plot = p;
370
+ this.direction = d;
371
+ this.startDirection = d;
372
+ this.total = 0;
373
+ this.nW = 0;
374
+ this.lW = 0;
375
+ this.nH = 0;
376
+ this.lH = 0;
377
+ this.elArr = [];
378
+ this.lP = {
379
+ total: 0,
380
+ lH: 0,
381
+ nH: 0,
382
+ lW: 0,
383
+ nW: 0,
384
+ nR: 0,
385
+ lR: 0,
386
+ aspectRatio: function(w, h) {
387
+ return Math.max((w / h), (h / w));
388
+ }
389
+ };
390
+ this.addElement = function(el) {
391
+ this.lP.total = this.elArr[this.elArr.length - 1];
392
+ this.total = this.total + el;
393
+ if (this.direction === 0) {
394
+ // Calculate last point old aspect ratio
395
+ this.lW = this.nW;
396
+ this.lP.lH = this.lP.total / this.lW;
397
+ this.lP.lR = this.lP.aspectRatio(this.lW, this.lP.lH);
398
+ // Calculate last point new aspect ratio
399
+ this.nW = this.total / this.height;
400
+ this.lP.nH = this.lP.total / this.nW;
401
+ this.lP.nR = this.lP.aspectRatio(this.nW, this.lP.nH);
402
+ } else {
403
+ // Calculate last point old aspect ratio
404
+ this.lH = this.nH;
405
+ this.lP.lW = this.lP.total / this.lH;
406
+ this.lP.lR = this.lP.aspectRatio(this.lP.lW, this.lH);
407
+ // Calculate last point new aspect ratio
408
+ this.nH = this.total / this.width;
409
+ this.lP.nW = this.lP.total / this.nH;
410
+ this.lP.nR = this.lP.aspectRatio(this.lP.nW, this.nH);
411
+ }
412
+ this.elArr.push(el);
413
+ };
414
+ this.reset = function() {
415
+ this.nW = 0;
416
+ this.lW = 0;
417
+ this.elArr = [];
418
+ this.total = 0;
419
+ };
420
+ },
421
+ algorithmCalcPoints: function(directionChange, last, group, childrenArea) {
422
+ var pX,
423
+ pY,
424
+ pW,
425
+ pH,
426
+ gW = group.lW,
427
+ gH = group.lH,
428
+ plot = group.plot,
429
+ keep,
430
+ i = 0,
431
+ end = group.elArr.length - 1;
432
+ if (last) {
433
+ gW = group.nW;
434
+ gH = group.nH;
435
+ } else {
436
+ keep = group.elArr[group.elArr.length - 1];
437
+ }
438
+ each(group.elArr, function(p) {
439
+ if (last || (i < end)) {
440
+ if (group.direction === 0) {
441
+ pX = plot.x;
442
+ pY = plot.y;
443
+ pW = gW;
444
+ pH = p / pW;
445
+ } else {
446
+ pX = plot.x;
447
+ pY = plot.y;
448
+ pH = gH;
449
+ pW = p / pH;
450
+ }
451
+ childrenArea.push({
452
+ x: pX,
453
+ y: pY,
454
+ width: pW,
455
+ height: pH
456
+ });
457
+ if (group.direction === 0) {
458
+ plot.y = plot.y + pH;
459
+ } else {
460
+ plot.x = plot.x + pW;
461
+ }
462
+ }
463
+ i = i + 1;
464
+ });
465
+ // Reset variables
466
+ group.reset();
467
+ if (group.direction === 0) {
468
+ group.width = group.width - gW;
469
+ } else {
470
+ group.height = group.height - gH;
471
+ }
472
+ plot.y = plot.parent.y + (plot.parent.height - group.height);
473
+ plot.x = plot.parent.x + (plot.parent.width - group.width);
474
+ if (directionChange) {
475
+ group.direction = 1 - group.direction;
476
+ }
477
+ // If not last, then add uncalculated element
478
+ if (!last) {
479
+ group.addElement(keep);
480
+ }
481
+ },
482
+ algorithmLowAspectRatio: function(directionChange, parent, children) {
483
+ var childrenArea = [],
484
+ series = this,
485
+ pTot,
486
+ plot = {
487
+ x: parent.x,
488
+ y: parent.y,
489
+ parent: parent
490
+ },
491
+ direction = parent.direction,
492
+ i = 0,
493
+ end = children.length - 1,
494
+ group = new this.algorithmGroup(parent.height, parent.width, direction, plot); // eslint-disable-line new-cap
495
+ // Loop through and calculate all areas
496
+ each(children, function(child) {
497
+ pTot = (parent.width * parent.height) * (child.val / parent.val);
498
+ group.addElement(pTot);
499
+ if (group.lP.nR > group.lP.lR) {
500
+ series.algorithmCalcPoints(directionChange, false, group, childrenArea, plot);
501
+ }
502
+ // If last child, then calculate all remaining areas
503
+ if (i === end) {
504
+ series.algorithmCalcPoints(directionChange, true, group, childrenArea, plot);
505
+ }
506
+ i = i + 1;
507
+ });
508
+ return childrenArea;
509
+ },
510
+ algorithmFill: function(directionChange, parent, children) {
511
+ var childrenArea = [],
512
+ pTot,
513
+ direction = parent.direction,
514
+ x = parent.x,
515
+ y = parent.y,
516
+ width = parent.width,
517
+ height = parent.height,
518
+ pX,
519
+ pY,
520
+ pW,
521
+ pH;
522
+ each(children, function(child) {
523
+ pTot = (parent.width * parent.height) * (child.val / parent.val);
524
+ pX = x;
525
+ pY = y;
526
+ if (direction === 0) {
527
+ pH = height;
528
+ pW = pTot / pH;
529
+ width = width - pW;
530
+ x = x + pW;
531
+ } else {
532
+ pW = width;
533
+ pH = pTot / pW;
534
+ height = height - pH;
535
+ y = y + pH;
536
+ }
537
+ childrenArea.push({
538
+ x: pX,
539
+ y: pY,
540
+ width: pW,
541
+ height: pH
542
+ });
543
+ if (directionChange) {
544
+ direction = 1 - direction;
545
+ }
546
+ });
547
+ return childrenArea;
548
+ },
549
+ strip: function(parent, children) {
550
+ return this.algorithmLowAspectRatio(false, parent, children);
551
+ },
552
+ squarified: function(parent, children) {
553
+ return this.algorithmLowAspectRatio(true, parent, children);
554
+ },
555
+ sliceAndDice: function(parent, children) {
556
+ return this.algorithmFill(true, parent, children);
557
+ },
558
+ stripes: function(parent, children) {
559
+ return this.algorithmFill(false, parent, children);
560
+ },
561
+ translate: function() {
562
+ var series = this,
563
+ rootId = series.rootNode = pick(series.rootNode, series.options.rootId, ''),
564
+ rootNode,
565
+ pointValues,
566
+ seriesArea,
567
+ tree,
568
+ val;
569
+
570
+ // Call prototype function
571
+ Series.prototype.translate.call(series);
572
+ // Create a object map from level to options
573
+ series.levelMap = reduce(series.options.levels, function(arr, item) {
574
+ arr[item.level] = item;
575
+ return arr;
576
+ }, {});
577
+ tree = series.tree = series.getTree(); // @todo Only if series.isDirtyData is true
578
+ rootNode = series.nodeMap[rootId];
579
+ if (
580
+ rootId !== '' &&
581
+ (!rootNode || !rootNode.children.length)
582
+ ) {
583
+ series.drillToNode('', false);
584
+ rootId = series.rootNode;
585
+ rootNode = series.nodeMap[rootId];
586
+ }
587
+ series.setTreeValues(tree);
588
+
589
+ // Calculate plotting values.
590
+ series.axisRatio = (series.xAxis.len / series.yAxis.len);
591
+ series.nodeMap[''].pointValues = pointValues = {
592
+ x: 0,
593
+ y: 0,
594
+ width: 100,
595
+ height: 100
596
+ };
597
+ series.nodeMap[''].values = seriesArea = merge(pointValues, {
598
+ width: (pointValues.width * series.axisRatio),
599
+ direction: (series.options.layoutStartingDirection === 'vertical' ? 0 : 1),
600
+ val: tree.val
601
+ });
602
+ series.calculateChildrenAreas(tree, seriesArea);
603
+
604
+ // Logic for point colors
605
+ if (series.colorAxis) {
606
+ series.translateColors();
607
+ } else if (!series.options.colorByPoint) {
608
+ series.setColorRecursive(series.tree);
609
+ }
610
+
611
+ // Update axis extremes according to the root node.
612
+ if (series.options.allowDrillToNode) {
613
+ val = rootNode.pointValues;
614
+ series.xAxis.setExtremes(val.x, val.x + val.width, false);
615
+ series.yAxis.setExtremes(val.y, val.y + val.height, false);
616
+ series.xAxis.setScale();
617
+ series.yAxis.setScale();
618
+ }
619
+
620
+ // Assign values to points.
621
+ series.setPointValues();
622
+ },
623
+ /**
624
+ * Extend drawDataLabels with logic to handle custom options related to the treemap series:
625
+ * - Points which is not a leaf node, has dataLabels disabled by default.
626
+ * - Options set on series.levels is merged in.
627
+ * - Width of the dataLabel is set to match the width of the point shape.
628
+ */
629
+ drawDataLabels: function() {
630
+ var series = this,
631
+ points = grep(series.points, function(n) {
632
+ return n.node.visible;
633
+ }),
634
+ options,
635
+ level;
636
+ each(points, function(point) {
637
+ level = series.levelMap[point.node.levelDynamic];
638
+ // Set options to new object to avoid problems with scope
639
+ options = {
640
+ style: {}
641
+ };
642
+
643
+ // If not a leaf, then label should be disabled as default
644
+ if (!point.node.isLeaf) {
645
+ options.enabled = false;
646
+ }
647
+
648
+ // If options for level exists, include them as well
649
+ if (level && level.dataLabels) {
650
+ options = merge(options, level.dataLabels);
651
+ series._hasPointLabels = true;
652
+ }
653
+
654
+ // Set dataLabel width to the width of the point shape.
655
+ if (point.shapeArgs) {
656
+ options.style.width = point.shapeArgs.width;
657
+ if (point.dataLabel) {
658
+ point.dataLabel.css({
659
+ width: point.shapeArgs.width + 'px'
660
+ });
661
+ }
662
+ }
663
+
664
+ // Merge custom options with point options
665
+ point.dlOptions = merge(options, point.options.dataLabels);
666
+ });
667
+ Series.prototype.drawDataLabels.call(this);
668
+ },
669
+
670
+ /**
671
+ * Over the alignment method by setting z index
672
+ */
673
+ alignDataLabel: function(point) {
674
+ seriesTypes.column.prototype.alignDataLabel.apply(this, arguments);
675
+ if (point.dataLabel) {
676
+ point.dataLabel.attr({
677
+ zIndex: point.node.zIndex + 1
678
+ });
679
+ }
680
+ },
681
+
682
+
683
+
684
+ /**
685
+ * Extending ColumnSeries drawPoints
686
+ */
687
+ drawPoints: function() {
688
+ var series = this,
689
+ points = grep(series.points, function(n) {
690
+ return n.node.visible;
691
+ });
692
+
693
+ each(points, function(point) {
694
+ var groupKey = 'levelGroup-' + point.node.levelDynamic;
695
+ if (!series[groupKey]) {
696
+ series[groupKey] = series.chart.renderer.g(groupKey)
697
+ .attr({
698
+ zIndex: 1000 - point.node.levelDynamic // @todo Set the zIndex based upon the number of levels, instead of using 1000
699
+ })
700
+ .add(series.group);
701
+ }
702
+ point.group = series[groupKey];
703
+
704
+ });
705
+ // Call standard drawPoints
706
+ seriesTypes.column.prototype.drawPoints.call(this);
707
+
708
+ // If drillToNode is allowed, set a point cursor on clickables & add drillId to point
709
+ if (series.options.allowDrillToNode) {
710
+ each(points, function(point) {
711
+ if (point.graphic) {
712
+ point.drillId = series.options.interactByLeaf ? series.drillToByLeaf(point) : series.drillToByGroup(point);
713
+ }
714
+ });
715
+ }
716
+ },
717
+ /**
718
+ * Add drilling on the suitable points
719
+ */
720
+ onClickDrillToNode: function(event) {
721
+ var series = this,
722
+ point = event.point,
723
+ drillId = point && point.drillId;
724
+ // If a drill id is returned, add click event and cursor.
725
+ if (isString(drillId)) {
726
+ point.setState(''); // Remove hover
727
+ series.drillToNode(drillId);
728
+ }
729
+ },
730
+ /**
731
+ * Finds the drill id for a parent node.
732
+ * Returns false if point should not have a click event
733
+ * @param {Object} point
734
+ * @return {string || boolean} Drill to id or false when point should not have a click event
735
+ */
736
+ drillToByGroup: function(point) {
737
+ var series = this,
738
+ drillId = false;
739
+ if ((point.node.level - series.nodeMap[series.rootNode].level) === 1 && !point.node.isLeaf) {
740
+ drillId = point.id;
741
+ }
742
+ return drillId;
743
+ },
744
+ /**
745
+ * Finds the drill id for a leaf node.
746
+ * Returns false if point should not have a click event
747
+ * @param {Object} point
748
+ * @return {string || boolean} Drill to id or false when point should not have a click event
749
+ */
750
+ drillToByLeaf: function(point) {
751
+ var series = this,
752
+ drillId = false,
753
+ nodeParent;
754
+ if ((point.node.parent !== series.rootNode) && (point.node.isLeaf)) {
755
+ nodeParent = point.node;
756
+ while (!drillId) {
757
+ nodeParent = series.nodeMap[nodeParent.parent];
758
+ if (nodeParent.parent === series.rootNode) {
759
+ drillId = nodeParent.id;
760
+ }
761
+ }
762
+ }
763
+ return drillId;
764
+ },
765
+ drillUp: function() {
766
+ var series = this,
767
+ node = series.nodeMap[series.rootNode];
768
+ if (node && isString(node.parent)) {
769
+ series.drillToNode(node.parent);
770
+ }
771
+ },
772
+ drillToNode: function(id, redraw) {
773
+ var series = this,
774
+ nodeMap = series.nodeMap,
775
+ node = nodeMap[id];
776
+ series.rootNode = id;
777
+ if (id === '') {
778
+ series.drillUpButton = series.drillUpButton.destroy();
779
+ } else {
780
+ series.showDrillUpButton((node && node.name || id));
781
+ }
782
+ this.isDirty = true; // Force redraw
783
+ if (pick(redraw, true)) {
784
+ this.chart.redraw();
785
+ }
786
+ },
787
+ showDrillUpButton: function(name) {
788
+ var series = this,
789
+ backText = (name || '< Back'),
790
+ buttonOptions = series.options.drillUpButton,
791
+ attr,
792
+ states;
793
+
794
+ if (buttonOptions.text) {
795
+ backText = buttonOptions.text;
796
+ }
797
+ if (!this.drillUpButton) {
798
+ attr = buttonOptions.theme;
799
+ states = attr && attr.states;
800
+
801
+ this.drillUpButton = this.chart.renderer.button(
802
+ backText,
803
+ null,
804
+ null,
805
+ function() {
806
+ series.drillUp();
807
+ },
808
+ attr,
809
+ states && states.hover,
810
+ states && states.select
811
+ )
812
+ .attr({
813
+ align: buttonOptions.position.align,
814
+ zIndex: 7
815
+ })
816
+ .add()
817
+ .align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox');
818
+ } else {
819
+ this.drillUpButton.attr({
820
+ text: backText
821
+ })
822
+ .align();
823
+ }
824
+ },
825
+ buildKDTree: noop,
826
+ drawLegendSymbol: H.LegendSymbolMixin.drawRectangle,
827
+ getExtremes: function() {
828
+ // Get the extremes from the value data
829
+ Series.prototype.getExtremes.call(this, this.colorValueData);
830
+ this.valueMin = this.dataMin;
831
+ this.valueMax = this.dataMax;
832
+
833
+ // Get the extremes from the y data
834
+ Series.prototype.getExtremes.call(this);
835
+ },
836
+ getExtremesFromAll: true,
837
+ bindAxes: function() {
838
+ var treeAxis = {
839
+ endOnTick: false,
840
+ gridLineWidth: 0,
841
+ lineWidth: 0,
842
+ min: 0,
843
+ dataMin: 0,
844
+ minPadding: 0,
845
+ max: 100,
846
+ dataMax: 100,
847
+ maxPadding: 0,
848
+ startOnTick: false,
849
+ title: null,
850
+ tickPositions: []
851
+ };
852
+ Series.prototype.bindAxes.call(this);
853
+ H.extend(this.yAxis.options, treeAxis);
854
+ H.extend(this.xAxis.options, treeAxis);
855
+ }
856
+
857
+ // Point class
858
+ }, {
859
+ getClassName: function() {
860
+ var className = H.Point.prototype.getClassName.call(this),
861
+ series = this.series,
862
+ options = series.options;
863
+
864
+ // Above the current level
865
+ if (this.node.level <= series.nodeMap[series.rootNode].level) {
866
+ className += ' highcharts-above-level';
867
+
868
+ } else if (!this.node.isLeaf && !pick(options.interactByLeaf, !options.allowDrillToNode)) {
869
+ className += ' highcharts-internal-node-interactive';
870
+
871
+ } else if (!this.node.isLeaf) {
872
+ className += ' highcharts-internal-node';
873
+ }
874
+ return className;
875
+ },
876
+ isValid: function() {
877
+ return isNumber(this.value);
878
+ },
879
+ setState: function(state) {
880
+ H.Point.prototype.setState.call(this, state);
881
+
882
+ // Graphic does not exist when point is not visible.
883
+ if (this.graphic) {
884
+ this.graphic.attr({
885
+ zIndex: state === 'hover' ? 1 : 0
886
+ });
887
+ }
888
+ },
889
+ setVisible: seriesTypes.pie.prototype.pointClass.prototype.setVisible
890
+ });
891
+
892
+ }(Highcharts));
868
893
  }));