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.
@@ -1,12 +1,128 @@
1
- /*
2
- Highcharts JS v3.0.6 (2013-10-04)
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
- (function(c){function f(){return!!this.points.length}function g(){this.hasData()?this.hideNoData():this.showNoData()}var d=c.seriesTypes,e=c.Chart.prototype,h=c.getOptions(),i=c.extend;i(h.lang,{noData:"No data to display"});h.noData={position:{x:0,y:0,align:"center",verticalAlign:"middle"},attr:{},style:{fontWeight:"bold",fontSize:"12px",color:"#60606a"}};d.pie.prototype.hasData=f;if(d.gauge)d.gauge.prototype.hasData=f;if(d.waterfall)d.waterfall.prototype.hasData=f;c.Series.prototype.hasData=function(){return this.dataMax!==
11
- void 0&&this.dataMin!==void 0};e.showNoData=function(a){var b=this.options,a=a||b.lang.noData,b=b.noData;if(!this.noDataLabel)this.noDataLabel=this.renderer.label(a,0,0,null,null,null,null,null,"no-data").attr(b.attr).css(b.style).add(),this.noDataLabel.align(i(this.noDataLabel.getBBox(),b.position),!1,"plotBox")};e.hideNoData=function(){if(this.noDataLabel)this.noDataLabel=this.noDataLabel.destroy()};e.hasData=function(){for(var a=this.series,b=a.length;b--;)if(a[b].hasData()&&!a[b].options.isInternal)return!0;
12
- return!1};e.callbacks.push(function(a){c.addEvent(a,"load",g);c.addEvent(a,"redraw",g)})})(Highcharts);
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));
@@ -1,3 +1,3 @@
1
1
  module Highcharts
2
- VERSION = "3.0.6"
2
+ VERSION = "3.0.7"
3
3
  end
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.6
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-07 00:00:00.000000000 Z
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
- iQIcBAABAgAGBQJSUn+zAAoJEH1ncb0Txu7XOwAQAIe9Bop4rgnKYCtAhFa7hkQl
6
- SZpAtrpRTatFbki08RYXJpI7yxhQ8NiXZdtecZVdz8n+Sa3cSC+uZcy0qyeJDfya
7
- 1xBLmuZUtEjcI4zen6dSNbg2igMHT2Rki04PWs8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