corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 /**
2 * @license Highcharts JS v5.0.12 (2017-05-24)
3 *
4 * (c) 2009-2017 Torstein Honsi
5 *
6 * License: www.highcharts.com/license
7 */
8 'use strict';
9 (function(factory) {
10 if (typeof module === 'object' && module.exports) {
11 module.exports = factory;
12 } else {
13 factory(Highcharts);
14 }
15 }(function(Highcharts) {
16 (function(H) {
17 /**
18 * (c) 2010-2017 Torstein Honsi
19 *
20 * License: www.highcharts.com/license
21 */
22 var Axis = H.Axis,
23 Chart = H.Chart,
24 color = H.color,
25 ColorAxis,
26 each = H.each,
27 extend = H.extend,
28 isNumber = H.isNumber,
29 Legend = H.Legend,
30 LegendSymbolMixin = H.LegendSymbolMixin,
31 noop = H.noop,
32 merge = H.merge,
33 pick = H.pick,
34 wrap = H.wrap;
35  
36 /**
37 * The ColorAxis object for inclusion in gradient legends
38 */
39 ColorAxis = H.ColorAxis = function() {
40 this.init.apply(this, arguments);
41 };
42 extend(ColorAxis.prototype, Axis.prototype);
43 extend(ColorAxis.prototype, {
44 defaultColorAxisOptions: {
45 lineWidth: 0,
46 minPadding: 0,
47 maxPadding: 0,
48 gridLineWidth: 1,
49 tickPixelInterval: 72,
50 startOnTick: true,
51 endOnTick: true,
52 offset: 0,
53 marker: {
54 animation: {
55 duration: 50
56 },
57 width: 0.01
58  
59 },
60 labels: {
61 overflow: 'justify',
62 rotation: 0
63 },
64 minColor: '#e6ebf5',
65 maxColor: '#003399',
66 tickLength: 5,
67 showInLegend: true
68 },
69  
70 // Properties to preserve after destroy, for Axis.update (#5881, #6025)
71 keepProps: [
72 'legendGroup',
73 'legendItemHeight',
74 'legendItemWidth',
75 'legendItem',
76 'legendSymbol'
77 ].concat(Axis.prototype.keepProps),
78  
79 /**
80 * Initialize the color axis
81 */
82 init: function(chart, userOptions) {
83 var horiz = chart.options.legend.layout !== 'vertical',
84 options;
85  
86 this.coll = 'colorAxis';
87  
88 // Build the options
89 options = merge(this.defaultColorAxisOptions, {
90 side: horiz ? 2 : 1,
91 reversed: !horiz
92 }, userOptions, {
93 opposite: !horiz,
94 showEmpty: false,
95 title: null
96 });
97  
98 Axis.prototype.init.call(this, chart, options);
99  
100 // Base init() pushes it to the xAxis array, now pop it again
101 //chart[this.isXAxis ? 'xAxis' : 'yAxis'].pop();
102  
103 // Prepare data classes
104 if (userOptions.dataClasses) {
105 this.initDataClasses(userOptions);
106 }
107 this.initStops();
108  
109 // Override original axis properties
110 this.horiz = horiz;
111 this.zoomEnabled = false;
112  
113 // Add default values
114 this.defaultLegendLength = 200;
115 },
116  
117 initDataClasses: function(userOptions) {
118 var chart = this.chart,
119 dataClasses,
120 colorCounter = 0,
121 colorCount = chart.options.chart.colorCount,
122 options = this.options,
123 len = userOptions.dataClasses.length;
124 this.dataClasses = dataClasses = [];
125 this.legendItems = [];
126  
127 each(userOptions.dataClasses, function(dataClass, i) {
128 var colors;
129  
130 dataClass = merge(dataClass);
131 dataClasses.push(dataClass);
132 if (!dataClass.color) {
133 if (options.dataClassColor === 'category') {
134  
135 dataClass.colorIndex = colorCounter;
136  
137 // increase and loop back to zero
138 colorCounter++;
139 if (colorCounter === colorCount) {
140 colorCounter = 0;
141 }
142 } else {
143 dataClass.color = color(options.minColor).tweenTo(
144 color(options.maxColor),
145 len < 2 ? 0.5 : i / (len - 1) // #3219
146 );
147 }
148 }
149 });
150 },
151  
152 initStops: function() {
153 this.stops = this.options.stops || [
154 [0, this.options.minColor],
155 [1, this.options.maxColor]
156 ];
157 each(this.stops, function(stop) {
158 stop.color = color(stop[1]);
159 });
160 },
161  
162 /**
163 * Extend the setOptions method to process extreme colors and color
164 * stops.
165 */
166 setOptions: function(userOptions) {
167 Axis.prototype.setOptions.call(this, userOptions);
168  
169 this.options.crosshair = this.options.marker;
170 },
171  
172 setAxisSize: function() {
173 var symbol = this.legendSymbol,
174 chart = this.chart,
175 legendOptions = chart.options.legend || {},
176 x,
177 y,
178 width,
179 height;
180  
181 if (symbol) {
182 this.left = x = symbol.attr('x');
183 this.top = y = symbol.attr('y');
184 this.width = width = symbol.attr('width');
185 this.height = height = symbol.attr('height');
186 this.right = chart.chartWidth - x - width;
187 this.bottom = chart.chartHeight - y - height;
188  
189 this.len = this.horiz ? width : height;
190 this.pos = this.horiz ? x : y;
191 } else {
192 // Fake length for disabled legend to avoid tick issues and such (#5205)
193 this.len = (this.horiz ? legendOptions.symbolWidth : legendOptions.symbolHeight) || this.defaultLegendLength;
194 }
195 },
196  
197 normalizedValue: function(value) {
198 if (this.isLog) {
199 value = this.val2lin(value);
200 }
201 return 1 - ((this.max - value) / ((this.max - this.min) || 1));
202 },
203  
204 /**
205 * Translate from a value to a color
206 */
207 toColor: function(value, point) {
208 var pos,
209 stops = this.stops,
210 from,
211 to,
212 color,
213 dataClasses = this.dataClasses,
214 dataClass,
215 i;
216  
217 if (dataClasses) {
218 i = dataClasses.length;
219 while (i--) {
220 dataClass = dataClasses[i];
221 from = dataClass.from;
222 to = dataClass.to;
223 if ((from === undefined || value >= from) && (to === undefined || value <= to)) {
224 color = dataClass.color;
225 if (point) {
226 point.dataClass = i;
227 point.colorIndex = dataClass.colorIndex;
228 }
229 break;
230 }
231 }
232  
233 } else {
234  
235 pos = this.normalizedValue(value);
236 i = stops.length;
237 while (i--) {
238 if (pos > stops[i][0]) {
239 break;
240 }
241 }
242 from = stops[i] || stops[i + 1];
243 to = stops[i + 1] || from;
244  
245 // The position within the gradient
246 pos = 1 - (to[0] - pos) / ((to[0] - from[0]) || 1);
247  
248 color = from.color.tweenTo(
249 to.color,
250 pos
251 );
252 }
253 return color;
254 },
255  
256 /**
257 * Override the getOffset method to add the whole axis groups inside the legend.
258 */
259 getOffset: function() {
260 var group = this.legendGroup,
261 sideOffset = this.chart.axisOffset[this.side];
262  
263 if (group) {
264  
265 // Hook for the getOffset method to add groups to this parent group
266 this.axisParent = group;
267  
268 // Call the base
269 Axis.prototype.getOffset.call(this);
270  
271 // First time only
272 if (!this.added) {
273  
274 this.added = true;
275  
276 this.labelLeft = 0;
277 this.labelRight = this.width;
278 }
279 // Reset it to avoid color axis reserving space
280 this.chart.axisOffset[this.side] = sideOffset;
281 }
282 },
283  
284 /**
285 * Create the color gradient
286 */
287 setLegendColor: function() {
288 var grad,
289 horiz = this.horiz,
290 reversed = this.reversed,
291 one = reversed ? 1 : 0,
292 zero = reversed ? 0 : 1;
293  
294 grad = horiz ? [one, 0, zero, 0] : [0, zero, 0, one]; // #3190
295 this.legendColor = {
296 linearGradient: {
297 x1: grad[0],
298 y1: grad[1],
299 x2: grad[2],
300 y2: grad[3]
301 },
302 stops: this.stops
303 };
304 },
305  
306 /**
307 * The color axis appears inside the legend and has its own legend symbol
308 */
309 drawLegendSymbol: function(legend, item) {
310 var padding = legend.padding,
311 legendOptions = legend.options,
312 horiz = this.horiz,
313 width = pick(legendOptions.symbolWidth, horiz ? this.defaultLegendLength : 12),
314 height = pick(legendOptions.symbolHeight, horiz ? 12 : this.defaultLegendLength),
315 labelPadding = pick(legendOptions.labelPadding, horiz ? 16 : 30),
316 itemDistance = pick(legendOptions.itemDistance, 10);
317  
318 this.setLegendColor();
319  
320 // Create the gradient
321 item.legendSymbol = this.chart.renderer.rect(
322 0,
323 legend.baseline - 11,
324 width,
325 height
326 ).attr({
327 zIndex: 1
328 }).add(item.legendGroup);
329  
330 // Set how much space this legend item takes up
331 this.legendItemWidth = width + padding + (horiz ? itemDistance : labelPadding);
332 this.legendItemHeight = height + padding + (horiz ? labelPadding : 0);
333 },
334 /**
335 * Fool the legend
336 */
337 setState: noop,
338 visible: true,
339 setVisible: noop,
340 getSeriesExtremes: function() {
341 var series = this.series,
342 i = series.length;
343 this.dataMin = Infinity;
344 this.dataMax = -Infinity;
345 while (i--) {
346 if (series[i].valueMin !== undefined) {
347 this.dataMin = Math.min(this.dataMin, series[i].valueMin);
348 this.dataMax = Math.max(this.dataMax, series[i].valueMax);
349 }
350 }
351 },
352 drawCrosshair: function(e, point) {
353 var plotX = point && point.plotX,
354 plotY = point && point.plotY,
355 crossPos,
356 axisPos = this.pos,
357 axisLen = this.len;
358  
359 if (point) {
360 crossPos = this.toPixels(point[point.series.colorKey]);
361 if (crossPos < axisPos) {
362 < axisPos) { crossPos = axisPos - 2;
363 < axisPos) { } else if (crossPos > axisPos + axisLen) {
364 < axisPos) { crossPos = axisPos + axisLen + 2;
365 < axisPos) { }
366  
367 < axisPos) { point.plotX = crossPos;
368 < axisPos) { point.plotY = this.len - crossPos;
369 < axisPos) { Axis.prototype.drawCrosshair.call(this, e, point);
370 < axisPos) { point.plotX = plotX;
371 < axisPos) { point.plotY = plotY;
372  
373 < axisPos) { if (this.cross) {
374 < axisPos) { this.cross
375 < axisPos) { .addClass('highcharts-coloraxis-marker')
376 < axisPos) { .add(this.legendGroup);
377  
378  
379  
380 < axisPos) { }
381 < axisPos) { }
382 < axisPos) { },
383 < axisPos) { getPlotLinePath: function(a, b, c, d, pos) {
384 < axisPos) { return isNumber(pos) ? // crosshairs only // #3969 pos can be 0 !!
385 < axisPos) { (this.horiz ? ['M', pos - 4, this.top - 6, 'L', pos + 4, this.top - 6, pos, this.top, 'Z'] : ['M', this.left, pos, 'L', this.left - 6, pos + 6, this.left - 6, pos - 6, 'Z']) :
386 < axisPos) { Axis.prototype.getPlotLinePath.call(this, a, b, c, d);
387 < axisPos) { },
388  
389 < axisPos) { update: function(newOptions, redraw) {
390 < axisPos) { var chart = this.chart,
391 < axisPos) { legend = chart.legend;
392  
393 < axisPos) { each(this.series, function(series) {
394 < axisPos) { series.isDirtyData = true; // Needed for Axis.update when choropleth colors change
395 < axisPos) { });
396  
397 < axisPos) { // When updating data classes, destroy old items and make sure new ones are created (#3207)
398 < axisPos) { if (newOptions.dataClasses && legend.allItems) {
399 < axisPos) { each(legend.allItems, function(item) {
400 < axisPos) { if (item.isDataClass && item.legendGroup) {
401 < axisPos) { item.legendGroup.destroy();
402 < axisPos) { }
403 < axisPos) { });
404 < axisPos) { chart.isDirtyLegend = true;
405 < axisPos) { }
406  
407 < axisPos) { // Keep the options structure updated for export. Unlike xAxis and yAxis, the colorAxis is
408 < axisPos) { // not an array. (#3207)
409 < axisPos) { chart.options[this.coll] = merge(this.userOptions, newOptions);
410  
411 < axisPos) { Axis.prototype.update.call(this, newOptions, redraw);
412 < axisPos) { if (this.legendItem) {
413 < axisPos) { this.setLegendColor();
414 < axisPos) { legend.colorizeItem(this, true);
415 < axisPos) { }
416 < axisPos) { },
417  
418 < axisPos) { /**
419 < axisPos) { * Extend basic axis remove by also removing the legend item.
420 < axisPos) { */
421 < axisPos) { remove: function() {
422 < axisPos) { if (this.legendItem) {
423 < axisPos) { this.chart.legend.destroyItem(this);
424 < axisPos) { }
425 < axisPos) { Axis.prototype.remove.call(this);
426 < axisPos) { },
427  
428 < axisPos) { /**
429 < axisPos) { * Get the legend item symbols for data classes
430 < axisPos) { */
431 < axisPos) { getDataClassLegendSymbols: function() {
432 < axisPos) { var axis = this,
433 < axisPos) { chart = this.chart,
434 < axisPos) { legendItems = this.legendItems,
435 < axisPos) { legendOptions = chart.options.legend,
436 < axisPos) { valueDecimals = legendOptions.valueDecimals,
437 < axisPos) { valueSuffix = legendOptions.valueSuffix || '',
438 < axisPos) { name;
439  
440 < axisPos) { if (!legendItems.length) {
441 < axisPos) { each(this.dataClasses, function(dataClass, i) {
442 < axisPos) { var vis = true,
443 < axisPos) { from = dataClass.from,
444 < axisPos) { to = dataClass.to;
445  
446 < axisPos) { // Assemble the default name. This can be overridden by legend.options.labelFormatter
447 < axisPos) { name = '';
448 < axisPos) { if (from === undefined) {
449 < axisPos) { name = '< ';
450 < axisPos) {< '; } else if (to === undefined) {
451 < axisPos) {< '; name = '> ';
452 < axisPos) {< '; }
453 < axisPos) {< '; if (from !== undefined) {
454 < axisPos) {< '; name += H.numberFormat(from, valueDecimals) + valueSuffix;
455 < axisPos) {< '; }
456 < axisPos) {< '; if (from !== undefined && to !== undefined) {
457 < axisPos) {< '; name += ' - ';
458 < axisPos) {< '; }
459 < axisPos) {< '; if (to !== undefined) {
460 < axisPos) {< '; name += H.numberFormat(to, valueDecimals) + valueSuffix;
461 < axisPos) {< '; }
462 < axisPos) {< '; // Add a mock object to the legend items
463 < axisPos) {< '; legendItems.push(extend({
464 < axisPos) {< '; chart: chart,
465 < axisPos) {< '; name: name,
466 < axisPos) {< '; options: {},
467 < axisPos) {< '; drawLegendSymbol: LegendSymbolMixin.drawRectangle,
468 < axisPos) {< '; visible: true,
469 < axisPos) {< '; setState: noop,
470 < axisPos) {< '; isDataClass: true,
471 < axisPos) {< '; setVisible: function() {
472 < axisPos) {< '; vis = this.visible = !vis;
473 < axisPos) {< '; each(axis.series, function(series) {
474 < axisPos) {< '; each(series.points, function(point) {
475 < axisPos) {< '; if (point.dataClass === i) {
476 < axisPos) {< '; point.setVisible(vis);
477 < axisPos) {< '; }
478 < axisPos) {< '; });
479 < axisPos) {< '; });
480  
481 < axisPos) {< '; chart.legend.colorizeItem(this, vis);
482 < axisPos) {< '; }
483 < axisPos) {< '; }, dataClass));
484 < axisPos) {< '; });
485 < axisPos) {< '; }
486 < axisPos) {< '; return legendItems;
487 < axisPos) {< '; },
488 < axisPos) {< '; name: '' // Prevents 'undefined' in legend in IE8
489 < axisPos) {< '; });
490  
491 < axisPos) {< '; /**
492 < axisPos) {< '; * Handle animation of the color attributes directly
493 < axisPos) {< '; */
494 < axisPos) {< '; each(['fill', 'stroke'], function(prop) {
495 < axisPos) {< '; H.Fx.prototype[prop + 'Setter'] = function() {
496 < axisPos) {< '; this.elem.attr(
497 < axisPos) {< '; prop,
498 < axisPos) {< '; color(this.start).tweenTo(
499 < axisPos) {< '; color(this.end),
500 < axisPos) {< '; this.pos
501 < axisPos) {< '; ),
502 < axisPos) {< '; null,
503 < axisPos) {< '; true
504 < axisPos) {< '; );
505 < axisPos) {< '; };
506 < axisPos) {< '; });
507  
508 < axisPos) {< '; /**
509 < axisPos) {< '; * Extend the chart getAxes method to also get the color axis
510 < axisPos) {< '; */
511 < axisPos) {< '; wrap(Chart.prototype, 'getAxes', function(proceed) {
512  
513 < axisPos) {< '; var options = this.options,
514 < axisPos) {< '; colorAxisOptions = options.colorAxis;
515  
516 < axisPos) {< '; proceed.call(this);
517  
518 < axisPos) {< '; this.colorAxis = [];
519 < axisPos) {< '; if (colorAxisOptions) {
520 < axisPos) {< '; new ColorAxis(this, colorAxisOptions); // eslint-disable-line no-new
521 < axisPos) {< '; }
522 < axisPos) {< '; });
523  
524  
525 < axisPos) {< '; /**
526 < axisPos) {< '; * Wrap the legend getAllItems method to add the color axis. This also removes the
527 < axisPos) {< '; * axis' own series to prevent them from showing up individually.
528 < axisPos) {< '; */
529 < axisPos) {< '; wrap(Legend.prototype, 'getAllItems', function(proceed) {
530 < axisPos) {< '; var allItems = [],
531 < axisPos) {< '; colorAxis = this.chart.colorAxis[0];
532  
533 < axisPos) {< '; if (colorAxis && colorAxis.options) {
534 < axisPos) {< '; if (colorAxis.options.showInLegend) {
535 < axisPos) {< '; // Data classes
536 < axisPos) {< '; if (colorAxis.options.dataClasses) {
537 < axisPos) {< '; allItems = allItems.concat(colorAxis.getDataClassLegendSymbols());
538 < axisPos) {< '; // Gradient legend
539 < axisPos) {< '; } else {
540 < axisPos) {< '; // Add this axis on top
541 < axisPos) {< '; allItems.push(colorAxis);
542 < axisPos) {< '; }
543 < axisPos) {< '; }
544  
545 < axisPos) {< '; // Don't add the color axis' series
546 < axisPos) {< '; each(colorAxis.series, function(series) {
547 < axisPos) {< '; series.options.showInLegend = false;
548 < axisPos) {< '; });
549 < axisPos) {< '; }
550  
551 < axisPos) {< '; return allItems.concat(proceed.call(this));
552 < axisPos) {< '; });
553  
554 < axisPos) {< '; wrap(Legend.prototype, 'colorizeItem', function(proceed, item, visible) {
555 < axisPos) {< '; proceed.call(this, item, visible);
556 < axisPos) {< '; if (visible && item.legendColor) {
557 < axisPos) {< '; item.legendSymbol.attr({
558 < axisPos) {< '; fill: item.legendColor
559 < axisPos) {< '; });
560 < axisPos) {< '; }
561 < axisPos) {< '; });
562  
563 < axisPos) {< '; }(Highcharts));
564 < axisPos) {< '; (function(H) {
565 < axisPos) {< '; /**
566 < axisPos) {< '; * (c) 2010-2017 Torstein Honsi
567 < axisPos) {< '; *
568 < axisPos) {< '; * License: www.highcharts.com/license
569 < axisPos) {< '; */
570 < axisPos) {< '; var defined = H.defined,
571 < axisPos) {< '; each = H.each,
572 < axisPos) {< '; noop = H.noop,
573 < axisPos) {< '; seriesTypes = H.seriesTypes;
574  
575 < axisPos) {< '; /**
576 < axisPos) {< '; * Mixin for maps and heatmaps
577 < axisPos) {< '; */
578 < axisPos) {< '; H.colorPointMixin = {
579 < axisPos) {< '; /**
580 < axisPos) {< '; * Color points have a value option that determines whether or not it is a null point
581 < axisPos) {< '; */
582 < axisPos) {< '; isValid: function() {
583 < axisPos) {< '; return this.value !== null;
584 < axisPos) {< '; },
585  
586 < axisPos) {< '; /**
587 < axisPos) {< '; * Set the visibility of a single point
588 < axisPos) {< '; */
589 < axisPos) {< '; setVisible: function(vis) {
590 < axisPos) {< '; var point = this,
591 < axisPos) {< '; method = vis ? 'show' : 'hide';
592  
593 < axisPos) {< '; // Show and hide associated elements
594 < axisPos) {< '; each(['graphic', 'dataLabel'], function(key) {
595 < axisPos) {< '; if (point[key]) {
596 < axisPos) {< '; point[key][method]();
597 < axisPos) {< '; }
598 < axisPos) {< '; });
599 < axisPos) {< '; },
600 < axisPos) {< '; setState: function(state) {
601 < axisPos) {< '; H.Point.prototype.setState.call(this, state);
602 < axisPos) {< '; if (this.graphic) {
603 < axisPos) {< '; this.graphic.attr({
604 < axisPos) {< '; zIndex: state === 'hover' ? 1 : 0
605 < axisPos) {< '; });
606 < axisPos) {< '; }
607 < axisPos) {< '; }
608 < axisPos) {< '; };
609  
610 < axisPos) {< '; H.colorSeriesMixin = {
611 < axisPos) {< '; pointArrayMap: ['value'],
612 < axisPos) {< '; axisTypes: ['xAxis', 'yAxis', 'colorAxis'],
613 < axisPos) {< '; optionalAxis: 'colorAxis',
614 < axisPos) {< '; trackerGroups: ['group', 'markerGroup', 'dataLabelsGroup'],
615 < axisPos) {< '; getSymbol: noop,
616 < axisPos) {< '; parallelArrays: ['x', 'y', 'value'],
617 < axisPos) {< '; colorKey: 'value',
618  
619  
620  
621 < axisPos) {< '; /**
622 < axisPos) {< '; * In choropleth maps, the color is a result of the value, so this needs translation too
623 < axisPos) {< '; */
624 < axisPos) {< '; translateColors: function() {
625 < axisPos) {< '; var series = this,
626 < axisPos) {< '; nullColor = this.options.nullColor,
627 < axisPos) {< '; colorAxis = this.colorAxis,
628 < axisPos) {< '; colorKey = this.colorKey;
629  
630 < axisPos) {< '; each(this.data, function(point) {
631 < axisPos) {< '; var value = point[colorKey],
632 < axisPos) {< '; color;
633  
634 < axisPos) {< '; color = point.options.color ||
635 < axisPos) {< '; (point.isNull ? nullColor : (colorAxis && value !== undefined) ? colorAxis.toColor(value, point) : point.color || series.color);
636  
637 < axisPos) {< '; if (color) {
638 < axisPos) {< '; point.color = color;
639 < axisPos) {< '; }
640 < axisPos) {< '; });
641 < axisPos) {< '; },
642  
643 < axisPos) {< '; /**
644 < axisPos) {< '; * Get the color attibutes to apply on the graphic
645 < axisPos) {< '; */
646 < axisPos) {< '; colorAttribs: function(point) {
647 < axisPos) {< '; var ret = {};
648 < axisPos) {< '; if (defined(point.color)) {
649 < axisPos) {< '; ret[this.colorProp || 'fill'] = point.color;
650 < axisPos) {< '; }
651 < axisPos) {< '; return ret;
652 < axisPos) {< '; }
653 < axisPos) {< '; };
654  
655 < axisPos) {< '; }(Highcharts));
656 < axisPos) {< '; (function(H) {
657 < axisPos) {< '; /**
658 < axisPos) {< '; * (c) 2010-2017 Torstein Honsi
659 < axisPos) {< '; *
660 < axisPos) {< '; * License: www.highcharts.com/license
661 < axisPos) {< '; */
662 < axisPos) {< '; var colorPointMixin = H.colorPointMixin,
663 < axisPos) {< '; colorSeriesMixin = H.colorSeriesMixin,
664 < axisPos) {< '; each = H.each,
665 < axisPos) {< '; LegendSymbolMixin = H.LegendSymbolMixin,
666 < axisPos) {< '; merge = H.merge,
667 < axisPos) {< '; noop = H.noop,
668 < axisPos) {< '; pick = H.pick,
669 < axisPos) {< '; Series = H.Series,
670 < axisPos) {< '; seriesType = H.seriesType,
671 < axisPos) {< '; seriesTypes = H.seriesTypes;
672  
673 < axisPos) {< '; // The Heatmap series type
674 < axisPos) {< '; seriesType('heatmap', 'scatter', {
675 < axisPos) {< '; animation: false,
676 < axisPos) {< '; borderWidth: 0,
677  
678 < axisPos) {< '; dataLabels: {
679 < axisPos) {< '; formatter: function() { // #2945
680 < axisPos) {< '; return this.point.value;
681 < axisPos) {< '; },
682 < axisPos) {< '; inside: true,
683 < axisPos) {< '; verticalAlign: 'middle',
684 < axisPos) {< '; crop: false,
685 < axisPos) {< '; overflow: false,
686 < axisPos) {< '; padding: 0 // #3837
687 < axisPos) {< '; },
688 < axisPos) {< '; marker: null,
689 < axisPos) {< '; pointRange: null, // dynamically set to colsize by default
690 < axisPos) {< '; tooltip: {
691 < axisPos) {< '; pointFormat: '{point.x}, {point.y}: {point.value}<br/>'
692 < axisPos) {< '; },
693 < axisPos) {< '; states: {
694 < axisPos) {< '; normal: {
695 < axisPos) {< '; animation: true
696 < axisPos) {< '; },
697 < axisPos) {< '; hover: {
698 < axisPos) {< '; halo: false, // #3406, halo is not required on heatmaps
699 < axisPos) {< '; brightness: 0.2
700 < axisPos) {< '; }
701 < axisPos) {< '; }
702 < axisPos) {< '; }, merge(colorSeriesMixin, {
703 < axisPos) {< '; pointArrayMap: ['y', 'value'],
704 < axisPos) {< '; hasPointSpecificOptions: true,
705 < axisPos) {< '; supportsDrilldown: true,
706 < axisPos) {< '; getExtremesFromAll: true,
707 < axisPos) {< '; directTouch: true,
708  
709 < axisPos) {< '; /**
710 < axisPos) {< '; * Override the init method to add point ranges on both axes.
711 < axisPos) {< '; */
712 < axisPos) {< '; init: function() {
713 < axisPos) {< '; var options;
714 < axisPos) {< '; seriesTypes.scatter.prototype.init.apply(this, arguments);
715  
716 < axisPos) {< '; options = this.options;
717 < axisPos) {< '; options.pointRange = pick(options.pointRange, options.colsize || 1); // #3758, prevent resetting in setData
718 < axisPos) {< '; this.yAxis.axisPointRange = options.rowsize || 1; // general point range
719 < axisPos) {< '; },
720 < axisPos) {< '; translate: function() {
721 < axisPos) {< '; var series = this,
722 < axisPos) {< '; options = series.options,
723 < axisPos) {< '; xAxis = series.xAxis,
724 < axisPos) {< '; yAxis = series.yAxis,
725 < axisPos) {< '; between = function(x, a, b) {
726 < axisPos) {< '; return Math.min(Math.max(a, x), b);
727 < axisPos) {< '; };
728  
729 < axisPos) {< '; series.generatePoints();
730  
731 < axisPos) {< '; each(series.points, function(point) {
732 < axisPos) {< '; var xPad = (options.colsize || 1) / 2,
733 < axisPos) {< '; yPad = (options.rowsize || 1) / 2,
734 < axisPos) {< '; x1 = between(Math.round(xAxis.len - xAxis.translate(point.x - xPad, 0, 1, 0, 1)), -xAxis.len, 2 * xAxis.len),
735 < axisPos) {< '; x2 = between(Math.round(xAxis.len - xAxis.translate(point.x + xPad, 0, 1, 0, 1)), -xAxis.len, 2 * xAxis.len),
736 < axisPos) {< '; y1 = between(Math.round(yAxis.translate(point.y - yPad, 0, 1, 0, 1)), -yAxis.len, 2 * yAxis.len),
737 < axisPos) {< '; y2 = between(Math.round(yAxis.translate(point.y + yPad, 0, 1, 0, 1)), -yAxis.len, 2 * yAxis.len);
738  
739 < axisPos) {< '; // Set plotX and plotY for use in K-D-Tree and more
740 < axisPos) {< '; point.plotX = point.clientX = (x1 + x2) / 2;
741 < axisPos) {< '; point.plotY = (y1 + y2) / 2;
742  
743 < axisPos) {< '; point.shapeType = 'rect';
744 < axisPos) {< '; point.shapeArgs = {
745 < axisPos) {< '; x: Math.min(x1, x2),
746 < axisPos) {< '; y: Math.min(y1, y2),
747 < axisPos) {< '; width: Math.abs(x2 - x1),
748 < axisPos) {< '; height: Math.abs(y2 - y1)
749 < axisPos) {< '; };
750 < axisPos) {< '; });
751  
752 < axisPos) {< '; series.translateColors();
753 < axisPos) {< '; },
754 < axisPos) {< '; drawPoints: function() {
755 < axisPos) {< '; seriesTypes.column.prototype.drawPoints.call(this);
756  
757 < axisPos) {< '; each(this.points, function(point) {
758  
759 < axisPos) {< '; // In styled mode, use CSS, otherwise the fill used in the style
760 < axisPos) {< '; // sheet will take precesence over the fill attribute.
761 < axisPos) {< '; point.graphic.css(this.colorAttribs(point));
762  
763 < axisPos) {< '; }, this);
764 < axisPos) {< '; },
765 < axisPos) {< '; animate: noop,
766 < axisPos) {< '; getBox: noop,
767 < axisPos) {< '; drawLegendSymbol: LegendSymbolMixin.drawRectangle,
768 < axisPos) {< '; alignDataLabel: seriesTypes.column.prototype.alignDataLabel,
769 < axisPos) {< '; getExtremes: function() {
770 < axisPos) {< '; // Get the extremes from the value data
771 < axisPos) {< '; Series.prototype.getExtremes.call(this, this.valueData);
772 < axisPos) {< '; this.valueMin = this.dataMin;
773 < axisPos) {< '; this.valueMax = this.dataMax;
774  
775 < axisPos) {< '; // Get the extremes from the y data
776 < axisPos) {< '; Series.prototype.getExtremes.call(this);
777 < axisPos) {< '; }
778  
779 < axisPos) {< '; }), colorPointMixin);
780  
781 < axisPos) {< '; }(Highcharts));
782 < axisPos) {< ';}));