highcharts-rails 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +13 -13
- data.tar.gz.asc +13 -13
- data/CHANGELOG.markdown +4 -0
- data/Rakefile +33 -0
- data/app/assets/javascripts/highcharts.js +17024 -283
- data/app/assets/javascripts/highcharts/adapters/mootools-adapter.js +316 -13
- data/app/assets/javascripts/highcharts/adapters/prototype-adapter.js +316 -15
- data/app/assets/javascripts/highcharts/adapters/standalone-framework.js +583 -17
- data/app/assets/javascripts/highcharts/highcharts-more.js +2439 -50
- data/app/assets/javascripts/highcharts/modules/annotations.js +401 -7
- data/app/assets/javascripts/highcharts/modules/canvas-tools.js +3113 -133
- data/app/assets/javascripts/highcharts/modules/data.js +581 -16
- data/app/assets/javascripts/highcharts/modules/drilldown.js +449 -11
- data/app/assets/javascripts/highcharts/modules/exporting.js +709 -22
- data/app/assets/javascripts/highcharts/modules/funnel.js +289 -12
- data/app/assets/javascripts/highcharts/modules/heatmap.js +54 -1
- data/app/assets/javascripts/highcharts/modules/map.js +1273 -27
- data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +128 -12
- data/lib/highcharts/version.rb +1 -1
- metadata +2 -2
- metadata.gz.asc +13 -13
@@ -1,12 +1,128 @@
|
|
1
|
-
|
2
|
-
Highcharts JS v3.0.
|
3
|
-
Plugin for displaying a message when there is no data visible in chart.
|
4
|
-
|
5
|
-
(c) 2010-2013 Highsoft AS
|
6
|
-
Author: Øystein Moseng
|
7
|
-
|
8
|
-
License: www.highcharts.com/license
|
9
|
-
*/
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
/**
|
2
|
+
* @license Highcharts JS v3.0.7 (2013-10-24)
|
3
|
+
* Plugin for displaying a message when there is no data visible in chart.
|
4
|
+
*
|
5
|
+
* (c) 2010-2013 Highsoft AS
|
6
|
+
* Author: Øystein Moseng
|
7
|
+
*
|
8
|
+
* License: www.highcharts.com/license
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function (H) { // docs
|
12
|
+
|
13
|
+
var seriesTypes = H.seriesTypes,
|
14
|
+
chartPrototype = H.Chart.prototype,
|
15
|
+
defaultOptions = H.getOptions(),
|
16
|
+
extend = H.extend;
|
17
|
+
|
18
|
+
// Add language option
|
19
|
+
extend(defaultOptions.lang, {
|
20
|
+
noData: 'No data to display'
|
21
|
+
});
|
22
|
+
|
23
|
+
// Add default display options for message
|
24
|
+
defaultOptions.noData = {
|
25
|
+
position: {
|
26
|
+
x: 0,
|
27
|
+
y: 0,
|
28
|
+
align: 'center',
|
29
|
+
verticalAlign: 'middle'
|
30
|
+
},
|
31
|
+
attr: {
|
32
|
+
},
|
33
|
+
style: {
|
34
|
+
fontWeight: 'bold',
|
35
|
+
fontSize: '12px',
|
36
|
+
color: '#60606a'
|
37
|
+
}
|
38
|
+
};
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Define hasData functions for series. These return true if there are data points on this series within the plot area
|
42
|
+
*/
|
43
|
+
function hasDataPie() {
|
44
|
+
return !!this.points.length; /* != 0 */
|
45
|
+
}
|
46
|
+
|
47
|
+
seriesTypes.pie.prototype.hasData = hasDataPie;
|
48
|
+
|
49
|
+
if (seriesTypes.gauge) {
|
50
|
+
seriesTypes.gauge.prototype.hasData = hasDataPie;
|
51
|
+
}
|
52
|
+
|
53
|
+
if (seriesTypes.waterfall) {
|
54
|
+
seriesTypes.waterfall.prototype.hasData = hasDataPie;
|
55
|
+
}
|
56
|
+
|
57
|
+
H.Series.prototype.hasData = function () {
|
58
|
+
return this.dataMax !== undefined && this.dataMin !== undefined;
|
59
|
+
};
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Display a no-data message.
|
63
|
+
*
|
64
|
+
* @param {String} str An optional message to show in place of the default one
|
65
|
+
*/
|
66
|
+
chartPrototype.showNoData = function (str) {
|
67
|
+
var chart = this,
|
68
|
+
options = chart.options,
|
69
|
+
text = str || options.lang.noData,
|
70
|
+
noDataOptions = options.noData;
|
71
|
+
|
72
|
+
if (!chart.noDataLabel) {
|
73
|
+
chart.noDataLabel = chart.renderer.label(text, 0, 0, null, null, null, null, null, 'no-data')
|
74
|
+
.attr(noDataOptions.attr)
|
75
|
+
.css(noDataOptions.style)
|
76
|
+
.add();
|
77
|
+
chart.noDataLabel.align(extend(chart.noDataLabel.getBBox(), noDataOptions.position), false, 'plotBox');
|
78
|
+
}
|
79
|
+
};
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Hide no-data message
|
83
|
+
*/
|
84
|
+
chartPrototype.hideNoData = function () {
|
85
|
+
var chart = this;
|
86
|
+
if (chart.noDataLabel) {
|
87
|
+
chart.noDataLabel = chart.noDataLabel.destroy();
|
88
|
+
}
|
89
|
+
};
|
90
|
+
|
91
|
+
/**
|
92
|
+
* Returns true if there are data points within the plot area now
|
93
|
+
*/
|
94
|
+
chartPrototype.hasData = function () {
|
95
|
+
var chart = this,
|
96
|
+
series = chart.series,
|
97
|
+
i = series.length;
|
98
|
+
|
99
|
+
while (i--) {
|
100
|
+
if (series[i].hasData() && !series[i].options.isInternal) {
|
101
|
+
return true;
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
return false;
|
106
|
+
};
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Show no-data message if there is no data in sight. Otherwise, hide it.
|
110
|
+
*/
|
111
|
+
function handleNoData() {
|
112
|
+
var chart = this;
|
113
|
+
if (chart.hasData()) {
|
114
|
+
chart.hideNoData();
|
115
|
+
} else {
|
116
|
+
chart.showNoData();
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
/**
|
121
|
+
* Add event listener to handle automatic display of no-data message
|
122
|
+
*/
|
123
|
+
chartPrototype.callbacks.push(function (chart) {
|
124
|
+
H.addEvent(chart, 'load', handleNoData);
|
125
|
+
H.addEvent(chart, 'redraw', handleNoData);
|
126
|
+
});
|
127
|
+
|
128
|
+
}(Highcharts));
|
data/lib/highcharts/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: highcharts-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Per Christian B. Viken
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.asc
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
=
|
5
|
+
iQIcBAABAgAGBQJSaN65AAoJEH1ncb0Txu7XJqwQAKFTnwYD7MaPi/B/kmrkNSvg
|
6
|
+
ZyiDdVO6q1Xjv3sm+ZhPs71KkbYgw33tc0DrJ2qKVhdxqOiQeR8fbccuqxQg+mNB
|
7
|
+
Jjb8aB9hvxGwcE3FZoVg5feUfkWClKxjD6Q4PgFwf1FEVAzhs5zrcZZxB1MvqImO
|
8
|
+
6ZWqgk9OmeojoD60Ea2AEN4SfqocgnXYByxWA+V+/tlGlazAZ78ZzyoeECuP14Ws
|
9
|
+
5dgqU3ydZgFtjdb8hQJ7ZvCEthqM9MQKsh6G6zmAAe3HZXkkqPKjYnQWWnCPaYHP
|
10
|
+
MDrS11+CLTc82PCi0xGhrlq0UfMKcRgGRUFeb1Caa5eZIhhEcQ8QSwIVAwivLv4e
|
11
|
+
Vo8WqRkKa0M/WbD35zafMRV45BKZFIw2EKXwo3bwCUQhuhBM3N5Uzxh843g4M7KC
|
12
|
+
UlN0R35DLRtx3u2nPezGJXCrTgjA+wNRkg1hjomPwoXNlSynUeChGYwwOtkkY6SY
|
13
|
+
klpRHjT+AlCygqN7jL10JR/Yc6aDCwayMSm8vH7dswp8c79LaAzJodU4eipRw/VR
|
14
|
+
XTKR6vwMMvOsMqp70aTEmg74unq+kCPB3u5F0tt+REOUkIQz0oXq/HuchD2l+V+L
|
15
|
+
hwm2HVHwbaSrrC9aW3r3YLDfUOIMrlXpxq/k+8270Ly8+KRM0uRTePEM39I5y2Tn
|
16
|
+
o6eZwtev/nkb39s0Gd/x
|
17
|
+
=kP1k
|
18
18
|
-----END PGP SIGNATURE-----
|