Sha256: e956f82a3e53b9eb76c49efc883c591ecc176500f5252e5fa779d17838b3156d

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

$:.unshift(File.dirname(__FILE__)+"/../lib")
require 'rubyvis'

vis = pv.Panel.new().width(300).height(150);

vis.add(pv.Panel).data([1,2]).add(pv.Bar)
    .data([3,4])
    .width(20)
    .height(lambda {|d|  d * 20})
    .bottom(0)
    .left(lambda {|d,t| t*60+self.index*20}).add(pv.Label).text(lambda {|d,t| "#{t}-#{d}"})
    

vis.render()
#puts vis.children_inspect
puts vis.to_svg

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyvis-0.1.2 examples/third.rb