Scruffy Graphing

Hi All,

I have a CSV file

LOGLUN05,2012-12-15 18:53,2.905444
LOGLUN05,2012-12-15 18:55,4.197472
LOGLUN05,2012-12-15 18:57,11.204842

I want to Line graph the this with Scruffy.

But the graph didn’t come alright

#!/usr/bin/ruby

require ‘rubygems’
require ‘scruffy’

graph = Scruffy::Graph.new
graph.title = “Comparative Agent Performance”
graph.value_formatter = Scruffy::Renderers::Standard.new
graph.add :line, ‘loglun5’, [2, 4, 11]
graph.point_markers = [‘Jan’,‘Feb’, ‘Mar’] # this shouldn’t be like
this, it should have timestamps

graph.render(:width => 800, :as => ‘JPG’, :to => ‘lun.png’)

I want to graph with the exact values

Is it possible to do that with timestamps ?

Regards,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs