Sha256: 8e8048b74a19eede15d4ea2d918e838100ad17b309bf5e11f9f1eb80f8cf1617
Contents?: true
Size: 503 Bytes
Versions: 1
Compression:
Stored size: 503 Bytes
Contents
#!/usr/bin/env ruby require File.expand_path('../../lib/collimator', __FILE__) include Collimator colors = %w(red blue green cyan yellow magenta no_color_exists) data = 12.times.map do |i| { :name => "data #{i}", :value => Random.rand(64), :color => colors[Random.rand(7)] } end puts 'Data with values displayed' BarGraph.data = data BarGraph.options = {:show_values => true} BarGraph.plot puts '' puts 'Same Data without values displayed' BarGraph.options = {:show_values => false} BarGraph.plot
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
collimator-0.0.3 | examples/bar_graph.rb |