corrade-nucleus-nucleons – Blame information for rev 1

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