Bugs: Browse | Submit New | Admin

[#16450] Too many data sets cause the legend line to be clipped

Date:
2007-12-19 23:27
Priority:
3
Submitted By:
bruno melli (mjskier)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Too many data sets cause the legend line to be clipped

Detailed description
If there are "too many" data sets the generated graph has a clipped legend line. That makes it impossible
to know what some of the data sets represent (since you don't get the small color box)
Using the demo as an example, the legend is clipped at Peaches and Apples3

#!/usr/bin/env ruby

require 'rubygems'
require 'gruff'

g = Gruff::Line.new
g.title = "My Graph" 

g.data("Apples", [1, 2, 3, 4, 4, 3])
g.data("Oranges", [4, 8, 7, 9, 8, 9])
g.data("Watermelon", [2, 3, 1, 5, 6, 8])
g.data("Peaches", [9, 9, 10, 8, 7, 9])
g.data("Apples2", [1, 2, 3, 4, 4, 3])
g.data("Oranges2", [4, 8, 7, 9, 8, 9])
g.data("Watermelon2", [2, 3, 1, 5, 6, 8])
g.data("Peaches2", [9, 9, 10, 8, 7, 9])
g.data("Apples3", [1, 2, 3, 4, 4, 3])
g.data("Oranges3", [4, 8, 7, 9, 8, 9])
g.data("Watermelon3", [2, 3, 1, 5, 6, 8])
g.data("Peaches3", [9, 9, 10, 8, 7, 9])

g.labels = {0 => '2003', 2 => '2004', 4 => '2005'}

g.write('my_fruity_graph.png')

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item