svg_plot_gen 0.0.4 → 1.0.0
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.md +1 -1
- data/lib/svg_plot_gen.rb +8 -5
- data/svg_plot_gen.gemspec +1 -1
- metadata +7 -7
data/README.md
CHANGED
@@ -44,7 +44,7 @@ Specifing the `-t` option means the output will contain two `[SPLIT]` tags that
|
|
44
44
|
in your language.
|
45
45
|
|
46
46
|
The first `[SPLIT]` tag is for a line graph. If a path is substituted in using the format specified [here](https://developer.mozilla.org/docs/SVG/Attribute/d) then this will be
|
47
|
-
overlayed on the graph.
|
47
|
+
overlayed on the graph. The path is transformed to be relative to the origin of the axes and so that up is positive.
|
48
48
|
|
49
49
|
The second `[SPLIT]` tag is in the [display](https://developer.mozilla.org/docs/SVG/Attribute/display) attribute of a 'No Data Found' marker, and can be substituted for `inline`
|
50
50
|
to display this marker.
|
data/lib/svg_plot_gen.rb
CHANGED
@@ -233,11 +233,14 @@ class Svg_Plot_Gen
|
|
233
233
|
xml.path(:d => ['m', xstart, ' ', ystart, 'v', ylen, 'h', xlen, 'v', -ylen , 'h', -xlen, 'z'].join)
|
234
234
|
end
|
235
235
|
# Plots
|
236
|
-
xml.
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
236
|
+
#xml.g(:transform => ['translate(', xstart, ',', yend, ') scale(', 1000.to_f/xlen, ',', -(1000.to_f/ylen), ')'].join) do
|
237
|
+
xml.g(:transform => ['translate(', xstart, ',', yend, ') scale(1, -1)'].join) do
|
238
|
+
xml.a('xlink:title' => 'Plot #1') do
|
239
|
+
xml.g('stroke-width' => 1.4,
|
240
|
+
'stroke-linejoin' => 'bevel',
|
241
|
+
:fill => 'none') do
|
242
|
+
xml.path(:stroke => red.html, :d => plot)
|
243
|
+
end
|
241
244
|
end
|
242
245
|
end
|
243
246
|
# No data marker
|
data/svg_plot_gen.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "svg_plot_gen"
|
3
3
|
s.summary = "Creates the axes and gridlines for a graph in SVG. Perfect for creating a static background to which live data can be added."
|
4
|
-
s.version = "0.0
|
4
|
+
s.version = "1.0.0"
|
5
5
|
s.date = Time.now.strftime('%Y-%m-%d')
|
6
6
|
s.author = "Richard Meadows"
|
7
7
|
s.homepage = "https://github.com/richardeoin/svg-plot-gen"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svg_plot_gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-03-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: trollop
|
16
|
-
requirement: &
|
16
|
+
requirement: &18785000 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *18785000
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: nokogiri
|
27
|
-
requirement: &
|
27
|
+
requirement: &18908040 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.5'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *18908040
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: color
|
38
|
-
requirement: &
|
38
|
+
requirement: &18907380 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '1.4'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *18907380
|
47
47
|
description:
|
48
48
|
email:
|
49
49
|
executables:
|