a_la_chart 0.0.7 → 0.0.8

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/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.0.8 2009-12-24
2
+
3
+ * 1 major enhancement:
4
+ * added stacked chart impl for fusion charts
5
+
1
6
  === 0.0.3 2009-12-18
2
7
 
3
8
  * 1 major enhancement:
data/Manifest.txt CHANGED
@@ -9,6 +9,7 @@ configs/fusion/3.0/column.xml.builder
9
9
  configs/fusion/3.0/inline.html.erb
10
10
  configs/fusion/3.0/line.xml.builder
11
11
  configs/fusion/3.0/pie.xml.builder
12
+ configs/fusion/3.0/stacked_column.xml.builder
12
13
  configs/fusion/config.yml
13
14
  configs/google/1.0/pie.html.erb
14
15
  configs/google/config.yml
@@ -0,0 +1,20 @@
1
+ xml.instruct!
2
+ xml.chart(chart_options.merge(:caption => params[:title])) do
3
+ the_case = params[:case]
4
+ xml.categories do
5
+ data(the_case).map{|record| value(record, :label, the_case) }.uniq.compact.each do |label|
6
+ xml.category :label => label
7
+ end
8
+ end
9
+ data_by_category = {}
10
+ data(the_case).each do |record|
11
+ (data_by_category[value(record, :category, the_case)] ||= []) << record
12
+ end
13
+ data_by_category.each do |category, records|
14
+ xml.dataset(:seriesName => category, :color => value(records.first, :color, the_case) || next_color) do
15
+ records.each do |record|
16
+ xml.set :value => value(record, :value, the_case)
17
+ end
18
+ end
19
+ end
20
+ end
data/lib/a_la_chart.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module ALaChart
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
4
4
 
5
5
  require File.join(File.dirname(__FILE__), 'a_la_chart', 'a_la_chart')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: a_la_chart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Redmond
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-23 00:00:00 -05:00
12
+ date: 2009-12-24 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -44,6 +44,7 @@ files:
44
44
  - configs/fusion/3.0/inline.html.erb
45
45
  - configs/fusion/3.0/line.xml.builder
46
46
  - configs/fusion/3.0/pie.xml.builder
47
+ - configs/fusion/3.0/stacked_column.xml.builder
47
48
  - configs/fusion/config.yml
48
49
  - configs/google/1.0/pie.html.erb
49
50
  - configs/google/config.yml