charted 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/charted.rb +2 -2
- metadata +1 -1
data/lib/charted.rb
CHANGED
@@ -19,7 +19,7 @@ DataMapper::Model.raise_on_save_failure = true
|
|
19
19
|
DataMapper::Property::String.length(255)
|
20
20
|
|
21
21
|
module Charted
|
22
|
-
VERSION = '0.0.
|
22
|
+
VERSION = '0.0.8'
|
23
23
|
GEOIP = GeoIP.new("#{File.dirname(__FILE__)}/../geoip.dat")
|
24
24
|
JS_FILE = "#{File.dirname(__FILE__)}/../public/charted/script.js"
|
25
25
|
|
@@ -492,7 +492,7 @@ module Charted
|
|
492
492
|
end
|
493
493
|
|
494
494
|
def add_truncated(table, rows)
|
495
|
-
rows = rows.sort_by { |r| r[0].to_i }.reverse
|
495
|
+
rows = rows.sort_by { |r| r[0].gsub(/[^\d]/, '').to_i }.reverse
|
496
496
|
if rows.length > 12
|
497
497
|
rows = rows[0..11]
|
498
498
|
rows << ['...', '...', '...']
|