<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Digital Base - Blog &#187; charts</title>
	<atom:link href="http://www.digitalbase.eu/blog/tag/charts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitalbase.eu/blog</link>
	<description>A blog about webdesign, PHP, development and IT</description>
	<lastBuildDate>Mon, 10 May 2010 16:16:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>dbFusionChartPlugin : Simple Example</title>
		<link>http://www.digitalbase.eu/blog/dbfusionchartplugin-simple-example/</link>
		<comments>http://www.digitalbase.eu/blog/dbfusionchartplugin-simple-example/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 11:00:00 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[dbFusionChart]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[graphs]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://dibav3.gnelisse.desktop01/blog/?p=71</guid>
		<description><![CDATA[This first example will show you howto integrate a FusionChart graph in your symfony application, using the dbFusionChart Plugin.]]></description>
			<content:encoded><![CDATA[<p>
This first example will show you howto integrate a FusionChart (<a href="http://www.fusioncharts.com/free/" target="_blank" title="FusionCharts free">free</a>  / <a href="http://www.fusioncharts.com" target="_blank" title="FusionCharts">non-free</a> ) graph in your <a href="http://www.symfony-project.org" target="_blank" title="Symfony Project">symfony</a>  application, using the <a href="http://trac.symfony-project.com/wiki/dbFusionChartPlugin" target="_blank" title="dbFusionChartPlugin">dbFusionChartPlugin</a> . I will explain &#39;example1&#39; included in version 0.0.2 of our plugin.
</p>
<h3>The Result</h3>
<p>
Before getting to the code, here is what the final graph/chart will look like
</p>
<p>
[partial]dbFusionChartExample/example1[/partial]
</p>
<p>
&nbsp;
</p>
<h3>The Partial</h3>
<p>
The example1 is a partial that looks like this
</p>
<p>[code]dbfusionchart-example1-partial[/code]</p>
<p>
As you can see the code in this partial is pretty easy. First you tell the symfony application to load the FusionChart helper (using : use_helper). After that you load the graph/chart itself. dbfusionchart_js takes multiple arguments, the most important are the first 2.
</p>
<ul>
<li>the first argument is the type of chart (using class constants)</li>
<li>second argument is the url to the xml</li>
<li>extra arguments tell the dbFusionChart how big the chart should be (width &amp; size).</li>
</ul>
<p>
Very important in the url to the xml is that symfony knows it needs to return valid xml (an no html).
</p>
<h3>The Action</h3>
<p>
In the action.class of the dbFusionChartExample module we have the following action :
</p>
<p>
[code]dbfusionchart-example1-action[/code]
</p>
<p>
<strong><br />
Line 5 &#8211; 6</strong> tell symfony to not include the debug bar and send the response as XML (and not html)<br />
On <strong>line 8</strong> you will see the declaration of the chart. The classes are pretty smart, but the above example is a very basic example (copy pasted from FusionChart documentation).
</p>
<p>
When you are ready setting the properties of your chart (we will explain that in further posts), you tell symfony to return the xml (see <strong>line : 40</strong>).
</p>
<p>
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/dbfusionchartplugin-simple-example/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FusionCharts Symfony Plugin: dbFusionChartsPlugin</title>
		<link>http://www.digitalbase.eu/blog/fusioncharts-symfony-plugin-dbfusionchartsplugin/</link>
		<comments>http://www.digitalbase.eu/blog/fusioncharts-symfony-plugin-dbfusionchartsplugin/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 11:00:00 +0000</pubDate>
		<dc:creator>Bart Vanderstukken</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[dbFusionChart]]></category>
		<category><![CDATA[graphs]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://dibav3.gnelisse.desktop01/blog/?p=70</guid>
		<description><![CDATA[We're creating an object oriented package to easily create FusionCharts charts.]]></description>
			<content:encoded><![CDATA[<p>
We&#39;re<br />
currently writing an OO class to create <a href="http://www.fusioncharts.com/" target="_blank" title="FusionCharts v3">FusionCharts</a><br />
quickly, easily &amp; intuitive, because the existing FusionCharts.php class is not OOP and, honestly, we thought we could do better&#8230;<br />
Our package is based on and tested against the <a href="http://www.fusioncharts.com/free/" target="_blank" title="Free Flash Charts">FusionCharts Free v2</a> package. It&#39;s written<br />
symfony independent, but we provide a helper, for easy use in symfony.
</p>
<p>
The symfony plugin, <a href="http://trac.symfony-project.com/wiki/dbFusionChartPlugin" target="_blank" title="SymfonyPlugins">dbFusionChartPlugin</a>, is<br />
in its alpha state now, because it only includes basic <a href="http://www.fusioncharts.com/free/docs/?gMenuItemId=19" target="_blank" title="FusionCharts Free Documentation">single</a>  &amp; <a href="http://www.fusioncharts.com/free/docs/?gMenuItemId=19" title="FusionCharts Free Documentation">multi-series</a>  chart support. Although the basic code is ready, it needs to be extended, to work with all chart types, but a mediocre programmer should be able to understand its structure and adapt/extend it to his needs. We deeply appreciate all <a href="/contact" target="_blank" title="Contact us">help and suggestions!</a>
</p>
<h3>
Symfony<br />
helper<br />
</h3>
<p>
[code]FC helper ex[/code]
</p>
<p>
This helper creates the necessary JavaScript.
</p>
<p>
[code]FC javaScript[/code]
</p>
<h3>Documentation</h3>
<p>
You can find the dbFusionChart <a href="http://www.phpdoc.org/" target="_blank" title="phpDoc">phpDoc</a> at <a href="/dbFusionChart/doc/index.html" target="_blank" title="dbFusionChart v0.0.1">digitalbase.eu/dbFusionChart/doc/index.html</a>
</p>
<h3>Logic</h3>
<p>
As you can see in the <a href="http://www.fusioncharts.com/free/docs/?gMenuItemId=19" target="_blank" title="FusionCharts Documentation">FusionCharts Documentation</a>, you need to define your chart&#39;s data in an XML file. Our dbFusionChartXML class uses the <a href="http://www.php.net/dom" target="_blank" title="DOM Functions">php DOM extension</a> to  encapsulate that XML logic by providing methods to add categories and (datasets with) sets. It has (for now) the descendants dbFC_Single &amp; dbFC_Multi. The latter will make sure there are always as many sets in each dataset as there are categories, when adding a dataset or category.
</p>
<h3>Stay tuned</h3>
<p>
We have recently added a check in the addCategory function so it<br />
wouldn&#39;t add the same category twice, no matter how many times it&#39;s<br />
being called, e.g. when looping <a href="http://propel.phpdb.org/trac/" target="_blank" title="Propel Documentation">Propel</a>   objects to init a dbFusionChartXML. It&#39;s checks like these that need to be added, among much much more&#8230; So <a href="/blog/tag/dbfusionchart/rss" target="_blank" title="RSS Feed">stay tuned!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/fusioncharts-symfony-plugin-dbfusionchartsplugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

