<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Fusioncharts::BasicExampleController</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Fusioncharts::BasicExampleController</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/app/controllers/fusioncharts/basic_example_controller_rb.html">
app/controllers/fusioncharts/basic_example_controller.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
<a href="../ApplicationController.html">
ApplicationController
</a>
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Contains functions to generate chart by
</p>
<ul>
<li>adopting the dataURL method of FusionCharts and using render_chart function
from the helper class.
</li>
<li>adopting the dataXML method of FusionCharts and using render_chart function
from the helper class.
</li>
<li>adopting the dataURL method of FusionCharts and using render_chart_html
function from the helper class.
</li>
<li>adopting the dataXML method of FusionCharts and using render_chart_html
function from the helper class.
</li>
</ul>
<p>
Demonstrates the ease of generating charts using FusionCharts. All the
views related to this controller will use the "common" layout. As
per Ruby On Rails conventions, we have the corresponding views with the
same name as the function name in the controller.
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000003">basic_chart</a>
<a href="#M000004">basic_data_xml</a>
<a href="#M000006">data_xml</a>
<a href="#M000007">multi_chart</a>
<a href="#M000005">simple_chart</a>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000003" class="method-detail">
<a name="M000003"></a>
<div class="method-heading">
<a href="BasicExampleController.src/M000003.html" target="Code" class="method-signature"
onclick="popupCode('BasicExampleController.src/M000003.html');return false;">
<span class="method-name">basic_chart</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
In this action, a pre-defined Data.xml (contained in /Data/ folder) is used
to provide the xml in the dataURL method. render_chart_html function from
the helper is invoked to render the chart. The function itself has no code,
all the work is done in the builder and the view.
</p>
</div>
</div>
<div id="method-M000004" class="method-detail">
<a name="M000004"></a>
<div class="method-heading">
<a href="BasicExampleController.src/M000004.html" target="Code" class="method-signature"
onclick="popupCode('BasicExampleController.src/M000004.html');return false;">
<span class="method-name">basic_data_xml</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
This action demonstrates the ease of generating charts using FusionCharts.
Here, we‘ve used a Builder Template to build the XML data. Ideally,
you would generate XML data documents at run-time, after interfacing with
forms or databases etc. Such examples are also present. Here, we‘ve
kept this example very simple. render_chart_html function from the helper
is invoked to render the chart. The function itself has no code, all the
work is done in the builder and the view.
</p>
</div>
</div>
<div id="method-M000006" class="method-detail">
<a name="M000006"></a>
<div class="method-heading">
<a href="BasicExampleController.src/M000006.html" target="Code" class="method-signature"
onclick="popupCode('BasicExampleController.src/M000006.html');return false;">
<span class="method-name">data_xml</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
A Builder Template is used to build the XML data which is hard-coded.
Ideally, you would generate XML data documents in the builder at run-time,
after interfacing with forms or databases etc. Such examples are also
present. We set the content-type header to text/html. render_chart function
from the helper is invoked to render the chart. The function itself has no
code, all the work is done in the builder and the view.
</p>
</div>
</div>
<div id="method-M000007" class="method-detail">
<a name="M000007"></a>
<div class="method-heading">
<a href="BasicExampleController.src/M000007.html" target="Code" class="method-signature"
onclick="popupCode('BasicExampleController.src/M000007.html');return false;">
<span class="method-name">multi_chart</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
A Builder Template is used to build the XML data which is hard-coded.
Ideally, you would generate XML data documents in the builder at run-time,
after interfacing with forms or databases etc. Such examples are also
present. We set the content-type header to text/html. render_chart function
from the helper is invoked to render the chart. The function itself has no
code, all the work is done in the builder and the view.
</p>
</div>
</div>
<div id="method-M000005" class="method-detail">
<a name="M000005"></a>
<div class="method-heading">
<a href="BasicExampleController.src/M000005.html" target="Code" class="method-signature"
onclick="popupCode('BasicExampleController.src/M000005.html');return false;">
<span class="method-name">simple_chart</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Here, we‘ve used a pre-defined Data.xml (contained in /Data/ folder)
Ideally, you would NOT use a physical data file. Instead you‘ll have
your own code virtually relay the XML data document. Such examples are also
present. For a head-start, we‘ve kept this example very simple. This
function uses the dataURL method of FusionCharts. A view with the same name
simple_chart.html.erb is present and it is this view, which gets shown
along with the layout "common". render_chart function from the
helper is invoked to render the chart. The function itself has no code, all
the work is done in the builder and the view.
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>