This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'spec' | |
rescue LoadError | |
require 'rubygems' | |
gem 'rspec' | |
require 'spec' | |
end | |
Spec::Runner.configure do |config| | |
config.mock_with :flexmock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GraphsController < ApplicationController | |
def top | |
@graph = open_flash_chart_object(1200, 500, '/graphs/bar_chart') | |
end | |
def bar_chart | |
top = Customer.find(:all, :select => 'sum(CMS.ORD_TOTAL) AS total, CUST.COMPANY', :group => 'CMS.CUSTNUM, CUST.COMPANY', :joins => [:orders], :limit => 10, :order => 'total DESC') | |
bar = BarOutline.new(50, '#9933CC', '#8010A0') |
NewerOlder