plot_simple 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # PlotSimple
2
+ PlotSimple is an engine for javascript graphs using HTML 5 and jqPlot.
3
+
4
+ ## Installation
5
+
6
+ ### Command Line
7
+
8
+ `gem install plot_simple`
9
+
10
+ ### Bundler (Gemfile)
11
+
12
+ `"plot_simple","~>0.0.0"`
13
+
14
+ * Make sure that your application.js has jqplot...possibly may add it later.
15
+
16
+ ##Charts
17
+
18
+ PlotSimple is able to handle the following charts at this current time:
19
+
20
+ * Column
21
+
22
+ ##HELP!
23
+
24
+ Help can be obtained using [Helpsheets.co](https://www.helpsheets.com) or [StackOverflow](http://stackoverflow.com)
25
+
data/lib/engine.rb ADDED
@@ -0,0 +1,9 @@
1
+ require 'plot_simple'
2
+
3
+ module PlotSimple
4
+ class Engine < Rails::Engine
5
+ initializer "plot_simple.charts" do |app|
6
+ ActionController::Base.send :include, PlotSimple::Charts
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,35 @@
1
+ module PlotSimple
2
+ require 'engine' if defined?(Rails)
3
+ module Charts
4
+ def newBarChart
5
+ @chart = Hash[]
6
+ @chart.merge!(:categories=>[])
7
+ end
8
+
9
+ def setTitle(title)
10
+ @chart.merge!(Hash[:title,title])
11
+ end
12
+
13
+ def setBackgroundImage(image)
14
+ @chart.merge!(Hash[:background_image,image])
15
+ end
16
+
17
+ def setBorderColor(color)
18
+ @chart.merge!(Hash[:border_color,color])
19
+ end
20
+
21
+ def setChartWidth(width)
22
+ @chart.merge!(Hash[:chart_width,width])
23
+ end
24
+
25
+ def setChartHeight(height)
26
+ @chart.merge!(Hash[:chart_height,height])
27
+ end
28
+
29
+ def addCategory(tick,size,link)
30
+ category = Hash[:tick=>tick,:bar_size=>size,:link=>link]
31
+ @chart[:categories] << category
32
+ end
33
+
34
+ end
35
+ end
@@ -0,0 +1,27 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = %q{plot_simple}
3
+ s.version = "0.0.0"
4
+
5
+ s.required_ruby_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
6
+ s.authors = %q{Travis Pessetto}
7
+ s.date = %q{2012-07-20}
8
+ s.description = %q{A graphing engine for jqplot}
9
+ s.email = %q{travis.pessetto@es3inc.com}
10
+ s.extra_rdoc_files = [%q{README.md}, %q{lib/plot_simple.rb}]
11
+ s.files = [%q{README.md}, %q{lib/plot_simple.rb},%q{lib/engine.rb}, %q{plot_simple.gemspec}]
12
+ s.homepage = %q{http://www.es3inc.com}
13
+ s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{plot_simple}, %q{--main}, %q{readme.rdoc}]
14
+ s.require_paths = [%q{lib}]
15
+ s.rubyforge_project = %q{plot_simple}
16
+ s.rubygems_version = %q{1.8.6}
17
+ s.summary = %q{A gem to simplify the creation of charts from the controller}
18
+
19
+ if s.respond_to? :specification_version then
20
+ s.specification_version = 3
21
+
22
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
23
+ else
24
+ end
25
+ else
26
+ end
27
+ end
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: plot_simple
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Travis Pessetto
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-20 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: A graphing engine for jqplot
15
+ email: travis.pessetto@es3inc.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files:
19
+ - README.md
20
+ - lib/plot_simple.rb
21
+ files:
22
+ - README.md
23
+ - lib/plot_simple.rb
24
+ - lib/engine.rb
25
+ - plot_simple.gemspec
26
+ homepage: http://www.es3inc.com
27
+ licenses: []
28
+ post_install_message:
29
+ rdoc_options:
30
+ - --line-numbers
31
+ - --inline-source
32
+ - --title
33
+ - plot_simple
34
+ - --main
35
+ - readme.rdoc
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '1.2'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ requirements: []
51
+ rubyforge_project: plot_simple
52
+ rubygems_version: 1.8.24
53
+ signing_key:
54
+ specification_version: 3
55
+ summary: A gem to simplify the creation of charts from the controller
56
+ test_files: []