Skip to content

ActiveRecord::Olap::ChartHelper

wvanbergen edited this page Sep 12, 2010 · 3 revisions

This module contains functions to display OLAP cubes using chart images. The charts will be generated using the Google Chart API, which is accessed through the gchartrb gem. Before you can use these methods, make sure that the module is included as helper module so the methods are available in your views:


class MyOlapController < ActionController::Base
helper ActiveRecord::Olap::ChartHelper

end

active_olap_pie(cube, options = {}, html_options = {})

Creates a pie chart for a one-dimensional cube. This function will return an image tag with a Google Chart URL

Parameters

  • cube: The cube to generate the pie chart for.
  • options: Options-hash that influence the outcome of the chart. Currently, no options are supported.
  • html_options: A hash with attributes for the img-tag.
Clone this wiki locally