svg-graph 2.1.0.beta1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +5 -3
- data/lib/SVG/Graph/Graph.rb +2 -2
- data/lib/svggraph.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c04fc1439663b78a87afd588d309fbcb9f4c229
|
4
|
+
data.tar.gz: 67af809341a01054a18db1af326f45a8d4a9989c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a004615aa34f83e7379bb33e6cb0c4d833c2e9adbcac67dcffab4fddf39be1efc81139a12376488eb3f71b6cf9b45ff59645c4d53025bea678f0bd7d1f1a75c
|
7
|
+
data.tar.gz: 4f1e300008a206f8ca77b482f7482a9b912baeb9dc0d78ea018a64a662b63c1cad755c13706fbed019097d1b7a70ea1526942b0e6e759fcee262e4fd82c8b837
|
data/History.txt
CHANGED
@@ -2,12 +2,14 @@ TODO / Backlog
|
|
2
2
|
* add unit tests for all types of graphs
|
3
3
|
* refactor various hardcoded constant pixel offsets in Graph class to use named constants or variables
|
4
4
|
|
5
|
-
=== 2.1.0 / 2017-02-
|
6
|
-
* change behavior for number format, Strings axis labels will never be formatted
|
5
|
+
=== 2.1.0 / 2017-02-26 [lumean]
|
6
|
+
* [#2] change behavior for number format, Strings axis labels will never be formatted
|
7
7
|
previously, when containing numbers they were formatted with the number_format template
|
8
|
-
* added options to change x-axis and y-axis position :x_axis_position and :y_axis_position
|
8
|
+
* [#3] added options to change x-axis and y-axis position :x_axis_position and :y_axis_position
|
9
9
|
* x_guidelines and y_guidelines can now be drawn independently of show_x_labels and show_y_labels,
|
10
10
|
before they were only drawn if show_x_labels resp show_y_labels was true
|
11
|
+
* fix number_format not being applied to x-axis labels
|
12
|
+
* fix popups being somtimes outside visible region of graph
|
11
13
|
|
12
14
|
=== 2.0.2 / 2016-10-24 [lumean]
|
13
15
|
* fix axis-title positioning
|
data/lib/SVG/Graph/Graph.rb
CHANGED
@@ -490,7 +490,7 @@ module SVG
|
|
490
490
|
label = @number_format % label
|
491
491
|
end
|
492
492
|
txt_width = label.length * font_size * 0.6 + 10
|
493
|
-
tx = (x+txt_width >
|
493
|
+
tx = (x+txt_width > @graph_width ? x-5 : x+5)
|
494
494
|
t = @foreground.add_element( "text", {
|
495
495
|
"x" => tx.to_s,
|
496
496
|
"y" => (y - font_size).to_s,
|
@@ -498,7 +498,7 @@ module SVG
|
|
498
498
|
"visibility" => "hidden",
|
499
499
|
})
|
500
500
|
t.attributes["style"] = "stroke-width: 2; fill: #000; #{style}"+
|
501
|
-
(x+txt_width >
|
501
|
+
(x+txt_width > @graph_width ? "text-anchor: end;" : "text-anchor: start;")
|
502
502
|
t.text = label.to_s
|
503
503
|
t.attributes["id"] = t.object_id.to_s
|
504
504
|
|
data/lib/svggraph.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svg-graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Russell
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2017-02-
|
15
|
+
date: 2017-02-26 00:00:00.000000000 Z
|
16
16
|
dependencies: []
|
17
17
|
description: "Gem version of SVG:::Graph. SVG:::Graph is a pure Ruby library for generating
|
18
18
|
charts, \nwhich are a type of graph where the values of one axis are not scalar.
|
@@ -67,12 +67,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
67
67
|
version: '0'
|
68
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- - "
|
70
|
+
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version:
|
72
|
+
version: '0'
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
|
-
rubygems_version: 2.
|
75
|
+
rubygems_version: 2.4.8
|
76
76
|
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: SVG:::Graph is a pure Ruby library for generating charts, which are a type
|