Sha256: 0aeb82518422ddb2106a1d7adea3cf0e64e35a6c03cad6c4731964a2d5fc080e

Contents?: true

Size: 1.02 KB

Versions: 11

Compression:

Stored size: 1.02 KB

Contents

#!/usr/bin/ruby

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

class TestGruffStackedArea < 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_area_graph
    g = Gruff::StackedArea.new
    g.title = 'Visual Stacked Area 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_area_keynote.png'
  end


  def test_area_graph_small
    g = Gruff::StackedArea.new(400)
    g.title = 'Visual Stacked Area 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_area_keynote_small.png'
  end
  
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/gruff-0.7.0/test/test_stacked_area.rb
gruff-0.7.0-java test/test_stacked_area.rb
gruff-0.7.0 test/test_stacked_area.rb
gruff-0.6.0-java test/test_stacked_area.rb
gruff-0.6.0 test/test_stacked_area.rb
gruff-0.5.1-java test/test_stacked_area.rb
gruff-0.5.1 test/test_stacked_area.rb
gruff-0.5.0-java test/test_stacked_area.rb
gruff-0.5.0 test/test_stacked_area.rb
gruff-0.4.0 test/test_stacked_area.rb
gruff-0.4.0-java test/test_stacked_area.rb