Displaying 2 results from an estimated 2 matches for "report_item".
Did you mean:
report_items
2006 Jun 05
1
Strange problem with Gruff not always displaying graph
...#39;'],
:marker_color => ''black'',
:background_colors => [''#FAFAFA'', ''#FAFAFA'']
}
report_number = []
labels = []
@report = User.find(session[:user]).reports.find(params[:id])
@records = @report.report_items.find(:all, :conditions => [
"report_context = ''Required''" ] )
for report_items in @records
report_number << report_item.amount.to_i
labels << report_item.date
end
g.data("Reports", report_number)
g.labels =...
2006 Jun 06
1
Getting result from sql and displaying it on Gruff pie chart
I have the following as my sql query:
@total = @report.report_items.find_by_sql "SELECT SUM(amount) FROM
report_items WHERE report_item_selected = ''y'' AND available = ''n'' AND
user_id = 1"
I am trying to add the value of SUM(amount) to a Gruff pie chart and it
does not seem to be working. I have the following:
g.da...