gerbilcharts 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gerbilcharts/surfaces/rect.rb +7 -0
- data/lib/gerbilcharts/surfaces/surface.rb +8 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cfbb968e895a1b19ac3ee0bbb5fbea7c3efab67
|
4
|
+
data.tar.gz: c98f2a149352ece738bbf9c3cfe822b174a74da7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d03d90f2810c6065e04fb134714472fe8d4507a75a6436b90ba392c15406fd5a138c391e8647e44ae43285357be40882efb6529c2d0848f68581249aaa63c6
|
7
|
+
data.tar.gz: 792deb97e26e7b9ca61e19eba9fe4d36eb1101c80e0d3e362a7e612c325394a8618c9b36e09d889a3e2c2407f21cb1a971c2b016b5272c1510e83dc16bad7ddb
|
@@ -97,7 +97,14 @@ class Rect
|
|
97
97
|
def to_s
|
98
98
|
"#{@left},#{@top} [w=#{width} h=#{height}]"
|
99
99
|
end
|
100
|
+
|
101
|
+
def rand_h(margin=30)
|
102
|
+
rand( (@top-margin)..(@bottom-margin))
|
103
|
+
end
|
100
104
|
|
105
|
+
def rand_w(margin=30)
|
106
|
+
rand( (@left-margin)..(@right-margin))
|
107
|
+
end
|
101
108
|
end
|
102
109
|
|
103
110
|
end
|
@@ -95,11 +95,14 @@ class Surface < GraphElement
|
|
95
95
|
xpos = scale_x anno[:x],rx
|
96
96
|
ypos = scale_y anno[:y],ry
|
97
97
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
98
|
+
if ypos - 20 > @bounds.top + 10
|
99
|
+
g.line xpos,ypos, xpos, ypos-20
|
100
|
+
g.textout(xpos, ypos-20, anno[:label], {:class => "reflinelabel"})
|
101
|
+
else
|
102
|
+
rh = @bounds.rand_h
|
103
|
+
g.line xpos,ypos, xpos, rh
|
104
|
+
g.textout(xpos, rh, anno[:label], {:class => "reflinelabel"})
|
105
|
+
end
|
103
106
|
|
104
107
|
g.circle(xpos,ypos,5)
|
105
108
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gerbilcharts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vivek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shoulda
|