topfunky-sparklines 0.5.1
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/CHANGELOG +74 -0
- data/MIT-LICENSE +21 -0
- data/Manifest.txt +64 -0
- data/README.txt +20 -0
- data/Rakefile +22 -0
- data/lib/sparklines.rb +785 -0
- data/lib/sparklines_helper.rb +28 -0
- data/samples/area-high.png +0 -0
- data/samples/area.png +0 -0
- data/samples/discrete.png +0 -0
- data/samples/pie-large.png +0 -0
- data/samples/pie.png +0 -0
- data/samples/pie0.png +0 -0
- data/samples/pie1.png +0 -0
- data/samples/pie100.png +0 -0
- data/samples/pie45.png +0 -0
- data/samples/pie95.png +0 -0
- data/samples/pie99.png +0 -0
- data/samples/smooth-colored.png +0 -0
- data/samples/smooth.png +0 -0
- data/test/expected/area.png +0 -0
- data/test/expected/area_high.png +0 -0
- data/test/expected/area_min_max.png +0 -0
- data/test/expected/bar.png +0 -0
- data/test/expected/bar_extreme_values.png +0 -0
- data/test/expected/bar_string.png.png +0 -0
- data/test/expected/bar_tall.png +0 -0
- data/test/expected/bar_wide.png +0 -0
- data/test/expected/bullet_basic.png +0 -0
- data/test/expected/bullet_colorful.png +0 -0
- data/test/expected/bullet_full_featured.png +0 -0
- data/test/expected/bullet_tall.png +0 -0
- data/test/expected/bullet_wide.png +0 -0
- data/test/expected/discrete.png +0 -0
- data/test/expected/discrete_wide.png +0 -0
- data/test/expected/error.png +0 -0
- data/test/expected/labeled_area.png +0 -0
- data/test/expected/labeled_bar.png +0 -0
- data/test/expected/labeled_discrete.png +0 -0
- data/test/expected/labeled_pie.png +0 -0
- data/test/expected/labeled_smooth.png +0 -0
- data/test/expected/labeled_whisker_decimals.png +0 -0
- data/test/expected/pie.png +0 -0
- data/test/expected/pie0.png +0 -0
- data/test/expected/pie1.png +0 -0
- data/test/expected/pie100.png +0 -0
- data/test/expected/pie45.png +0 -0
- data/test/expected/pie95.png +0 -0
- data/test/expected/pie99.png +0 -0
- data/test/expected/pie_flat.png +0 -0
- data/test/expected/pie_large.png +0 -0
- data/test/expected/smooth.png +0 -0
- data/test/expected/smooth_colored.png +0 -0
- data/test/expected/smooth_similar_nonzero_values.png +0 -0
- data/test/expected/smooth_underneath_color.png +0 -0
- data/test/expected/smooth_with_target.png +0 -0
- data/test/expected/standard_deviation.png +0 -0
- data/test/expected/standard_deviation_short.png +0 -0
- data/test/expected/standard_deviation_tall.png +0 -0
- data/test/expected/whisker.png +0 -0
- data/test/expected/whisker_junk.png +0 -0
- data/test/expected/whisker_non_exceptional.png +0 -0
- data/test/expected/whisker_with_step.png +0 -0
- data/test/test_all.rb +302 -0
- metadata +126 -0
data/CHANGELOG
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
== 0.5.1
|
|
2
|
+
|
|
3
|
+
* Fixed drawing and normalization of bar graph
|
|
4
|
+
* Added :target and :target_color to bar graph (draws a horizontal line at a value)
|
|
5
|
+
|
|
6
|
+
== 0.5.0
|
|
7
|
+
|
|
8
|
+
* Documentation for bullet graph.
|
|
9
|
+
* More bullet options for good_color, satisfactory_color, and bad_color.
|
|
10
|
+
* Smooth options for target line value and target_color.
|
|
11
|
+
* Sparklinks.plot_to_image returns a Magick::Image object for further manipulation.
|
|
12
|
+
* Step option for wider whisker.
|
|
13
|
+
|
|
14
|
+
== 0.4.8
|
|
15
|
+
|
|
16
|
+
* Added bullet graph. See http://en.wikipedia.org/wiki/Bullet_graph or Stephen Few's book _Information Dashboard Design_.
|
|
17
|
+
|
|
18
|
+
== 0.4.7
|
|
19
|
+
|
|
20
|
+
* Improved normalization for better display of close, high-values. [Matt Van Horn]
|
|
21
|
+
* Improved rendering of closed polyline on smooth graph with undercolor. Far left, right, and bottom of polyline are drawn offscreen so they don't show in the visible graph.
|
|
22
|
+
|
|
23
|
+
== 0.4.6
|
|
24
|
+
|
|
25
|
+
* Added :underneath_color option to smooth sparkline. [Cory Forsyth]
|
|
26
|
+
|
|
27
|
+
== 0.4.5
|
|
28
|
+
|
|
29
|
+
* Several fixes by Rob Biedenharn
|
|
30
|
+
* lib/sparklines_helper.rb: Include example code for generating "data:" URLs (but leave it commented out due to lack of widespread testing)
|
|
31
|
+
* lib/sparklines_helper.rb: allow results to be passed in the options hash (i.e., sparkline_tag(nil, :results => [ ... ], ...))
|
|
32
|
+
* lib/sparklines.rb: Move calculation of whisker endpoints out of loop
|
|
33
|
+
* lib/sparklines.rb: Fix fencepost bug in whisker that caused plot to be 1 pixel short
|
|
34
|
+
|
|
35
|
+
== 0.4.4
|
|
36
|
+
|
|
37
|
+
* Fixed stddev rounding bug [Andrew Nutter-Upham]
|
|
38
|
+
|
|
39
|
+
== 0.4.3
|
|
40
|
+
|
|
41
|
+
* Minor change for use with Hoe.
|
|
42
|
+
|
|
43
|
+
== 0.4.2
|
|
44
|
+
|
|
45
|
+
* Added standard deviation bars [Andrew Nutter-Upham]
|
|
46
|
+
|
|
47
|
+
== 0.4.1
|
|
48
|
+
|
|
49
|
+
* Converted to Hoe for rakefile
|
|
50
|
+
* Added whisker graph [Luke Francl]
|
|
51
|
+
* General cleanup and bug fixes
|
|
52
|
+
* Experimental label option
|
|
53
|
+
|
|
54
|
+
== 0.3.0
|
|
55
|
+
|
|
56
|
+
* Changed to a Class for maintainability
|
|
57
|
+
* All values are normalized (except pie)
|
|
58
|
+
* A single value can be passed for the pie percentage (instead of an Array)
|
|
59
|
+
|
|
60
|
+
== 0.2.7
|
|
61
|
+
|
|
62
|
+
* Fixed bug where last element of bar graph wouldn't go to the bottom [Esad Hajdarevic esad@esse.at]
|
|
63
|
+
|
|
64
|
+
== 0.2.5
|
|
65
|
+
|
|
66
|
+
* Tests now use Test::Unit
|
|
67
|
+
* Bar type added
|
|
68
|
+
|
|
69
|
+
== 0.2.1
|
|
70
|
+
|
|
71
|
+
* Added line_color option for smooth graphs
|
|
72
|
+
* Now available as a gem ('gem install sparklines') and as a rails generator ('gem install sparklines_generator')
|
|
73
|
+
|
|
74
|
+
|
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Copyright (c) 2005 Geoffrey Grosenbach boss@topfunky.com
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
+
|
data/Manifest.txt
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
CHANGELOG
|
|
2
|
+
MIT-LICENSE
|
|
3
|
+
Manifest.txt
|
|
4
|
+
README.txt
|
|
5
|
+
Rakefile
|
|
6
|
+
lib/sparklines.rb
|
|
7
|
+
lib/sparklines_helper.rb
|
|
8
|
+
samples/area-high.png
|
|
9
|
+
samples/area.png
|
|
10
|
+
samples/discrete.png
|
|
11
|
+
samples/pie-large.png
|
|
12
|
+
samples/pie.png
|
|
13
|
+
samples/pie0.png
|
|
14
|
+
samples/pie1.png
|
|
15
|
+
samples/pie100.png
|
|
16
|
+
samples/pie45.png
|
|
17
|
+
samples/pie95.png
|
|
18
|
+
samples/pie99.png
|
|
19
|
+
samples/smooth-colored.png
|
|
20
|
+
samples/smooth.png
|
|
21
|
+
test/expected/area.png
|
|
22
|
+
test/expected/area_high.png
|
|
23
|
+
test/expected/area_min_max.png
|
|
24
|
+
test/expected/bar.png
|
|
25
|
+
test/expected/bar_extreme_values.png
|
|
26
|
+
test/expected/bar_string.png.png
|
|
27
|
+
test/expected/bar_tall.png
|
|
28
|
+
test/expected/bar_wide.png
|
|
29
|
+
test/expected/bullet_basic.png
|
|
30
|
+
test/expected/bullet_colorful.png
|
|
31
|
+
test/expected/bullet_full_featured.png
|
|
32
|
+
test/expected/bullet_tall.png
|
|
33
|
+
test/expected/bullet_wide.png
|
|
34
|
+
test/expected/discrete.png
|
|
35
|
+
test/expected/discrete_wide.png
|
|
36
|
+
test/expected/error.png
|
|
37
|
+
test/expected/labeled_area.png
|
|
38
|
+
test/expected/labeled_bar.png
|
|
39
|
+
test/expected/labeled_discrete.png
|
|
40
|
+
test/expected/labeled_pie.png
|
|
41
|
+
test/expected/labeled_smooth.png
|
|
42
|
+
test/expected/labeled_whisker_decimals.png
|
|
43
|
+
test/expected/pie.png
|
|
44
|
+
test/expected/pie0.png
|
|
45
|
+
test/expected/pie1.png
|
|
46
|
+
test/expected/pie100.png
|
|
47
|
+
test/expected/pie45.png
|
|
48
|
+
test/expected/pie95.png
|
|
49
|
+
test/expected/pie99.png
|
|
50
|
+
test/expected/pie_flat.png
|
|
51
|
+
test/expected/pie_large.png
|
|
52
|
+
test/expected/smooth.png
|
|
53
|
+
test/expected/smooth_colored.png
|
|
54
|
+
test/expected/smooth_similar_nonzero_values.png
|
|
55
|
+
test/expected/smooth_underneath_color.png
|
|
56
|
+
test/expected/smooth_with_target.png
|
|
57
|
+
test/expected/standard_deviation.png
|
|
58
|
+
test/expected/standard_deviation_short.png
|
|
59
|
+
test/expected/standard_deviation_tall.png
|
|
60
|
+
test/expected/whisker.png
|
|
61
|
+
test/expected/whisker_junk.png
|
|
62
|
+
test/expected/whisker_non_exceptional.png
|
|
63
|
+
test/expected/whisker_with_step.png
|
|
64
|
+
test/test_all.rb
|
data/README.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
== Sparklines
|
|
2
|
+
|
|
3
|
+
A library for generating small sparkline graphs from Ruby. Use it in desktop apps or with Ruby on Rails.
|
|
4
|
+
|
|
5
|
+
== Other info
|
|
6
|
+
|
|
7
|
+
http://nubyonrails.com/pages/sparklines
|
|
8
|
+
|
|
9
|
+
== Rails plugin
|
|
10
|
+
|
|
11
|
+
http://topfunky.net/svn/plugins/sparklines
|
|
12
|
+
|
|
13
|
+
== Authors
|
|
14
|
+
|
|
15
|
+
Geoffrey Grosenbach
|
|
16
|
+
boss@topfunky.com
|
|
17
|
+
http://nubyonrails.com/pages/sparklines
|
|
18
|
+
|
|
19
|
+
Daniel Nugent
|
|
20
|
+
nugend@gmail.com
|
data/Rakefile
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
require 'rubygems'
|
|
3
|
+
require 'hoe'
|
|
4
|
+
$:.unshift(File.dirname(__FILE__) + "/lib")
|
|
5
|
+
require 'sparklines'
|
|
6
|
+
|
|
7
|
+
Hoe.new('Sparklines', Sparklines::VERSION) do |p|
|
|
8
|
+
p.name = "sparklines"
|
|
9
|
+
p.author = "Geoffrey Grosenbach"
|
|
10
|
+
p.description = "Tiny graphs."
|
|
11
|
+
p.email = 'boss@topfunky.com'
|
|
12
|
+
p.summary = "Tiny graphs."
|
|
13
|
+
p.url = "http://nubyonrails.com/pages/sparklines"
|
|
14
|
+
p.clean_globs = ['test/actual'] # Remove this directory on "rake clean"
|
|
15
|
+
p.remote_rdoc_dir = '' # Release to root
|
|
16
|
+
p.changes = p.paragraphs_of('CHANGELOG', 0..1).join("\n\n")
|
|
17
|
+
# * extra_deps - An array of rubygem dependencies.
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
desc "Release and publish documentation"
|
|
22
|
+
task :repubdoc => [:release, :publish_docs]
|