Sha256: 05fbfc74a2f42217d3763f63b2c5123d45c434ccc49b4289b003cafd8da9b847

Contents?: true

Size: 679 Bytes

Versions: 1

Compression:

Stored size: 679 Bytes

Contents

# = First example
# This is the RBP API version of "Getting Started" example of Protovis introduction.
# On this example we show you how can you build a bar chart using panel and bar marks.
# A mark represents a set of graphical elements that share data and visual encodings. Although marks are simple by themselves, you can combine them in interesting ways to make rich, interactive visualizations
$:.unshift(File.dirname(__FILE__)+"/../lib")
require 'rubyvis'
    
vis = Rubyvis::Panel.new do 
  width 150
  height 150
  bar do
    data [1, 1.2, 1.7, 1.5, 0.7, 0.3]
    width 20
    height {|d| d * 80}
    bottom(0)
    left {index * 25}
  end
end

vis.render
puts vis.to_svg

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyvis-0.2.0 examples/first_rbp_api.rb