Sha256: e6ecc4de1d68d563f27ab76326e516510cd945c9fccc3152555c790bc2bd0ed0
Contents?: true
Size: 686 Bytes
Versions: 1
Compression:
Stored size: 686 Bytes
Contents
$:.unshift(File.dirname(__FILE__) + "/../../lib/") require 'erlectricity' require 'rubygems' require 'gruff' receive do |f| f.when(:plot, String, Symbol, String) do |name, style, font| graph = Gruff.const_get(style).new graph.title = name graph.font = font graph.legend_font_size = 10 f.receive do |g| g.when(:data, Symbol, Array) do |name, points| graph.data name, points g.receive_loop end g.when(:labels, Erl.hash) do |label_data| graph.labels = label_data g.receive_loop end g.when(:end){ :ok } end f.send! :result, graph.to_blob f.receive_loop end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tmm1-erlectricity-0.2.1 | examples/gruff/gruff_provider.rb |