﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionCharts Free / FusionCharts Free and PHP   / simple bar chart with mysql as database / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Tue, 02 Dec 2008 05:29:52 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: simple bar chart with mysql as database</title><link>http://www.fusioncharts.com/forum/Topic5691-43-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;Since you are using FREE  version of chart (FCF_Bar2D.swf), could you please try changing &amp;lt;chart&amp;gt; to &amp;lt;graph&amp;gt; , 'label' to 'name' and &amp;lt;/chart&amp;gt; to &amp;lt;/graph&amp;gt;; since these are the valid XML elements and attributes for vFREE charts.&lt;/P&gt;&lt;P&gt;On the contrary could you please use Bar2D.swf (v3 chart)?</description><pubDate>Wed, 16 Apr 2008 09:15:25 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>simple bar chart with mysql as database</title><link>http://www.fusioncharts.com/forum/Topic5691-43-1.aspx</link><description>this is php code i am using.&lt;/P&gt;&lt;P&gt;This example works with pie chart but not with bar chart. I tried to use different chart &lt;/P&gt;&lt;P&gt;in renderchart sentense .but it did not work .I used order by clause in sql sentense then also it didnot work. give me solution.&lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;BR&gt;  $link = connectToDB();&lt;/P&gt;&lt;P&gt;      $strXML = "&amp;lt;chart palette='2' caption='Factory Output ' subcaption='(In Units)' xAxisName='Date' showValues='1' labelStep='2' &amp;gt;";&lt;/P&gt;&lt;P&gt;  $strQuery = "SELECT count(o.product_id) as Total, p.product_short_desc, p.product_desc, o.product_id FROM products as p,  order_items as o WHERE p.product_type_id='3' AND p.product_id=o.product_id GROUP BY p.product_short_desc";&lt;BR&gt; $result = mysql_query($strQuery) or die(mysql_error());&lt;BR&gt;    &lt;BR&gt; if ($result) {&lt;BR&gt;  while($ors = mysql_fetch_array($result)) {&lt;BR&gt;   &lt;BR&gt;   $strXML .= "&amp;lt;set label='" . $ors['product_short_desc'] . "' value='" . $ors['Total'] . "' /&amp;gt;";&lt;BR&gt;  &lt;BR&gt;     }&lt;BR&gt; }&lt;BR&gt; &lt;BR&gt; mysql_close($link);&lt;/P&gt;&lt;P&gt; //Finally, close &amp;lt;graph&amp;gt; element&lt;BR&gt;  $strXML .= "&amp;lt;/chart&amp;gt;";&lt;BR&gt; &lt;BR&gt; //Create the chart  with data from $strXML&lt;BR&gt; echo renderChart("FusionCharts/FCF_Bar2D.swf", "", $strXML, "FactoryDetailed", 600, 300, false, false);&lt;BR&gt; &lt;BR&gt;?&amp;gt;</description><pubDate>Wed, 16 Apr 2008 08:34:35 GMT</pubDate><dc:creator>maheshshinde9</dc:creator></item></channel></rss>