search for: value_formatter

Displaying 2 results from an estimated 2 matches for "value_formatter".

2006 Nov 10
2
How to integrate Scruff Images
...uffy 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] stacked.add :bar, ''Jill'', [120, 240, 0, 100, 140, 20] stacked.add :bar, ''Hill'',...
2007 Nov 05
0
Scruffy > MVC architecture?
Hi, I am a newby in rails...and i have read that scruffy is a great tool to create/display images. Now i find the code below for example... 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] stacked.add :bar, ''Jill'', [120, 240, 0, 100, 140, 20] stacked.add :bar, ''Hill'', [10, 10, 90, 20,...