Class: SVG::Graph::BarHorizontal

Class | SVG::Graph::BarHorizontal
In: | temp/Graph/BarHorizontal.rb
Parent: | BarBase

### Create presentation quality SVG horitonzal bar graphs easily

# Synopsis

      require 'SVG/Graph/BarHorizontal'

      fields = %w(Jan Feb Mar)
      data_sales_02 = [12, 45, 21]

      graph = SVG::Graph::BarHorizontal.new({
        :height => 500,
        :width => 300,
        :fields => fields,
      })

      graph.add_data({
        :data => data_sales_02,
        :title => 'Sales 2002',
      })

      print "Content-type: image/svg+xml\r\n\r\n"
      print graph.burn

# Description

This object aims to allow you to easily create high quality SVG horitonzal bar graphs. You can either use the default style sheet or supply your own. Either way there are many options which can be configured to give you control over how the graph is generated - with or without a key, data elements at each point, title, subtitle etc.

# Examples

- germane-software.com/repositories/public/SVG/test/test.rb

# See also

- SVG::Graph::Graph
- SVG::Graph::Bar
- SVG::Graph::Line
- SVG::Graph::Pie
- SVG::Graph::Plot
- SVG::Graph::TimeSeries

## Author

Sean E. Russell <serATgermaneHYPHENsoftwareDOTcom>

Copyright 2004 Sean E. Russell This software is available under the Ruby license

### Methods

draw_data get_x_labels get_y_labels set_defaults y_label_offset

### Public Instance methods

set_defaults()

In addition to the defaults set in BarBase::set_defaults, sets

rotate_y_labels
  true
show_x_guidelines
  true
show_y_guidelines
  false

### Protected Instance methods

draw_data()
get_x_labels()
get_y_labels()
y_label_offset( height )

[Validate]