Sha256: 5dd3814dcb3ae580a0513731ce1420ac8691454033ece5f451cc01992c5c4a14

Contents?: true

Size: 1.01 KB

Versions: 39

Compression:

Stored size: 1.01 KB

Contents

#!/usr/bin/ruby

require File.dirname(__FILE__) + "/gruff_test_case"

class TestGruffStackedBar < GruffTestCase

  def setup
    @datasets = [
      [:Jimmy, [25, 36, 86, 39]],
      [:Charles, [80, 54, 67, 54]],
      [:Julie, [22, 29, 35, 38]],
      ]
    @sample_labels = {
        0 => '5/6', 
        1 => '5/15', 
        2 => '5/24'
      }      

  end

  def test_bar_graph
    g = Gruff::StackedBar.new
    g.title = "Visual Stacked Bar Graph Test"
    g.labels = {
      0 => '5/6', 
      1 => '5/15', 
      2 => '5/24', 
      3 => '5/30', 
    }
    @datasets.each do |data|
      g.data(data[0], data[1])
    end
    g.write "test/output/stacked_bar_keynote.png"
  end


  def test_bar_graph_small
    g = Gruff::StackedBar.new(400)
    g.title = "Visual Stacked Bar Graph Test"
    g.labels = {
      0 => '5/6', 
      1 => '5/15', 
      2 => '5/24', 
      3 => '5/30', 
    }
    @datasets.each do |data|
      g.data(data[0], data[1])
    end
    g.write "test/output/stacked_bar_keynote_small.png"
  end
  
end

Version data entries

39 entries across 39 versions & 10 rubygems

Version Path
rmagick4j-0.4.0-java test/gruff_tests/test/test_stacked_bar.rb
rmagick4j-0.3.9-java test/gruff_tests/test/test_stacked_bar.rb
schapht-gruff-0.3.5 test/test_stacked_bar.rb
topfunky-gruff-0.3.2 test/test_stacked_bar.rb
topfunky-gruff-0.3.3 test/test_stacked_bar.rb
topfunky-gruff-0.3.5 test/test_stacked_bar.rb
umang-gruff-0.3.6 test/test_stacked_bar.rb
woodhull-gruff-0.3.5 test/test_stacked_bar.rb
rmagick4j-0.3.8 test/gruff_tests/test/test_stacked_bar.rb
gruff-0.5.1-java test/test_stacked_bar.rb
gruff-0.5.1 test/test_stacked_bar.rb
gruff-0.5.0-java test/test_stacked_bar.rb
gruff-0.5.0 test/test_stacked_bar.rb
gruff-0.4.0 test/test_stacked_bar.rb
gruff-0.4.0-java test/test_stacked_bar.rb
gruff-0.3.7 test/test_stacked_bar.rb
fhs-gruff-0.3.6.2 test/test_stacked_bar.rb
pfsc_gruff-0.3.6 test/test_stacked_bar.rb
pfsc-gruff-0.3.6 test/test_stacked_bar.rb
teejayvanslyke-gruff-0.4.1 test/test_stacked_bar.rb