REXML + Gruff: display label problem

Hello All,

I have a little question regarding graph configuration for Gruff
I googled this problem but didnot find anything…
I am using REXML and gruff to create a graph from XML file.
That is working fine except the fact that the x labels are quite
Do you know if there is a way in gruff to display the x-axis label
verticaly so that they do not overlap each over ?

This is the code I use:

require ‘rexml/document’
require ‘rubygems’
require ‘gruff’
include REXML

file =“users.xml”)
doc =
user_number = [];
date_label = {};
root.each_element(’//date’) do |date|
label = date.attributes[‘value’]
date_label[count]=label.split(" ")[0] if /12:00$/.match(label)
count = count+1
g =“Users number”, user_number)
g.labels = date_label

Thanks a lot,


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs