highstocks-rails 1.3.10 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/Changelog.md +4 -0
- data/Readme.md +5 -4
- data/app/assets/graphics/meteogram-symbols-30px.png +0 -0
- data/app/assets/javascripts/highstocks-3d.js +45 -0
- data/app/assets/javascripts/highstocks.js +381 -368
- data/app/assets/javascripts/highstocks/adapters/standalone-framework.js +12 -12
- data/app/assets/javascripts/highstocks/highstocks-more.js +47 -45
- data/app/assets/javascripts/highstocks/modules/canvas-tools.js +1 -1
- data/app/assets/javascripts/highstocks/modules/data.js +17 -9
- data/app/assets/javascripts/highstocks/modules/drilldown.js +15 -14
- data/app/assets/javascripts/highstocks/modules/exporting.js +12 -11
- data/app/assets/javascripts/highstocks/modules/funnel.js +5 -5
- data/app/assets/javascripts/highstocks/modules/heatmap.js +23 -2
- data/app/assets/javascripts/highstocks/modules/no-data-to-display.js +1 -1
- data/app/assets/javascripts/highstocks/modules/solid-gauge.js +13 -0
- data/app/assets/javascripts/highstocks/themes/dark-blue.js +1 -1
- data/app/assets/javascripts/highstocks/themes/dark-green.js +1 -1
- data/app/assets/javascripts/highstocks/themes/dark-unica.js +213 -0
- data/app/assets/javascripts/highstocks/themes/gray.js +1 -1
- data/app/assets/javascripts/highstocks/themes/grid-light.js +74 -0
- data/app/assets/javascripts/highstocks/themes/sand-signika.js +104 -0
- data/highstocks-rails.gemspec +6 -1
- data/lib/highstocks/version.rb +1 -1
- metadata +24 -19
- data/app/assets/javascripts/highstocks/adapters/mootools-adapter.js +0 -13
- data/app/assets/javascripts/highstocks/adapters/prototype-adapter.js +0 -15
- data/app/assets/javascripts/highstocks/modules/annotations.js +0 -7
- data/app/assets/javascripts/highstocks/modules/map.js +0 -41
@@ -247,7 +247,7 @@ Highcharts.theme = {
|
|
247
247
|
|
248
248
|
// special colors for some of the demo examples
|
249
249
|
legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
|
250
|
-
|
250
|
+
background2: 'rgb(70, 70, 70)',
|
251
251
|
dataLabelsColor: '#444',
|
252
252
|
textColor: '#E0E0E0',
|
253
253
|
maskColor: 'rgba(255,255,255,0.3)'
|
@@ -0,0 +1,74 @@
|
|
1
|
+
/**
|
2
|
+
* Grid-light theme for Highcharts JS
|
3
|
+
* @author Torstein Honsi
|
4
|
+
*/
|
5
|
+
|
6
|
+
// Load the fonts
|
7
|
+
Highcharts.createElement('link', {
|
8
|
+
href: 'http://fonts.googleapis.com/css?family=Dosis:400,600',
|
9
|
+
rel: 'stylesheet',
|
10
|
+
type: 'text/css'
|
11
|
+
}, null, document.getElementsByTagName('head')[0]);
|
12
|
+
|
13
|
+
Highcharts.theme = {
|
14
|
+
colors: ["#7cb5ec", "#f7a35c", "#90ee7e", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
|
15
|
+
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
|
16
|
+
chart: {
|
17
|
+
backgroundColor: null,
|
18
|
+
style: {
|
19
|
+
fontFamily: "Dosis, sans-serif"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
title: {
|
23
|
+
style: {
|
24
|
+
fontSize: '16px',
|
25
|
+
fontWeight: 'bold',
|
26
|
+
textTransform: 'uppercase'
|
27
|
+
}
|
28
|
+
},
|
29
|
+
tooltip: {
|
30
|
+
borderWidth: 0,
|
31
|
+
backgroundColor: 'rgba(219,219,216,0.8)',
|
32
|
+
shadow: false
|
33
|
+
},
|
34
|
+
legend: {
|
35
|
+
itemStyle: {
|
36
|
+
fontWeight: 'bold',
|
37
|
+
fontSize: '13px'
|
38
|
+
}
|
39
|
+
},
|
40
|
+
xAxis: {
|
41
|
+
gridLineWidth: 1,
|
42
|
+
labels: {
|
43
|
+
style: {
|
44
|
+
fontSize: '12px'
|
45
|
+
}
|
46
|
+
}
|
47
|
+
},
|
48
|
+
yAxis: {
|
49
|
+
minorTickInterval: 'auto',
|
50
|
+
title: {
|
51
|
+
style: {
|
52
|
+
textTransform: 'uppercase'
|
53
|
+
}
|
54
|
+
},
|
55
|
+
labels: {
|
56
|
+
style: {
|
57
|
+
fontSize: '12px'
|
58
|
+
}
|
59
|
+
}
|
60
|
+
},
|
61
|
+
plotOptions: {
|
62
|
+
candlestick: {
|
63
|
+
lineColor: '#404048'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
|
67
|
+
|
68
|
+
// General
|
69
|
+
background2: '#F0F0EA'
|
70
|
+
|
71
|
+
};
|
72
|
+
|
73
|
+
// Apply the theme
|
74
|
+
Highcharts.setOptions(Highcharts.theme);
|
@@ -0,0 +1,104 @@
|
|
1
|
+
/**
|
2
|
+
* Sand-Signika theme for Highcharts JS
|
3
|
+
* @author Torstein Honsi
|
4
|
+
*/
|
5
|
+
|
6
|
+
// Load the fonts
|
7
|
+
Highcharts.createElement('link', {
|
8
|
+
href: 'http://fonts.googleapis.com/css?family=Signika:400,700',
|
9
|
+
rel: 'stylesheet',
|
10
|
+
type: 'text/css'
|
11
|
+
}, null, document.getElementsByTagName('head')[0]);
|
12
|
+
|
13
|
+
// Add the background image to the container
|
14
|
+
Highcharts.wrap(Highcharts.Chart.prototype, 'getContainer', function (proceed) {
|
15
|
+
proceed.call(this);
|
16
|
+
this.container.style.background = 'url(http://www.highcharts.com/samples/graphics/sand.png)';
|
17
|
+
});
|
18
|
+
|
19
|
+
|
20
|
+
Highcharts.theme = {
|
21
|
+
colors: ["#f45b5b", "#8085e9", "#8d4654", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
|
22
|
+
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
|
23
|
+
chart: {
|
24
|
+
backgroundColor: null,
|
25
|
+
style: {
|
26
|
+
fontFamily: "Signika, serif"
|
27
|
+
}
|
28
|
+
},
|
29
|
+
title: {
|
30
|
+
style: {
|
31
|
+
color: 'black',
|
32
|
+
fontSize: '16px',
|
33
|
+
fontWeight: 'bold'
|
34
|
+
}
|
35
|
+
},
|
36
|
+
subtitle: {
|
37
|
+
style: {
|
38
|
+
color: 'black'
|
39
|
+
}
|
40
|
+
},
|
41
|
+
tooltip: {
|
42
|
+
borderWidth: 0
|
43
|
+
},
|
44
|
+
legend: {
|
45
|
+
itemStyle: {
|
46
|
+
fontWeight: 'bold',
|
47
|
+
fontSize: '13px'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
xAxis: {
|
51
|
+
labels: {
|
52
|
+
style: {
|
53
|
+
color: '#6e6e70'
|
54
|
+
}
|
55
|
+
}
|
56
|
+
},
|
57
|
+
yAxis: {
|
58
|
+
labels: {
|
59
|
+
style: {
|
60
|
+
color: '#6e6e70'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
},
|
64
|
+
plotOptions: {
|
65
|
+
series: {
|
66
|
+
shadow: true
|
67
|
+
},
|
68
|
+
candlestick: {
|
69
|
+
lineColor: '#404048'
|
70
|
+
},
|
71
|
+
map: {
|
72
|
+
shadow: false
|
73
|
+
}
|
74
|
+
},
|
75
|
+
|
76
|
+
// Highstock specific
|
77
|
+
navigator: {
|
78
|
+
xAxis: {
|
79
|
+
gridLineColor: '#D0D0D8'
|
80
|
+
}
|
81
|
+
},
|
82
|
+
rangeSelector: {
|
83
|
+
buttonTheme: {
|
84
|
+
fill: 'white',
|
85
|
+
stroke: '#C0C0C8',
|
86
|
+
'stroke-width': 1,
|
87
|
+
states: {
|
88
|
+
select: {
|
89
|
+
fill: '#D0D0D8'
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
},
|
94
|
+
scrollbar: {
|
95
|
+
trackBorderColor: '#C0C0C8'
|
96
|
+
},
|
97
|
+
|
98
|
+
// General
|
99
|
+
background2: '#E0E0E8'
|
100
|
+
|
101
|
+
};
|
102
|
+
|
103
|
+
// Apply the theme
|
104
|
+
Highcharts.setOptions(Highcharts.theme);
|
data/highstocks-rails.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = "highstocks-rails"
|
7
7
|
s.version = HighStocks::VERSION
|
8
8
|
s.authors = ["Ankit Gupta"]
|
9
|
-
s.date = '2014-
|
9
|
+
s.date = '2014-09-27'
|
10
10
|
s.email = ["ankit.gupta8898@gmail.com"]
|
11
11
|
s.summary = %q{Gem for easily adding Highstocks to the Rails Asset Pipeline}
|
12
12
|
s.description = %q{Gem that includes Highstocks (Interactive library to create stock or general timeline charts in pure JavaScript and including sophisticated navigation options), in the Rails Asset Pipeline introduced in Rails 3.1. Also have all the highcharts features with it.}
|
@@ -21,5 +21,10 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_development_dependency "bundler", "~> 1.0"
|
22
22
|
s.add_development_dependency "rails", ">= 3.1"
|
23
23
|
s.add_development_dependency 'rake'
|
24
|
+
s.post_install_message = <<-MESSAGE
|
25
|
+
! The 'highstocks-rails' gem has been deprecated (naming change) and has been replaced by 'highstock-rails'.
|
26
|
+
! See: https://rubygems.org/gems/highstock-rails
|
27
|
+
! And: https://github.com/ankit8898/highstock-rails
|
28
|
+
MESSAGE
|
24
29
|
|
25
30
|
end
|
data/lib/highstocks/version.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: highstocks-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ankit Gupta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Gem that includes Highstocks (Interactive library to create stock or
|
@@ -76,36 +76,38 @@ executables: []
|
|
76
76
|
extensions: []
|
77
77
|
extra_rdoc_files: []
|
78
78
|
files:
|
79
|
-
- .gitignore
|
80
|
-
- .travis.yml
|
79
|
+
- ".gitignore"
|
80
|
+
- ".travis.yml"
|
81
81
|
- Changelog.md
|
82
82
|
- Gemfile
|
83
83
|
- Rakefile
|
84
84
|
- Readme.md
|
85
|
+
- app/assets/graphics/meteogram-symbols-30px.png
|
85
86
|
- app/assets/graphics/skies.jpg
|
86
87
|
- app/assets/graphics/snow.png
|
87
88
|
- app/assets/graphics/sun.png
|
88
89
|
- app/assets/images/highstocks/skies.jpg
|
89
90
|
- app/assets/images/highstocks/snow.png
|
90
91
|
- app/assets/images/highstocks/sun.png
|
92
|
+
- app/assets/javascripts/highstocks-3d.js
|
91
93
|
- app/assets/javascripts/highstocks.js
|
92
|
-
- app/assets/javascripts/highstocks/adapters/mootools-adapter.js
|
93
|
-
- app/assets/javascripts/highstocks/adapters/prototype-adapter.js
|
94
94
|
- app/assets/javascripts/highstocks/adapters/standalone-framework.js
|
95
95
|
- app/assets/javascripts/highstocks/highstocks-more.js
|
96
|
-
- app/assets/javascripts/highstocks/modules/annotations.js
|
97
96
|
- app/assets/javascripts/highstocks/modules/canvas-tools.js
|
98
97
|
- app/assets/javascripts/highstocks/modules/data.js
|
99
98
|
- app/assets/javascripts/highstocks/modules/drilldown.js
|
100
99
|
- app/assets/javascripts/highstocks/modules/exporting.js
|
101
100
|
- app/assets/javascripts/highstocks/modules/funnel.js
|
102
101
|
- app/assets/javascripts/highstocks/modules/heatmap.js
|
103
|
-
- app/assets/javascripts/highstocks/modules/map.js
|
104
102
|
- app/assets/javascripts/highstocks/modules/no-data-to-display.js
|
103
|
+
- app/assets/javascripts/highstocks/modules/solid-gauge.js
|
105
104
|
- app/assets/javascripts/highstocks/themes/dark-blue.js
|
106
105
|
- app/assets/javascripts/highstocks/themes/dark-green.js
|
106
|
+
- app/assets/javascripts/highstocks/themes/dark-unica.js
|
107
107
|
- app/assets/javascripts/highstocks/themes/gray.js
|
108
|
+
- app/assets/javascripts/highstocks/themes/grid-light.js
|
108
109
|
- app/assets/javascripts/highstocks/themes/grid.js
|
110
|
+
- app/assets/javascripts/highstocks/themes/sand-signika.js
|
109
111
|
- app/assets/javascripts/highstocks/themes/skies.js
|
110
112
|
- highstocks-rails.gemspec
|
111
113
|
- lib/highstocks-rails.rb
|
@@ -115,18 +117,21 @@ homepage: https://github.com/ankit8898/highstocks-rails
|
|
115
117
|
licenses:
|
116
118
|
- MIT
|
117
119
|
metadata: {}
|
118
|
-
post_install_message:
|
120
|
+
post_install_message: |2
|
121
|
+
! The 'highstocks-rails' gem has been deprecated (naming change) and has been replaced by 'highstock-rails'.
|
122
|
+
! See: https://rubygems.org/gems/highstock-rails
|
123
|
+
! And: https://github.com/ankit8898/highstock-rails
|
119
124
|
rdoc_options: []
|
120
125
|
require_paths:
|
121
126
|
- lib
|
122
127
|
required_ruby_version: !ruby/object:Gem::Requirement
|
123
128
|
requirements:
|
124
|
-
- -
|
129
|
+
- - ">="
|
125
130
|
- !ruby/object:Gem::Version
|
126
131
|
version: '0'
|
127
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
133
|
requirements:
|
129
|
-
- -
|
134
|
+
- - ">="
|
130
135
|
- !ruby/object:Gem::Version
|
131
136
|
version: '0'
|
132
137
|
requirements: []
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Highstock JS v1.3.10 (2014-03-10)
|
3
|
-
MooTools adapter
|
4
|
-
|
5
|
-
(c) 2010-2014 Torstein Honsi
|
6
|
-
|
7
|
-
License: www.highcharts.com/license
|
8
|
-
*/
|
9
|
-
(function(){var e=window,h=document,f=e.MooTools.version.substring(0,3),i=f==="1.2"||f==="1.1",j=i||f==="1.3",g=e.$extend||function(){return Object.append.apply(Object,arguments)};e.HighchartsAdapter={init:function(a){var b=Fx.prototype,c=b.start,d=Fx.Morph.prototype,e=d.compute;b.start=function(b,d){var e=this.element;if(b.d)this.paths=a.init(e,e.d,this.toD);c.apply(this,arguments);return this};d.compute=function(b,c,d){var f=this.paths;if(f)this.element.attr("d",a.step(f[0],f[1],d,this.toD));else return e.apply(this,
|
10
|
-
arguments)}},adapterRun:function(a,b){if(b==="width"||b==="height")return parseInt(document.id(a).getStyle(b),10)},getScript:function(a,b){var c=h.getElementsByTagName("head")[0],d=h.createElement("script");d.type="text/javascript";d.src=a;d.onload=b;c.appendChild(d)},animate:function(a,b,c){var d=a.attr,f=c&&c.complete;if(d&&!a.setStyle)a.getStyle=a.attr,a.setStyle=function(){var a=arguments;this.attr.call(this,a[0],a[1][0])},a.$family=function(){return!0},a.getComputedStyle=function(){return a.element.getComputedStyle.apply(a.element,
|
11
|
-
arguments)};e.HighchartsAdapter.stop(a);c=new Fx.Morph(d?a:document.id(a),g({transition:Fx.Transitions.Quad.easeInOut},c));if(d)c.element=a;if(b.d)c.toD=b.d;f&&c.addEvent("complete",f);c.start(b);a.fx=c},each:function(a,b){return i?$each(a,b):Array.each(a,b)},map:function(a,b){return a.map(b)},grep:function(a,b){return a.filter(b)},inArray:function(a,b,c){return b?b.indexOf(a,c):-1},offset:function(a){a=a.getPosition();return{left:a.x,top:a.y}},extendWithEvents:function(a){a.addEvent||(a.nodeName?
|
12
|
-
document.id(a):g(a,new Events))},addEvent:function(a,b,c){typeof b==="string"&&(b==="unload"&&(b="beforeunload"),e.HighchartsAdapter.extendWithEvents(a),a.addEvent(b,c))},removeEvent:function(a,b,c){typeof a!=="string"&&a.addEvent&&(b?(b==="unload"&&(b="beforeunload"),c?a.removeEvent(b,c):a.removeEvents&&a.removeEvents(b)):a.removeEvents())},fireEvent:function(a,b,c,d){b={type:b,target:a};b=j?new Event(b):new DOMEvent(b);b=g(b,c);if(!b.target&&b.event)b.target=b.event.target;b.preventDefault=function(){d=
|
13
|
-
null};a.fireEvent&&a.fireEvent(b.type,b);d&&d(b)},washMouseEvent:function(a){if(a.page)a.pageX=a.page.x,a.pageY=a.page.y;return a},stop:function(a){a.fx&&a.fx.cancel()}}})();
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Highstock JS v1.3.10 (2014-03-10)
|
3
|
-
Prototype adapter
|
4
|
-
|
5
|
-
@author Michael Nelson, Torstein Honsi.
|
6
|
-
|
7
|
-
Feel free to use and modify this script.
|
8
|
-
Highcharts license: www.highcharts.com/license.
|
9
|
-
*/
|
10
|
-
var HighchartsAdapter=function(){var f=typeof Effect!=="undefined";return{init:function(a){if(f)Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(b,c,d,g){var e;this.element=b;this.key=c;e=b.attr?b.attr(c):$(b).getStyle(c);if(c==="d")this.paths=a.init(b,b.d,d),this.toD=d,e=0,d=1;this.start(Object.extend(g||{},{from:e,to:d,attribute:c}))},setup:function(){HighchartsAdapter._extend(this.element);if(!this.element._highchart_animation)this.element._highchart_animation={};this.element._highchart_animation[this.key]=
|
11
|
-
this},update:function(b){var c=this.paths,d=this.element;c&&(b=a.step(c[0],c[1],b,this.toD));d.attr?d.element&&d.attr(this.options.attribute,b):(c={},c[this.options.attribute]=b,$(d).setStyle(c))},finish:function(){this.element&&this.element._highchart_animation&&delete this.element._highchart_animation[this.key]}})},adapterRun:function(a,b){return parseInt($(a).getStyle(b),10)},getScript:function(a,b){var c=$$("head")[0];c&&c.appendChild((new Element("script",{type:"text/javascript",src:a})).observe("load",
|
12
|
-
b))},addNS:function(a){var b=/^(?:click|mouse(?:down|up|over|move|out))$/;return/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/.test(a)||b.test(a)?a:"h:"+a},addEvent:function(a,b,c){a.addEventListener||a.attachEvent?Event.observe($(a),HighchartsAdapter.addNS(b),c):(HighchartsAdapter._extend(a),a._highcharts_observe(b,c))},animate:function(a,b,c){var d,c=c||{};c.delay=0;c.duration=(c.duration||500)/1E3;c.afterFinish=c.complete;if(f)for(d in b)new Effect.HighchartsTransition($(a),
|
13
|
-
d,b[d],c);else{if(a.attr)for(d in b)a.attr(d,b[d]);c.complete&&c.complete()}a.attr||$(a).setStyle(b)},stop:function(a){var b;if(a._highcharts_extended&&a._highchart_animation)for(b in a._highchart_animation)a._highchart_animation[b].cancel()},each:function(a,b){$A(a).each(b)},inArray:function(a,b,c){return b?b.indexOf(a,c):-1},offset:function(a){return $(a).cumulativeOffset()},fireEvent:function(a,b,c,d){a.fire?a.fire(HighchartsAdapter.addNS(b),c):a._highcharts_extended&&(c=c||{},a._highcharts_fire(b,
|
14
|
-
c));c&&c.defaultPrevented&&(d=null);d&&d(c)},removeEvent:function(a,b,c){$(a).stopObserving&&(b&&(b=HighchartsAdapter.addNS(b)),$(a).stopObserving(b,c));window===a?Event.stopObserving(a,b,c):(HighchartsAdapter._extend(a),a._highcharts_stop_observing(b,c))},washMouseEvent:function(a){return a},grep:function(a,b){return a.findAll(b)},map:function(a,b){return a.map(b)},_extend:function(a){a._highcharts_extended||Object.extend(a,{_highchart_events:{},_highchart_animation:null,_highcharts_extended:!0,
|
15
|
-
_highcharts_observe:function(b,a){this._highchart_events[b]=[this._highchart_events[b],a].compact().flatten()},_highcharts_stop_observing:function(b,a){b?a?this._highchart_events[b]=[this._highchart_events[b]].compact().flatten().without(a):delete this._highchart_events[b]:this._highchart_events={}},_highcharts_fire:function(a,c){var d=this;(this._highchart_events[a]||[]).each(function(a){if(!c.stopped)c.preventDefault=function(){c.defaultPrevented=!0},c.target=d,a.bind(this)(c)===!1&&c.preventDefault()}.bind(this))}})}}}();
|
@@ -1,7 +0,0 @@
|
|
1
|
-
(function(i,C){function m(a){return typeof a==="number"}function n(a){return a!==D&&a!==null}var D,p,r,s=i.Chart,t=i.extend,z=i.each;r=["path","rect","circle"];p={top:0,left:0,center:0.5,middle:0.5,bottom:1,right:1};var u=C.inArray,A=i.merge,B=function(){this.init.apply(this,arguments)};B.prototype={init:function(a,d){var c=d.shape&&d.shape.type;this.chart=a;var b,f;f={xAxis:0,yAxis:0,title:{style:{},text:"",x:0,y:0},shape:{params:{stroke:"#000000",fill:"transparent",strokeWidth:2}}};b={circle:{params:{x:0,
|
2
|
-
y:0}}};if(b[c])f.shape=A(f.shape,b[c]);this.options=A({},f,d)},render:function(a){var d=this.chart,c=this.chart.renderer,b=this.group,f=this.title,e=this.shape,h=this.options,i=h.title,l=h.shape;if(!b)b=this.group=c.g();if(!e&&l&&u(l.type,r)!==-1)e=this.shape=c[h.shape.type](l.params),e.add(b);if(!f&&i)f=this.title=c.label(i),f.add(b);b.add(d.annotations.group);this.linkObjects();a!==!1&&this.redraw()},redraw:function(){var a=this.options,d=this.chart,c=this.group,b=this.title,f=this.shape,e=this.linkedObject,
|
3
|
-
h=d.xAxis[a.xAxis],v=d.yAxis[a.yAxis],l=a.width,w=a.height,x=p[a.anchorY],y=p[a.anchorX],j,o,g,q;if(e)j=e instanceof i.Point?"point":e instanceof i.Series?"series":null,j==="point"?(a.xValue=e.x,a.yValue=e.y,o=e.series):j==="series"&&(o=e),c.visibility!==o.group.visibility&&c.attr({visibility:o.group.visibility});e=n(a.xValue)?h.toPixels(a.xValue+h.minPointOffset)-h.minPixelPadding:a.x;j=n(a.yValue)?v.toPixels(a.yValue):a.y;if(!isNaN(e)&&!isNaN(j)&&m(e)&&m(j)){b&&(b.attr(a.title),b.css(a.title.style));
|
4
|
-
if(f){b=t({},a.shape.params);if(a.units==="values"){for(g in b)u(g,["width","x"])>-1?b[g]=h.translate(b[g]):u(g,["height","y"])>-1&&(b[g]=v.translate(b[g]));b.width&&(b.width-=h.toPixels(0)-h.left);b.x&&(b.x+=h.minPixelPadding);if(a.shape.type==="path"){g=b.d;o=e;for(var r=j,s=g.length,k=0;k<s;)typeof g[k]==="number"&&typeof g[k+1]==="number"?(g[k]=h.toPixels(g[k])-o,g[k+1]=v.toPixels(g[k+1])-r,k+=2):k+=1}}a.shape.type==="circle"&&(b.x+=b.r,b.y+=b.r);f.attr(b)}c.bBox=null;if(!m(l))q=c.getBBox(),l=
|
5
|
-
q.width;if(!m(w))q||(q=c.getBBox()),w=q.height;if(!m(y))y=p.center;if(!m(x))x=p.center;e-=l*y;j-=w*x;d.animation&&n(c.translateX)&&n(c.translateY)?c.animate({translateX:e,translateY:j}):c.translate(e,j)}},destroy:function(){var a=this,d=this.chart.annotations.allItems,c=d.indexOf(a);c>-1&&d.splice(c,1);z(["title","shape","group"],function(b){a[b]&&(a[b].destroy(),a[b]=null)});a.group=a.title=a.shape=a.chart=a.options=null},update:function(a,d){t(this.options,a);this.linkObjects();this.render(d)},
|
6
|
-
linkObjects:function(){var a=this.chart,d=this.linkedObject,c=d&&(d.id||d.options.id),b=this.options.linkedTo;if(n(b)){if(!n(d)||b!==c)this.linkedObject=a.get(b)}else this.linkedObject=null}};t(s.prototype,{annotations:{add:function(a,d){var c=this.allItems,b=this.chart,f,e;Object.prototype.toString.call(a)==="[object Array]"||(a=[a]);for(e=a.length;e--;)f=new B(b,a[e]),c.push(f),f.render(d)},redraw:function(){z(this.allItems,function(a){a.redraw()})}}});s.prototype.callbacks.push(function(a){var d=
|
7
|
-
a.options.annotations,c;c=a.renderer.g("annotations");c.attr({zIndex:7});c.add();a.annotations.allItems=[];a.annotations.chart=a;a.annotations.group=c;Object.prototype.toString.call(d)==="[object Array]"&&d.length>0&&a.annotations.add(a.options.annotations);i.addEvent(a,"redraw",function(){a.annotations.redraw()})})})(Highcharts,HighchartsAdapter);
|
@@ -1,41 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Map plugin v0.2 for Highcharts
|
3
|
-
|
4
|
-
(c) 2011-2014 Torstein Honsi
|
5
|
-
|
6
|
-
License: www.highcharts.com/license
|
7
|
-
*/
|
8
|
-
(function(i){function A(a,b,d){for(var c=4,e,f=[];c--;)e=b.rgba[c]+(a.rgba[c]-b.rgba[c])*(1-d),f[c]=c===3?e:Math.round(e);return"rgba("+f.join(",")+")"}function E(a,b,d,c,e,f,g,h,m){a=a["stroke-width"]%2/2;b-=a;d-=a;return["M",b+f,d,"L",b+c-g,d,"C",b+c-g/2,d,b+c,d+g/2,b+c,d+g,"L",b+c,d+e-h,"C",b+c,d+e-h/2,b+c-h/2,d+e,b+c-h,d+e,"L",b+m,d+e,"C",b+m/2,d+e,b,d+e-m/2,b,d+e-m,"L",b,d+f,"C",b,d+f/2,b+f/2,d,b+f,d,"Z"]}var o=i.Axis,x=i.Chart,v=i.Color,w=i.Point,s=i.Pointer,H=i.Legend,y=i.Series,F=i.VMLRenderer,
|
9
|
-
B=i.SVGRenderer.prototype.symbols,l=i.each,r=i.extend,t=i.extendClass,n=i.merge,j=i.pick,G=i.numberFormat,C=i.getOptions(),k=i.seriesTypes,p=C.plotOptions,q=i.wrap,u=function(){};r(C.lang,{zoomIn:"Zoom in",zoomOut:"Zoom out"});C.mapNavigation={buttonOptions:{alignTo:"plotBox",align:"left",verticalAlign:"top",x:0,width:18,height:18,style:{fontSize:"15px",fontWeight:"bold",textAlign:"center"},theme:{"stroke-width":1}},buttons:{zoomIn:{onclick:function(){this.mapZoom(0.5)},text:"+",y:0},zoomOut:{onclick:function(){this.mapZoom(2)},
|
10
|
-
text:"-",y:28}}};i.splitPath=function(a){var b,a=a.replace(/([A-Za-z])/g," $1 "),a=a.replace(/^\s*/,"").replace(/\s*$/,""),a=a.split(/[ ,]+/);for(b=0;b<a.length;b++)/[a-zA-Z]/.test(a[b])||(a[b]=parseFloat(a[b]));return a};i.maps={};q(o.prototype,"getSeriesExtremes",function(a){var b=this.isXAxis,d,c,e=[];b&&l(this.series,function(a,b){if(a.useMapGeometry)e[b]=a.xData,a.xData=[]});a.call(this);if(b)d=j(this.dataMin,Number.MAX_VALUE),c=j(this.dataMax,Number.MIN_VALUE),l(this.series,function(a,b){if(a.useMapGeometry)d=
|
11
|
-
Math.min(d,j(a.minX,d)),c=Math.max(c,j(a.maxX,d)),a.xData=e[b]}),this.dataMin=d,this.dataMax=c});q(o.prototype,"setAxisTranslation",function(a){var b=this.chart,d=b.plotWidth/b.plotHeight,c=b.xAxis[0];a.call(this);if(b.options.chart.preserveAspectRatio&&this.coll==="yAxis"&&c.transA!==void 0&&(this.transA=c.transA=Math.min(this.transA,c.transA),a=b.mapRatio=d/((c.max-c.min)/(this.max-this.min)),c=a<1?this:c,a=(c.max-c.min)*c.transA,c.pixelPadding=c.len-a,c.minPixelPadding=c.pixelPadding/2,a=c.fixTo))a=
|
12
|
-
a[1]-c.toValue(a[0],!0),a*=c.transA,Math.abs(a)>c.minPixelPadding&&(a=0),c.minPixelPadding-=a});q(o.prototype,"render",function(a){a.call(this);this.fixTo=null});r(s.prototype,{onContainerDblClick:function(a){var b=this.chart,a=this.normalize(a);b.options.mapNavigation.enableDoubleClickZoomTo?b.pointer.inClass(a.target,"highcharts-tracker")&&b.hoverPoint.zoomTo():b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&b.mapZoom(0.5,b.xAxis[0].toValue(a.chartX),b.yAxis[0].toValue(a.chartY),a.chartX,
|
13
|
-
a.chartY)},onContainerMouseWheel:function(a){var b=this.chart,d,a=this.normalize(a);d=a.detail||-(a.wheelDelta/120);b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&b.mapZoom(d>0?2:0.5,b.xAxis[0].toValue(a.chartX),b.yAxis[0].toValue(a.chartY),d>0?void 0:a.chartX,d>0?void 0:a.chartY)}});q(s.prototype,"init",function(a,b,d){a.call(this,b,d);if(j(d.mapNavigation.enableTouchZoom,d.mapNavigation.enabled))this.pinchX=this.pinchHor=this.pinchY=this.pinchVert=!0});q(s.prototype,"pinchTranslate",function(a,
|
14
|
-
b,d,c,e,f,g,h,m){a.call(this,b,d,c,e,f,g,h,m);this.chart.options.chart.type==="map"&&(a=f.scaleX>f.scaleY,this.pinchTranslateDirection(!a,c,e,f,g,h,m,a?f.scaleX:f.scaleY))});var D=i.ColorAxis=function(){this.init.apply(this,arguments)};r(D.prototype,o.prototype);r(D.prototype,{defaultColorAxisOptions:{lineWidth:0,gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},color:"gray",width:0.01},labels:{overflow:"justify"},minColor:"#EFEFFF",maxColor:"#102d4c"},
|
15
|
-
init:function(a,b){var d=a.options.legend.layout!=="vertical",c;c=n(this.defaultColorAxisOptions,{side:d?2:1,reversed:!d},b,{isX:d,opposite:!d,showEmpty:!1,title:null});o.prototype.init.call(this,a,c);b.dataClasses&&this.initDataClasses(b);this.isXAxis=!0;this.horiz=d},initDataClasses:function(a){var b=this.chart,d,c=0,e=this.options;this.dataClasses=d=[];l(a.dataClasses,function(f,g){var h,f=n(f);d.push(f);if(!f.color)e.dataClassColor==="category"?(h=b.options.colors,f.color=h[c++],c===h.length&&
|
16
|
-
(c=0)):f.color=A(v(e.minColor),v(e.maxColor),g/(a.dataClasses.length-1))})},setOptions:function(a){o.prototype.setOptions.call(this,a);this.options.crosshair=this.options.marker;this.stops=a.stops||[[0,this.options.minColor],[1,this.options.maxColor]];l(this.stops,function(a){a.color=v(a[1])});this.coll="colorAxis"},setAxisSize:function(){var a=this.legendSymbol,b=this.chart;if(a)this.left=a.x,this.top=a.y,this.width=a.width,this.height=a.height,this.right=b.chartWidth-this.left-this.width,this.bottom=
|
17
|
-
b.chartHeight-this.top-this.height,this.len=this.horiz?this.width:this.height,this.pos=this.horiz?this.left:this.top},toColor:function(a,b){var d,c=this.stops,e,f=this.dataClasses,g,h;if(f)for(h=f.length;h--;){if(g=f[h],e=g.from,c=g.to,(e===void 0||a>=e)&&(c===void 0||a<=c)){d=g.color;if(b)b.dataClass=h;break}}else{this.isLog&&(a=this.val2lin(a));d=1-(this.max-a)/(this.max-this.min);for(h=c.length;h--;)if(d>c[h][0])break;e=c[h]||c[h+1];c=c[h+1]||e;d=1-(c[0]-d)/(c[0]-e[0]||1);d=A(e.color,c.color,d)}return d},
|
18
|
-
getOffset:function(){var a=this.legendGroup;if(a&&(o.prototype.getOffset.call(this),!this.axisGroup.parentGroup))this.axisGroup.add(a),this.gridGroup.add(a),this.labelGroup.add(a),this.added=!0},setLegendColor:function(){var a,b=this.options;a=this.horiz?[0,0,1,0]:[0,0,0,1];this.legendColor={linearGradient:{x1:a[0],y1:a[1],x2:a[2],y2:a[3]},stops:b.stops||[[0,b.minColor],[1,b.maxColor]]}},drawLegendSymbol:function(a,b){var d=a.padding,c=a.options,e=this.horiz,f=j(c.symbolWidth,e?200:12),g=j(c.symbolHeight,
|
19
|
-
e?12:200),c=j(c.labelPadding,e?10:30);this.setLegendColor();b.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,f,g).attr({zIndex:1}).add(b.legendGroup);b.legendSymbol.getBBox();this.legendItemWidth=f+d+(e?0:c);this.legendItemHeight=g+d+(e?c:0)},setState:u,visible:!0,setVisible:u,getSeriesExtremes:function(){var a;if(this.series.length)a=this.series[0],this.dataMin=a.valueMin,this.dataMax=a.valueMax},drawCrosshair:function(a,b){var d=!this.cross,c=b&&b.plotX,e=b&&b.plotY,f,g=this.pos,h=this.len;
|
20
|
-
if(b)f=this.toPixels(b.value),f<g?f=g-2:f>g+h&&(f=g+h+2),b.plotX=f,b.plotY=this.len-f,o.prototype.drawCrosshair.call(this,a,b),b.plotX=c,b.plotY=e,!d&&this.cross&&this.cross.attr({fill:this.crosshair.color}).add(this.labelGroup)},getPlotLinePath:function(a,b,d,c,e){return e?this.horiz?["M",e-4,this.top-6,"L",e+4,this.top-6,e,this.top,"Z"]:["M",this.left,e,"L",this.left-6,e+6,this.left-6,e-6,"Z"]:o.prototype.getPlotLinePath.call(this,a,b,d,c)},update:function(a,b){o.prototype.update.call(this,a,b);
|
21
|
-
this.legendItem&&(this.setLegendColor(),this.chart.legend.colorizeItem(this,!0))},getDataClassLegendSymbols:function(){var a=this,b=this.chart,d=[],c=b.options.legend,e=c.valueDecimals,f=c.valueSuffix||"",g;l(this.dataClasses,function(c,m){var z=!0,j=c.from,k=c.to;g="";j===void 0?g="< ":k===void 0&&(g="> ");j!==void 0&&(g+=G(j,e)+f);j!==void 0&&k!==void 0&&(g+=" - ");k!==void 0&&(g+=G(k,e)+f);d.push(i.extend({chart:b,name:g,options:{},drawLegendSymbol:i.LegendSymbolMixin.drawRectangle,visible:!0,
|
22
|
-
setState:u,setVisible:function(){z=this.visible=!z;l(a.series,function(a){l(a.points,function(a){a.dataClass===m&&a.setVisible(z)})});b.legend.colorizeItem(this,z)}},c))});return d}});q(H.prototype,"getAllItems",function(a){var b=[],d=this.chart.colorAxis[0];d&&(d.options.dataClasses?b=b.concat(d.getDataClassLegendSymbols()):b.push(d),l(d.series,function(a){a.options.showInLegend=!1}));return b.concat(a.call(this))});r(x.prototype,{renderMapNavigation:function(){var a=this,b=this.options.mapNavigation,
|
23
|
-
d=b.buttons,c,e,f,g,h=function(){this.handler.call(a)};if(j(b.enableButtons,b.enabled)&&!a.renderer.forExport)for(c in d)if(d.hasOwnProperty(c))f=n(b.buttonOptions,d[c]),e=f.theme,g=e.states,e=a.renderer.button(f.text,0,0,h,e,g&&g.hover,g&&g.select,0,c==="zoomIn"?"topbutton":"bottombutton").attr({width:f.width,height:f.height,title:a.options.lang[c],zIndex:5}).css(f.style).add(),e.handler=f.onclick,e.align(r(f,{width:e.width,height:2*e.height}),null,f.alignTo)},fitToBox:function(a,b){l([["x","width"],
|
24
|
-
["y","height"]],function(d){var c=d[0],d=d[1];a[c]+a[d]>b[c]+b[d]&&(a[d]>b[d]?(a[d]=b[d],a[c]=b[c]):a[c]=b[c]+b[d]-a[d]);a[d]>b[d]&&(a[d]=b[d]);a[c]<b[c]&&(a[c]=b[c])});return a},mapZoom:function(a,b,d,c,e){var f=this.xAxis[0],g=f.max-f.min,h=j(b,f.min+g/2),m=g*a,g=this.yAxis[0],i=g.max-g.min,k=j(d,g.min+i/2);i*=a;h=this.fitToBox({x:h-m*(c?(c-f.pos)/f.len:0.5),y:k-i*(e?(e-g.pos)/g.len:0.5),width:m,height:i},{x:f.dataMin,y:g.dataMin,width:f.dataMax-f.dataMin,height:g.dataMax-g.dataMin});if(c)f.fixTo=
|
25
|
-
[c-f.pos,b];if(e)g.fixTo=[e-g.pos,d];a!==void 0?(f.setExtremes(h.x,h.x+h.width,!1),g.setExtremes(h.y,h.y+h.height,!1)):(f.setExtremes(void 0,void 0,!1),g.setExtremes(void 0,void 0,!1));this.redraw()}});q(x.prototype,"getAxes",function(a){var b=this.options.colorAxis;a.call(this);this.colorAxis=[];b&&new D(this,b)});q(x.prototype,"render",function(a){var b=this,d=b.options.mapNavigation;a.call(b);b.renderMapNavigation();(j(d.enableDoubleClickZoom,d.enabled)||d.enableDoubleClickZoomTo)&&i.addEvent(b.container,
|
26
|
-
"dblclick",function(a){b.pointer.onContainerDblClick(a)});j(d.enableMouseWheelZoom,d.enabled)&&i.addEvent(b.container,document.onmousewheel===void 0?"DOMMouseScroll":"mousewheel",function(a){b.pointer.onContainerMouseWheel(a);return!1})});p.map=n(p.scatter,{allAreas:!0,animation:!1,nullColor:"#F8F8F8",borderColor:"silver",borderWidth:1,marker:null,stickyTracking:!1,dataLabels:{format:"{point.value}",verticalAlign:"middle"},turboThreshold:0,tooltip:{followPointer:!0,pointFormat:"{point.name}: {point.value}<br/>"},
|
27
|
-
states:{normal:{animation:!0},hover:{brightness:0.2}}});s=t(w,{applyOptions:function(a,b){var d=w.prototype.applyOptions.call(this,a,b),c=this.series,e=c.options,f=e.joinBy;if(e.mapData)if(e=f?c.getMapData(f,d[f]):e.mapData[d.x]){if(c.xyFromShape)d.x=e._midX,d.y=e._midY;r(d,e)}else d.value=d.value||null;return d},setVisible:function(a){var b=this,d=a?"show":"hide";l(["graphic","dataLabel"],function(a){if(b[a])b[a][d]()})},onMouseOver:function(a){clearTimeout(this.colorInterval);w.prototype.onMouseOver.call(this,
|
28
|
-
a)},onMouseOut:function(){var a=this,b=+new Date,d=v(a.options.color),c=v(a.pointAttr.hover.fill),e=a.series.options.states.normal.animation,f=e&&(e.duration||500);if(f&&d.rgba.length===4&&c.rgba.length===4&&a.state!=="select")delete a.pointAttr[""].fill,clearTimeout(a.colorInterval),a.colorInterval=setInterval(function(){var e=(new Date-b)/f,h=a.graphic;e>1&&(e=1);h&&h.attr("fill",A(c,d,e));e>=1&&clearTimeout(a.colorInterval)},13);w.prototype.onMouseOut.call(a)},zoomTo:function(){var a=this.series;
|
29
|
-
a.xAxis.setExtremes(this._minX,this._maxX,!1);a.yAxis.setExtremes(this._minY,this._maxY,!1);a.chart.redraw()}});k.map=t(k.scatter,{type:"map",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",dashstyle:"dashStyle"},pointClass:s,pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],optionalAxis:"colorAxis",trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:u,supportsDrilldown:!0,getExtremesFromAll:!0,useMapGeometry:!0,parallelArrays:["x","y",
|
30
|
-
"value"],getBox:function(a){var b=Number.MIN_VALUE,d=Number.MAX_VALUE,c=Number.MIN_VALUE,e=Number.MAX_VALUE,f;l(a||[],function(a){if(a.path){if(typeof a.path==="string")a.path=i.splitPath(a.path);var h=a.path||[],m=h.length,k=!1,j=Number.MIN_VALUE,l=Number.MAX_VALUE,o=Number.MIN_VALUE,n=Number.MAX_VALUE;if(!a._foundBox){for(;m--;)typeof h[m]==="number"&&!isNaN(h[m])&&(k?(j=Math.max(j,h[m]),l=Math.min(l,h[m])):(o=Math.max(o,h[m]),n=Math.min(n,h[m])),k=!k);a._midX=l+(j-l)*(a.middleX||0.5);a._midY=n+
|
31
|
-
(o-n)*(a.middleY||0.5);a._maxX=j;a._minX=l;a._maxY=o;a._minY=n;a._foundBox=!0}b=Math.max(b,a._maxX);d=Math.min(d,a._minX);c=Math.max(c,a._maxY);e=Math.min(e,a._minY);f=!0}});if(f)this.minY=Math.min(e,j(this.minY,Number.MAX_VALUE)),this.maxY=Math.max(c,j(this.maxY,Number.MIN_VALUE)),this.minX=Math.min(d,j(this.minX,Number.MAX_VALUE)),this.maxX=Math.max(b,j(this.maxX,Number.MIN_VALUE))},getExtremes:function(){y.prototype.getExtremes.call(this,this.valueData);this.chart.hasRendered&&this.isDirtyData&&
|
32
|
-
this.getBox(this.options.data);this.valueMin=this.dataMin;this.valueMax=this.dataMax;this.dataMin=this.minY;this.dataMax=this.maxY},translatePath:function(a){var b=!1,d=this.xAxis,c=this.yAxis,e=d.min,f=d.transA,d=d.minPixelPadding,g=c.min,h=c.transA,c=c.minPixelPadding,i,j=[];if(a)for(i=a.length;i--;)typeof a[i]==="number"?(j[i]=b?(a[i]-e)*f+d:(a[i]-g)*h+c,b=!b):j[i]=a[i];return j},setData:function(a,b){var d=this.options,c=d.mapData,e=d.joinBy,f=[];this.getBox(a);this.getBox(c);d.allAreas&&c&&(a=
|
33
|
-
a||[],e&&l(a,function(a){f.push(a[e])}),f="|"+f.join("|")+"|",l(c,function(b){(!e||f.indexOf("|"+b[e]+"|")===-1)&&a.push(n(b,{value:null}))}));y.prototype.setData.call(this,a,b)},getMapData:function(a,b){var d=this.options.mapData,c=this.mapMap,e=d.length;if(!c)c=this.mapMap={};if(c[b]!==void 0)return d[c[b]];else if(b!==void 0)for(;e--;)if(d[e][a]===b)return c[b]=e,d[e]},translateColors:function(){var a=this,b=this.options.nullColor,d=this.colorAxis;l(this.data,function(c){var e=c.value;if(e=e===
|
34
|
-
null?b:d?d.toColor(e,c):c.color||a.color)c.color=c.options.color=e})},drawGraph:u,drawDataLabels:u,translate:function(){var a=this,b=a.xAxis,d=a.yAxis;a.generatePoints();l(a.data,function(c){c.plotX=b.toPixels(c._midX,!0);c.plotY=d.toPixels(c._midY,!0);if(a.isDirtyData||a.chart.renderer.isVML)c.shapeType="path",c.shapeArgs={d:a.translatePath(c.path),"vector-effect":"non-scaling-stroke"}});a.translateColors()},drawPoints:function(){var a=this.xAxis,b=this.yAxis,d,c=this.group,e=this.chart,f=e.renderer,
|
35
|
-
g=function(a,b){var c=a.dataMin,e=a.dataMax;return a.len*(1-d)*((a.min-a.minPixelPadding/a.transA-(c-(e-c)*(b-1)/2))/((e-c-a.max+a.min)*b))};if(!this.transformGroup)this.transformGroup=f.g().attr({scaleX:1,scaleY:1}).add(c);this.isDirtyData||f.isVML?(this.group=this.transformGroup,k.column.prototype.drawPoints.apply(this),this.group=c,l(this.points,function(a){e.hasRendered&&a.graphic&&a.graphic.attr("fill",a.options.color)}),this.transA=a.transA):(d=a.transA/this.transA,d>0.99&&d<1.01?(b=a=0,d=1):
|
36
|
-
(a=g(a,Math.max(1,this.chart.mapRatio)),b=g(b,1/Math.min(1,this.chart.mapRatio))),this.transformGroup.animate({translateX:a,translateY:b,scaleX:d,scaleY:d}));y.prototype.drawDataLabels.call(this)},render:function(){var a=this,b=y.prototype.render;a.chart.renderer.isVML&&a.data.length>3E3?setTimeout(function(){b.call(a)}):b.call(a)},animate:function(a){var b=this.options.animation,d=this.group,c=this.xAxis,e=this.yAxis,f=c.pos,g=e.pos;if(this.chart.renderer.isSVG)b===!0&&(b={duration:1E3}),a?d.attr({translateX:f+
|
37
|
-
c.len/2,translateY:g+e.len/2,scaleX:0.001,scaleY:0.001}):(d.animate({translateX:f,translateY:g,scaleX:1,scaleY:1},b),this.animate=null)},animateDrilldown:function(a){var b=this.chart.plotBox,d=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],c=d.bBox,e=this.chart.options.drilldown.animation;if(!a)a=Math.min(c.width/b.width,c.height/b.height),d.shapeArgs={scaleX:a,scaleY:a,translateX:c.x,translateY:c.y},l(this.points,function(a){a.graphic.attr(d.shapeArgs).animate({scaleX:1,scaleY:1,
|
38
|
-
translateX:0,translateY:0},e)}),this.animate=null},drawLegendSymbol:i.LegendSymbolMixin.drawRectangle,animateDrillupFrom:function(a){k.column.prototype.animateDrillupFrom.call(this,a)},animateDrillupTo:function(a){k.column.prototype.animateDrillupTo.call(this,a)}});p.mapline=n(p.map,{lineWidth:1,fillColor:"none"});k.mapline=t(k.map,{type:"mapline",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth",fill:"fillColor"},drawLegendSymbol:k.line.prototype.drawLegendSymbol});p.mappoint=n(p.scatter,
|
39
|
-
{dataLabels:{enabled:!0,format:"{point.name}",color:"black",style:{textShadow:"0 0 5px white"}}});k.mappoint=t(k.scatter,{type:"mappoint"});if(k.bubble)p.mapbubble=n(p.bubble,{tooltip:{pointFormat:"{point.name}: {point.z}"}}),k.mapbubble=t(k.bubble,{pointClass:t(w,{applyOptions:s.prototype.applyOptions}),xyFromShape:!0,type:"mapbubble",pointArrayMap:["z"],getMapData:k.map.prototype.getMapData,getBox:k.map.prototype.getBox,setData:k.map.prototype.setData});B.topbutton=function(a,b,d,c,e){return E(e,
|
40
|
-
a,b,d,c,e.r,e.r,0,0)};B.bottombutton=function(a,b,d,c,e){return E(e,a,b,d,c,0,0,e.r,e.r)};i.Renderer===F&&l(["topbutton","bottombutton"],function(a){F.prototype.symbols[a]=B[a]});i.Map=function(a,b){var d={endOnTick:!1,gridLineWidth:0,lineWidth:0,minPadding:0,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]},c;c=a.series;a.series=null;a=n({chart:{panning:"xy",type:"map"},xAxis:d,yAxis:n(d,{reversed:!0})},a,{chart:{inverted:!1,alignTicks:!1,preserveAspectRatio:!0}});a.series=c;return new x(a,
|
41
|
-
b)}})(Highcharts);
|