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 * StaticScale
4 *
5 * (c) 2016 Torstein Honsi, Lars A. V. Cabrera
6 *
7 * --- WORK IN PROGRESS ---
8 *
9 * License: www.highcharts.com/license
10 */
11 'use strict';
12 (function(factory) {
13 if (typeof module === 'object' && module.exports) {
14 module.exports = factory;
15 } else {
16 factory(Highcharts);
17 }
18 }(function(Highcharts) {
19 (function(H) {
20 /**
21 * (c) 2017 Torstein Honsi, Lars Cabrera
22 *
23 * License: www.highcharts.com/license
24 */
25  
26 var Chart = H.Chart,
27 each = H.each,
28 pick = H.pick;
29  
30 Chart.prototype.adjustHeight = function() {
31 each(this.axes, function(axis) {
32 var chart = axis.chart,
33 animate = !!chart.initiatedScale && chart.options.animation,
34 staticScale = axis.options.staticScale,
35 height,
36 diff;
37 if (
38 H.isNumber(staticScale) &&
39 !axis.horiz &&
40 H.defined(axis.min)
41 ) {
42 height = pick(
43 axis.unitLength,
44 axis.max + axis.tickInterval - axis.min
45 ) * staticScale;
46  
47 // Minimum height is 1 x staticScale.
48 height = Math.max(height, staticScale);
49  
50 diff = height - chart.plotHeight;
51  
52 if (Math.abs(diff) >= 1) {
53 chart.plotHeight = height;
54 chart.setSize(null, chart.chartHeight + diff, animate);
55 }
56 }
57  
58 });
59 this.initiatedScale = true;
60 };
61 H.addEvent(Chart.prototype, 'render', Chart.prototype.adjustHeight);
62  
63 }(Highcharts));
64 }));