aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-09-26 20:49:25 +0200
committerHarald Eilertsen <haraldei@anduin.net>2018-09-26 20:49:25 +0200
commit6f9b78eefb11b93c2445ac4cd78572dc474a3113 (patch)
tree9a2324d6deba9fd5f01ebe556a0466cf273011ea
parentae3f27fd499c728d28cadecd6276894b6746ce66 (diff)
downloadramaskrik-program-6f9b78eefb11b93c2445ac4cd78572dc474a3113.tar.gz
ramaskrik-program-6f9b78eefb11b93c2445ac4cd78572dc474a3113.tar.bz2
ramaskrik-program-6f9b78eefb11b93c2445ac4cd78572dc474a3113.zip
Add text for entry title names.
Apparently SVG 1.x does not support wrapping text, which is a bit of a pain. Have to look into that.
-rw-r--r--room-schedule.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/room-schedule.rb b/room-schedule.rb
index 9268c73..910a742 100644
--- a/room-schedule.rb
+++ b/room-schedule.rb
@@ -80,6 +80,11 @@ module SVG
"height" => subbar_height.to_s,
"class" => "fill#{field_count+1}"
})
+ t = @graph.add_element("text", {
+ "x" => (bar_start + @font_size / 2).to_s,
+ "y" => (y + 2 * @font_size).to_s,
+ })
+ t.add_text(entry.title)
end
field_count += 1
end