ziya 2.0.3 → 2.0.4
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/README.txt +17 -13
- data/cp_doc.sh +0 -0
- data/lib/ziya/charts/base.rb +0 -1
- data/lib/ziya/components/draw.rb +3 -2
- data/lib/ziya/version.rb +1 -1
- data/spec/charts/base_spec.rb +2 -2
- data/spec/components/draw_spec.rb +1 -1
- metadata +2 -2
data/README.txt
CHANGED
@@ -4,8 +4,11 @@ ziya
|
|
4
4
|
|
5
5
|
== RELEASES
|
6
6
|
|
7
|
-
2.0.0 - Added support for XML/SWF 5.02
|
8
|
-
2.0.1 - Additional support for 5.02 + Added donut chart from 5.03
|
7
|
+
2.0.0 - Added support for XML/SWF 5.02
|
8
|
+
2.0.1 - Additional support for 5.02 + Added donut chart from 5.03
|
9
|
+
2.0.2 - Changed logging required to 0.9.X - Update to xml/swf 5.0.4
|
10
|
+
2.0.3 - README file update - Thanks to Paul James !
|
11
|
+
2.0.4 - Fixed missing encoding on composite urls
|
9
12
|
|
10
13
|
== DESCRIPTION:
|
11
14
|
|
@@ -18,9 +21,9 @@ to use the charts or gauges has a navigation scheme by embedding various link in
|
|
18
21
|
thus bring to the table an ideal scheme for reporting and dashboard like applications. Your
|
19
22
|
managers will love you for it !!
|
20
23
|
|
21
|
-
Checkout the demo: http://ziya.liquidrail.com
|
24
|
+
Checkout the demo: http://ziya.liquidrail.com
|
22
25
|
Video : http://www.youtube.com/watch?v=axIMmMHdXzo ( Out of date but you'll get the basics... )
|
23
|
-
Documentation : http://ziya.
|
26
|
+
Documentation : http://ziya.liquidrail.com/docs
|
24
27
|
Forum : http://groups.google.com/group/ziya-plugin
|
25
28
|
|
26
29
|
|
@@ -106,7 +109,7 @@ managers will love you for it !!
|
|
106
109
|
|
107
110
|
<%= ziya_chart load_chart_url, :size => "300x200" -%>
|
108
111
|
|
109
|
-
config/
|
112
|
+
config/routes.rb
|
110
113
|
|
111
114
|
# Creates a named route for the chart.
|
112
115
|
map.load_chart '/blee/load_chart', :controller => 'blee', :action => 'load_chart'
|
@@ -115,10 +118,10 @@ managers will love you for it !!
|
|
115
118
|
|
116
119
|
You will need to modify the ziya initializer and add the following directive
|
117
120
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
121
|
+
Ziya.initialize( :logger => RAILS_DEFAULT_LOGGER,
|
122
|
+
:helpers_dir => File.join( File.dirname(__FILE__), %w[.. .. app helpers ziya] ),
|
123
|
+
:designs_dir => File.join( File.dirname(__FILE__), %w[.. .. public gauges designs] ), # => Add this !!
|
124
|
+
:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public charts themes]) )
|
122
125
|
|
123
126
|
fred_controller.rb
|
124
127
|
|
@@ -135,7 +138,7 @@ managers will love you for it !!
|
|
135
138
|
|
136
139
|
<%= ziya_gauge load_gauge_url, :size => "300x200" -%>
|
137
140
|
|
138
|
-
config/
|
141
|
+
config/routes.rb
|
139
142
|
|
140
143
|
# Creates a named route for the chart.
|
141
144
|
map.load_gauge '/fred/load_gauge', :controller => 'fred', :action => 'load_gauge'
|
@@ -145,10 +148,11 @@ managers will love you for it !!
|
|
145
148
|
In the design file you will leverage the components defined in the Ziya::Gauges::Support
|
146
149
|
package to create your gauge desgins. You gauges can be animated using rotate, scale and
|
147
150
|
move operations. In this example we will create a volume control that will rotate to the
|
148
|
-
desired position. In real
|
149
|
-
set the desired position.
|
151
|
+
desired position. In real life you will fetch the volume level from your models to
|
152
|
+
set the desired position. Take a look at the ZiYa sample application for the various
|
150
153
|
possibilities. You can think of a gauge as a portable canvas element where you can draw
|
151
|
-
you own designs using the various provided ZiYa components
|
154
|
+
you own designs using the various components provided ZiYa components ( No need to worry about
|
155
|
+
various browsers' canvas support )
|
152
156
|
|
153
157
|
<%= gauge :base %>
|
154
158
|
# specifies the number of ticks to draw in a circular fashion
|
data/cp_doc.sh
CHANGED
File without changes
|
data/lib/ziya/charts/base.rb
CHANGED
@@ -158,7 +158,6 @@ module Ziya::Charts
|
|
158
158
|
@options[directive] = values
|
159
159
|
when :series
|
160
160
|
legend = args.first.is_a?(String) ? args.shift : ""
|
161
|
-
# raise ArgumentError, "Must specify a series name" if legend.empty?
|
162
161
|
if args.first.is_a?( Array )
|
163
162
|
points = args.shift || []
|
164
163
|
raise ArgumentError, "Must specify an array of data points" if points.empty?
|
data/lib/ziya/components/draw.rb
CHANGED
@@ -37,9 +37,10 @@ module Ziya::Components
|
|
37
37
|
# -------------------------------------------------------------------------
|
38
38
|
# Generates Draw component for composite charts
|
39
39
|
def gen_composites( xml, composite_urls )
|
40
|
-
chart_path =
|
40
|
+
# chart_path = chart_path
|
41
41
|
for url in composite_urls do
|
42
|
-
xml.image( :url => composite_url % [ chart_path, chart_path, url] )
|
42
|
+
# xml.image( :url => composite_url % [ chart_path, chart_path, url] )
|
43
|
+
xml.image( :url => gen_composite_path( chart_path, url ) )
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
data/lib/ziya/version.rb
CHANGED
data/spec/charts/base_spec.rb
CHANGED
@@ -88,8 +88,8 @@ describe Ziya::Charts::Base do
|
|
88
88
|
lambda { @chart.to_xml }.should raise_error( RuntimeError, /axis_category_text/i )
|
89
89
|
end
|
90
90
|
|
91
|
-
it "should
|
92
|
-
lambda { @chart.add( :series,
|
91
|
+
it "should accept a series with no name" do
|
92
|
+
lambda { @chart.add( :series, "", [10,20]) }.should_not raise_error
|
93
93
|
end
|
94
94
|
|
95
95
|
it "should error if the series is not an array" do
|
@@ -26,7 +26,7 @@ describe Ziya::Components::Draw do
|
|
26
26
|
|
27
27
|
it "should support composite charts" do
|
28
28
|
urls = [ "/fred", "/blee" ]
|
29
|
-
@comp.flatten( @xml, urls ).should == "<draw><circle radius=\"10\"/><image x=\"10\"/><image url=\"/charts/charts.swf?library_path=/charts/charts_library&xml_source
|
29
|
+
@comp.flatten( @xml, urls ).should == "<draw><circle radius=\"10\"/><image x=\"10\"/><image url=\"/charts/charts.swf?library_path=/charts/charts_library&xml_source=%2Ffred\"/><image url=\"/charts/charts.swf?library_path=/charts/charts_library&xml_source=%2Fblee\"/></draw>"
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ziya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernand Galiana
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-08-
|
12
|
+
date: 2008-08-31 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|