Displaying 1 result from an estimated 1 matches for "generate_img".
Did you mean:
generate_id
2006 Nov 10
2
How to integrate Scruff Images
...way: Export image to a file
and then bind the exported file on the view template. But I wonder if I
cannot get scruffy images directly on my rails pages without exporting
it to disk first.
My approach with a simple example from Brastens page:
I created this method in my views helper class:
def generate_img()
graph = Scruffy::Graph.new
graph.title = "Comparative Agent Performance"
graph.value_formatter =
Scruffy::Formatters::Percentage.new(:precision => 0)
graph.add :stacked do |stacked|
stacked.add :bar, ''Jack'', [30, 60, 49, 29, 100, 120]
st...