gerbilcharts 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -123,7 +123,10 @@ private
|
|
123
123
|
|
124
124
|
case ldelta
|
125
125
|
when (0..1*MINUTE); return 10
|
126
|
-
when (1*MINUTE..
|
126
|
+
when (1*MINUTE..5*MINUTE); return 1*MINUTE
|
127
|
+
when (5*MINUTE..15*MINUTE); return 3*MINUTE
|
128
|
+
when (15*MINUTE..1*HOUR); return 5*MINUTE
|
129
|
+
when (1*HOUR..2*HOUR); return 15*MINUTE
|
127
130
|
when (2*HOUR..6*HOUR); return 30*MINUTE
|
128
131
|
when (6*HOUR..12*HOUR); return 1*HOUR
|
129
132
|
when (12*HOUR..1*DAY); return 3*HOUR
|
@@ -9,7 +9,6 @@ class StackedAreaSurface < Surface
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def int_render(g)
|
12
|
-
# debugger
|
13
12
|
rx = parent.modelgroup.effective_round_range_x
|
14
13
|
ry = parent.modelgroup.cumulative_sweep_round_range_y0
|
15
14
|
|
@@ -23,7 +22,6 @@ class StackedAreaSurface < Surface
|
|
23
22
|
sweep_to = rx.rmax
|
24
23
|
polygons = []
|
25
24
|
parent.modelgroup.each_model do | mod|
|
26
|
-
# debugger
|
27
25
|
mod.begin_sweep
|
28
26
|
polygons << GerbilCharts::SVGDC::SVGPolygon.new
|
29
27
|
end
|
@@ -33,10 +31,8 @@ class StackedAreaSurface < Surface
|
|
33
31
|
|
34
32
|
# perform the sweep
|
35
33
|
while (sweep_pos<=sweep_to)
|
36
|
-
# debugger
|
37
34
|
acc_y = 0
|
38
35
|
parent.modelgroup.each_model_with_index do | mod, i|
|
39
|
-
# debugger
|
40
36
|
acc_y += mod.sweep(sweep_pos)
|
41
37
|
xpos = scale_x sweep_pos,rx
|
42
38
|
ypos = scale_y acc_y,ry
|
@@ -50,10 +46,11 @@ class StackedAreaSurface < Surface
|
|
50
46
|
|
51
47
|
sweep_pos += sweep_interval
|
52
48
|
end
|
53
|
-
# debugger
|
54
49
|
# layout all polygons in reverse
|
55
50
|
i=polygons.length-1
|
51
|
+
last_x = scale_x sweep_to,rx
|
56
52
|
polygons.reverse_each do |p|
|
53
|
+
p.addpoint(last_x,@bounds.bottom)
|
57
54
|
g.addshape(p,{:id => "item#{i}"})
|
58
55
|
i -= 1
|
59
56
|
end
|
data/lib/gerbilcharts/version.rb
CHANGED
data/test/test_lines.rb
CHANGED
@@ -12,7 +12,7 @@ class TestLines < Test::Unit::TestCase
|
|
12
12
|
@test_vector_tm3 = []
|
13
13
|
tbeg = Time.local( 1978, "jun", 5, 9, 10, 0, 0)
|
14
14
|
sbeg = tbeg
|
15
|
-
sec_inc =
|
15
|
+
sec_inc = 50
|
16
16
|
|
17
17
|
for i in (0..20)
|
18
18
|
@test_vector_tm1 << [sbeg + i*sec_inc, i*sec_inc*1000 ]
|
@@ -91,7 +91,7 @@ class TestLines < Test::Unit::TestCase
|
|
91
91
|
# test a line chart
|
92
92
|
def test_line_1
|
93
93
|
|
94
|
-
mychart = GerbilCharts::Charts::AreaChart.new( :width =>
|
94
|
+
mychart = GerbilCharts::Charts::AreaChart.new( :width => 350, :height => 200, :style => 'brushmetal.css')
|
95
95
|
mychart.setmodelgroup(@modgroup)
|
96
96
|
mychart.render('/tmp/sq_linechart1.svg')
|
97
97
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gerbilcharts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vivek Rajagopalan
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-20 00:00:00 +05:30
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|