Ruport GraphReport



this is rather a followup from my other post...in the attempt to try and
graph a quick sample data i get richeous errors lol.

require 'rubygems'
require 'ruport'
require 'ruport/util'
require 'tempfile'

class GraphReport < Ruport::Report

renders_as_graph
isp1r = []
isp1 = Tempfile.new('tempisp')
isp1.puts File.readlines('maindata.csv').grep(/Blah1/)
isp1.each do |row|
isp1r << row["AVERAGE"]
isp1.close


def generate
graph = Ruport::Graph(:column_names =>
%w[24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0])
graph.add_line [isp1r], :name => "Blah1"
graph.add_line [14,54,22,54,12], :name => "bar" # Just an extra line,no
reason
return graph
end
end
end

puts GraphReport.generate{|r| r.save_as("filename.svg")}


######

theoretically this should have generated 2 lines, 0 - 24 on the bottom
of the graph, and the Blah1 grep data up the side.

instead i get some awesome errors

ruby ruporttest.rb
/var/lib/gems/1.8/gems/ruport-util-0.7.2/lib/ruport/util/report.rb:115:in
`method_missing': undefined local variable or method `generate' for
#<GraphReport:0xb7805a7c> (NameError)
from
/var/lib/gems/1.8/gems/ruport-util-0.7.2/lib/ruport/util/report.rb:86:in
`renderable_data'
from
/var/lib/gems/1.8/gems/ruport-1.0.1/lib/ruport/renderer.rb:171:in
`old_as'
from
/var/lib/gems/1.8/gems/ruport-1.0.1/lib/ruport/renderer.rb:383:in
`render'
from
/var/lib/gems/1.8/gems/ruport-1.0.1/lib/ruport/renderer.rb:428:in
`build'
from
/var/lib/gems/1.8/gems/ruport-1.0.1/lib/ruport/renderer.rb:382:in
`render'
from
/var/lib/gems/1.8/gems/ruport-1.0.1/lib/ruport/renderer.rb:169:in
`old_as'
from
/var/lib/gems/1.8/gems/ruport-util-0.7.2/lib/ruport/util/report.rb:93:in
`as'
from
/var/lib/gems/1.8/gems/ruport-util-0.7.2/lib/ruport/util/report.rb:107:in
`save_as'
from
/var/lib/gems/1.8/gems/ruport-util-0.7.2/lib/ruport/util/report.rb:107:in
`open'
from
/var/lib/gems/1.8/gems/ruport-util-0.7.2/lib/ruport/util/report.rb:107:in
`save_as'
from ruporttest.rb:26
from
/var/lib/gems/1.8/gems/ruport-util-0.7.2/lib/ruport/util/report.rb:124:in
`generate'
from ruporttest.rb:26
#####

*shrug* i cant even fathom where to begin. :(
--
Posted via http://www.ruby-forum.com/.

.



Relevant Pages

  • Re: DirectShow AVI Splitter filter in Windows Mobile 5
    ... Render will try all the decompressors in the system if need be until it ... The mentioned files work like this in the desktop filter graph showing in ... The ting to do is to call 'render' on the output pin. ... Another common format that uses AVI is DivX and variants - also not ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: What happened to the Multi-File parser?
    ... need to render and seek seamlessly in sequence, ... //set windowless, query windowless control, set clipping window etc etc ... Am I not setting up the graph correctly? ... I'm not 100% certain about the MediaTime vs. SetStartStop. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Controlling DataFlow upstream of a Smart Tee.
    ... > Source Filter instead of Device Capture Filter). ... The graph I made works ... If you take the file and render it in GraphEdit, ... clock) but an async file reader. ...
    (microsoft.public.win32.programmer.directx.video)
  • GMFBridge, Windowless VMR and Multiple Monitors
    ... I have a simple application with a capture graph that reads a file and throws ... the samples through GMFBridge to a render graph with a windowless VMR9. ... I rigged up SampleGrabbers in the capture and render graphs to count the ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: How to get the snapshot of the first video frame of MPEG-2 video?
    ... >I use the DirectShow to build a filter graph which can render the many ... run the graph, and pause it, get the Video Render Filter and call the ...
    (microsoft.public.win32.programmer.directx.video)