lazy_high_charts 1.3.2 → 1.3.3.beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +14 -0
- data/GEM_VERSION +1 -1
- data/lib/lazy_high_charts.rb +4 -2
- data/lib/lazy_high_charts/high_chart.rb +1 -1
- data/lib/lazy_high_charts/layout_helper.rb +10 -0
- data/spec/high_chart_spec.rb +4 -4
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# VERSION 1.3.3
|
2
|
+
* Dec 17, 2012
|
3
|
+
1. rails 4 feature turbolinks supported.
|
4
|
+
[#95](https://github.com/michelson/lazy_high_charts/isues/95)
|
5
|
+
2. Can be used without rails, such as sinatra web framework.
|
6
|
+
[#94](https://github.com/michelson/lazy_high_charts/isues/96)
|
7
|
+
3. You shouldn't be forced to override the default chart text
|
8
|
+
[#93](https://github.com/michelson/lazy_high_charts/issues/93)
|
9
|
+
|
10
|
+
# VERSION 1.3.2
|
11
|
+
* Nov 22, 2012
|
12
|
+
1. ActiveView method is not found.
|
13
|
+
[#87](https://github.com/michelson/lazy_high_charts/issues/87)
|
14
|
+
|
1
15
|
# VERSION 1.3.1
|
2
16
|
* Nov 21, 2012
|
3
17
|
1. Fix invalid js encoding from wget highcharts cdn source url.
|
data/GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.2
|
1
|
+
1.3.3.beta.2
|
data/lib/lazy_high_charts.rb
CHANGED
@@ -2,8 +2,10 @@ require File.join(File.dirname(__FILE__), *%w[lazy_high_charts core_ext string])
|
|
2
2
|
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts options_key_filter])
|
3
3
|
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts high_chart])
|
4
4
|
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts layout_helper])
|
5
|
-
|
6
|
-
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts
|
5
|
+
if defined?(::Rails::Railtie)
|
6
|
+
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts railtie])
|
7
|
+
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts engine]) if ::Rails.version >= '3.1'
|
8
|
+
end
|
7
9
|
|
8
10
|
module LazyHighCharts
|
9
11
|
|
@@ -21,7 +21,7 @@ module LazyHighCharts
|
|
21
21
|
|
22
22
|
# title: legend: xAxis: yAxis: tooltip: credits: :plotOptions
|
23
23
|
def defaults_options
|
24
|
-
self.title({ :text=>
|
24
|
+
self.title({ :text=> nil })
|
25
25
|
self.legend({ :layout=>"vertical", :style=>{} })
|
26
26
|
self.xAxis({})
|
27
27
|
self.yAxis({ :title=> {:text=> nil}, :labels=>{} })
|
@@ -42,6 +42,16 @@ module LazyHighCharts
|
|
42
42
|
})()
|
43
43
|
</script>
|
44
44
|
EOJS
|
45
|
+
elsif defined?(Turbolinks) && request.headers["X-XHR-Referer"]
|
46
|
+
graph =<<-EOJS
|
47
|
+
<script type="text/javascript">
|
48
|
+
(function() {
|
49
|
+
$(window).bind('page:load', function() {
|
50
|
+
#{core_js}
|
51
|
+
});
|
52
|
+
})()
|
53
|
+
</script>
|
54
|
+
EOJS
|
45
55
|
else
|
46
56
|
graph =<<-EOJS
|
47
57
|
<script type="text/javascript">
|
data/spec/high_chart_spec.rb
CHANGED
@@ -27,7 +27,7 @@ describe "HighChart" do
|
|
27
27
|
|
28
28
|
it "should set options by default" do
|
29
29
|
LazyHighCharts::HighChart.new.options.should == {
|
30
|
-
:title=>{:text=>
|
30
|
+
:title=>{:text=>nil},
|
31
31
|
:legend=>{:layout=>"vertical", :style=>{}},
|
32
32
|
:xAxis=>{},
|
33
33
|
:yAxis=>{:title=>{:text=>nil}, :labels=>{}},
|
@@ -61,7 +61,7 @@ describe "HighChart" do
|
|
61
61
|
it "should change a block data without overriding options" do
|
62
62
|
chart = LazyHighCharts::HighChart.new('graph') do |f|
|
63
63
|
f.series(:name=>'John', :data=>[3, 20])
|
64
|
-
f.series(:name=>'Jane',:data=> [1, 3] )
|
64
|
+
f.series(:name=>'Jane',:data=> [1, 3] )
|
65
65
|
# without overriding
|
66
66
|
f.options[:chart][:defaultSeriesType] = "area"
|
67
67
|
f.options[:chart][:inverted] = true
|
@@ -79,7 +79,7 @@ describe "HighChart" do
|
|
79
79
|
chart = LazyHighCharts::HighChart.new('graph') do |f|
|
80
80
|
f.series(:name=>'John', :data=>[3, 20])
|
81
81
|
f.series(:name=>'Jane', :data=>[1, 3] )
|
82
|
-
f.title({ :text=>
|
82
|
+
f.title({ :text=> nil })
|
83
83
|
# without overriding
|
84
84
|
f.xAxis(:categories => ["uno" ,"dos" , "tres" , "cuatro"] , :labels=>{:rotation=>-45 , :align => 'right'})
|
85
85
|
f.chart({:defaultSeriesType=>"spline" , :renderTo => "myRenderArea" , :inverted => true})
|
@@ -96,7 +96,7 @@ describe "HighChart" do
|
|
96
96
|
chart = LazyHighCharts::HighChart.new('graph') do |f|
|
97
97
|
f.series(:name=>'John',:data=> [3, 20])
|
98
98
|
f.series(:name=>'Jane', :data=>[1, 3] )
|
99
|
-
f.title({ :text=>
|
99
|
+
f.title({ :text=>nil})
|
100
100
|
# without overriding
|
101
101
|
f.x_axis(:categories => ["uno" ,"dos" , "tres" , "cuatro"] , :labels=>{:rotation=>-45 , :align => 'right'})
|
102
102
|
f.chart({:defaultSeriesType=>"spline" , :renderTo => "myRenderArea" , :inverted => true})
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazy_high_charts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.2
|
5
|
-
prerelease:
|
4
|
+
version: 1.3.3.beta.2
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Miguel Michelson Martinez
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-12-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|