anychart_xml_builder 0.0.5 → 0.0.6
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/Rakefile +1 -1
- data/anychart_xml_builder.gemspec +1 -1
- data/lib/pie.rb +14 -14
- metadata +1 -1
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.version = "0.0.
|
7
|
+
gem.version = "0.0.6"
|
8
8
|
gem.name = "anychart_xml_builder"
|
9
9
|
gem.summary = %Q{AnyChart (http://anychart.com/home/) XML Builders}
|
10
10
|
gem.description = %Q{This gem provides you the methods to easily generate the XML necessary for AnyChart}
|
data/lib/pie.rb
CHANGED
@@ -131,23 +131,23 @@ module Anychart
|
|
131
131
|
|
132
132
|
} # chart_settings
|
133
133
|
|
134
|
-
|
134
|
+
xml.data {
|
135
|
+
series = (p[:data][:series].kind_of?(Array) ? p[:data][:series] : [p[:data][:series]])
|
135
136
|
|
136
|
-
|
137
|
-
|
137
|
+
series.each do |serie|
|
138
|
+
xml.series(:name => serie[:name], :type => "Pie") {
|
139
|
+
# Os varios pontos
|
140
|
+
serie[:points].each do |point|
|
141
|
+
pt = {:name => point[:name].to_s, :y => point[:value].to_s}
|
142
|
+
pt.merge!({:color => point[:color].to_s}) if point[:color]
|
143
|
+
xml.point(pt)
|
144
|
+
end
|
145
|
+
}
|
146
|
+
end # series
|
138
147
|
|
139
|
-
|
140
|
-
xml.series(:name => serie[:name], :type => "Pie") {
|
141
|
-
# Os varios pontos
|
142
|
-
serie[:points].each do |point|
|
143
|
-
pt = {:name => point[:name].to_s, :y => point[:value].to_s}
|
144
|
-
pt.merge!({:color => point[:color].to_s}) if point[:color]
|
145
|
-
xml.point(pt)
|
146
|
-
end
|
147
|
-
}
|
148
|
-
end # series
|
148
|
+
} # data
|
149
149
|
|
150
|
-
} #
|
150
|
+
} # chart
|
151
151
|
|
152
152
|
} # charts
|
153
153
|
|