satishssrc Report post Posted August 25, 2010 Hello all, SELECT a.secondary as Category, SUM(case when w.date between '2010-08-14' AND '2010-08-20' then h.value else 0 end) as year2007, SUM(case when w.date between '2010-08-07' AND '2010-08-13' then h.value else 0 end) as year2008, SUM(case when w.date between '2010-07-31' AND '2010-08-06' then h.value else 0 end) as year2009, SUM(case when w.date between '2010-07-24' AND '2010-07-30' then h.value else 0 end) as year2010 FROM activity_categories a JOIN hp_activities h on a.categoryId = h.categoryId JOIN workdays w on w.workdaysId = h.workdaysId JOIN personnel p on w.personnelId = p.personnelId WHERE a.primaryCategory='Violations' GROUP BY Category ORDER By year2007 I am using the above query to generate data for a multi-stacked 3Dchart. But when I use addDatasetsFromDatabase($result1, "Category","year2008"); now the issue is that I am not able to generate all the columns for the chart. Moreover I can't repeat the function addDatasetsFromDatabase($result1, "Category","year2007") for 2007 , 2009,2010. So how do I tell it to plot all the coulms and not just one. Please help!!!:crying: Share this post Link to post Share on other sites
Sanjukta Report post Posted August 26, 2010 Hi, I am afraid, FusionCharts does not support the rendering of Multi Series Stacked chart by retrieving the data from the database (addDatasetsFromDatabase), as of now. This is not supported because there is a <dataset> element inside another which creates complication. Could you please try creating the XML manually using the data generated from the query string you have provided? Please feel free to revert in case you have any further issues on the same. Share this post Link to post Share on other sites
satishssrc Report post Posted August 26, 2010 Hey Sanjukta, Thank you for the reply. But I have actually done it using XML but just wanted to know if could be done the other way too. Thanks for reply once again. satish Share this post Link to post Share on other sites
Sanjukta Report post Posted August 26, 2010 Hi Satish, You are always welcome. I am afraid, there are no other possible ways, as of now. Please feel free to revert in case you any further queries. Share this post Link to post Share on other sites