svg_charts 1.02 → 1.03
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +24 -0
- data/{README.rdoc → README.md} +36 -32
- data/lib/charts/line.rb +1 -1
- data/lib/charts/version.rb +3 -0
- data/lib/svg_charts.rb +1 -0
- data/spec/spec_helper.rb +6 -1
- data/svg_charts.gemspec +15 -20
- metadata +30 -15
- data/VERSION +0 -1
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d874486fa11cee97dfcf24eec8fc7fd59d863e2b
|
4
|
+
data.tar.gz: ee754f9799396f67d33f40089f3456cde0487c67
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 211ecda3839458dc69f26874a20393c6b558afb12c1caf9354ae4e7b98c470d94d0e38914aaf70be6748f00697da559ef32011bd402c1104736a3f78959d64de
|
7
|
+
data.tar.gz: 7cb0d35a57e66c08fcab6dfc5bab19291b96fce03b1ccb0493ac26807cf7fe7c5e79bd0c33cd2733706ce4313e85c919a07575697116dd6d26a7ec411ab01ec5
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
svg_charts (1.0.3)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: http://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.2.1)
|
10
|
+
rspec (2.13.0)
|
11
|
+
rspec-core (~> 2.13.0)
|
12
|
+
rspec-expectations (~> 2.13.0)
|
13
|
+
rspec-mocks (~> 2.13.0)
|
14
|
+
rspec-core (2.13.1)
|
15
|
+
rspec-expectations (2.13.0)
|
16
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
17
|
+
rspec-mocks (2.13.0)
|
18
|
+
|
19
|
+
PLATFORMS
|
20
|
+
ruby
|
21
|
+
|
22
|
+
DEPENDENCIES
|
23
|
+
rspec
|
24
|
+
svg_charts!
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,52 +1,56 @@
|
|
1
|
-
|
1
|
+
# SVGCharts
|
2
2
|
|
3
3
|
Draw charts using SVG.
|
4
4
|
|
5
|
-
|
5
|
+
## Installation
|
6
6
|
|
7
7
|
gem install svg_charts
|
8
8
|
|
9
|
-
|
9
|
+
## Usage
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
require "svg_charts"
|
11
|
+
~~~.ruby
|
12
|
+
#=> file.rb
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
:width => 300,
|
18
|
-
:y_retreat => 20,
|
19
|
-
:x_retreat => 20
|
20
|
-
})
|
14
|
+
require "rubygems"
|
15
|
+
require "svg_charts"
|
21
16
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
17
|
+
line = SVGCharts::Line.new({
|
18
|
+
:height => 300,
|
19
|
+
:width => 300,
|
20
|
+
:y_retreat => 20,
|
21
|
+
:x_retreat => 20
|
22
|
+
})
|
26
23
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
:show_scale => true,
|
32
|
-
:show_dashed => true
|
33
|
-
})
|
24
|
+
@scale = line.scale({
|
25
|
+
:y_label => "Numbers",
|
26
|
+
:x_label => "Letters"
|
27
|
+
})
|
34
28
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
29
|
+
@chart = line.draw({
|
30
|
+
:scale => ["A", "B", "C"],
|
31
|
+
:data => [10, 20, 30],
|
32
|
+
:data_color => "#000000",
|
33
|
+
:show_scale => true,
|
34
|
+
:show_dashed => true
|
35
|
+
})
|
36
|
+
~~~
|
40
37
|
|
41
|
-
|
38
|
+
# file.erb
|
42
39
|
|
43
|
-
|
40
|
+
<svg width="680" height="350">
|
41
|
+
<%= @scale %>
|
42
|
+
<%= @chart %>
|
43
|
+
</svg>
|
44
44
|
|
45
|
-
|
45
|
+
## Maintainer
|
46
|
+
|
47
|
+
* Rogério Zambon (http://rogerio.me)
|
48
|
+
|
49
|
+
## Collaborators
|
46
50
|
|
47
51
|
* André Ronix (http://www.linkedin.com/pub/andr%C3%A9-s-ronix/27/212/3b2): Generated the coordinates calc.
|
48
52
|
|
49
|
-
|
53
|
+
## License
|
50
54
|
|
51
55
|
(The MIT License)
|
52
56
|
|
data/lib/charts/line.rb
CHANGED
data/lib/svg_charts.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/svg_charts.gemspec
CHANGED
@@ -1,24 +1,19 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "charts/version"
|
4
|
+
|
2
5
|
Gem::Specification.new do |s|
|
3
|
-
s.
|
4
|
-
s.
|
5
|
-
s.
|
6
|
-
s.
|
7
|
-
s.
|
8
|
-
".
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
"spec/charts/line_spec.rb",
|
14
|
-
"VERSION",
|
15
|
-
"README.rdoc",
|
16
|
-
"svg_charts.gemspec"
|
17
|
-
]
|
18
|
-
s.homepage = "http://github.com/rogeriozambon/svg_charts"
|
19
|
-
s.name = "svg_charts"
|
6
|
+
s.name = "svg_charts"
|
7
|
+
s.version = SVGCharts::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Rogério Zambon"]
|
10
|
+
s.email = ["rogeriozambon@gmail.com"]
|
11
|
+
s.homepage = "http://github.com/rogeriozambon/svg_charts"
|
12
|
+
s.summary = "Draw charts using SVG."
|
13
|
+
s.description = s.summary
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
20
16
|
s.require_paths = ["lib"]
|
21
|
-
|
22
|
-
s.
|
23
|
-
s.version = "1.02"
|
17
|
+
|
18
|
+
s.add_development_dependency "rspec"
|
24
19
|
end
|
metadata
CHANGED
@@ -1,53 +1,68 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svg_charts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
5
|
-
prerelease:
|
4
|
+
version: '1.03'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Rogério Zambon
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
13
|
-
dependencies:
|
11
|
+
date: 2013-03-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
14
27
|
description: Draw charts using SVG.
|
15
|
-
email:
|
28
|
+
email:
|
29
|
+
- rogeriozambon@gmail.com
|
16
30
|
executables: []
|
17
31
|
extensions: []
|
18
32
|
extra_rdoc_files: []
|
19
33
|
files:
|
20
34
|
- .rspec
|
35
|
+
- Gemfile
|
36
|
+
- Gemfile.lock
|
37
|
+
- README.md
|
21
38
|
- lib/charts/elements.rb
|
22
39
|
- lib/charts/line.rb
|
40
|
+
- lib/charts/version.rb
|
23
41
|
- lib/svg_charts.rb
|
24
|
-
- spec/spec_helper.rb
|
25
42
|
- spec/charts/line_spec.rb
|
26
|
-
-
|
27
|
-
- README.rdoc
|
43
|
+
- spec/spec_helper.rb
|
28
44
|
- svg_charts.gemspec
|
29
45
|
homepage: http://github.com/rogeriozambon/svg_charts
|
30
46
|
licenses: []
|
47
|
+
metadata: {}
|
31
48
|
post_install_message:
|
32
49
|
rdoc_options: []
|
33
50
|
require_paths:
|
34
51
|
- lib
|
35
52
|
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
-
none: false
|
37
53
|
requirements:
|
38
|
-
- -
|
54
|
+
- - '>='
|
39
55
|
- !ruby/object:Gem::Version
|
40
56
|
version: '0'
|
41
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
58
|
requirements:
|
44
|
-
- -
|
59
|
+
- - '>='
|
45
60
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
61
|
+
version: '0'
|
47
62
|
requirements: []
|
48
63
|
rubyforge_project:
|
49
|
-
rubygems_version:
|
64
|
+
rubygems_version: 2.0.0
|
50
65
|
signing_key:
|
51
|
-
specification_version:
|
66
|
+
specification_version: 4
|
52
67
|
summary: Draw charts using SVG.
|
53
68
|
test_files: []
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.02
|