Gondrong Report post Posted March 3, 2009 I just used FusionChart and XML, in my project previously I used database so what I'm asking is can I add standard XML tags (like ,etc) in the XML file that is called by chart? or is it just only ,,etc that will work? Thanks. Share this post Link to post Share on other sites
Rahul Kumar Report post Posted March 4, 2009 Hi, FusionCharts strictly follow its own XML structure which includes <chart></chart><categories></categories><dataset></dataset>... etc, however you can add yours tag too but its native tag should be there also. Please see below for sample. <chart palette='1' use3DLineShift='1' caption='Hours Accuracy' divLineColor='#000066' toolTipSepChar='' showValues='0' color='0b5ed7' formatNumberScale='0' plotSpacePercent='60' PYAxisName='Hours' SYAxisName='Percent' SYAxisMinValue='0' SYAxisMaxValue='100' > <categories> <category label='Jun 08'/> <category label='Jul 08'/> <category label='Aug 08'/> <category label='Sep 08'/> <category label='Oct 08'/> <category label='Nov 08'/> <category label='Dec 08'/> </categories> <dataset seriesName='Percent' color='0b5ed7' anchorRadius='2' anchorBgColor='69c3da' parentYaxis='S'> <set value='081.4'/> <set value='087.75'/> <set value='093.42'/> <set value='090.76'/> <set value='094.62'/> <set value='083.65'/> <set value='087.4'/> </dataset> <dataset seriesName='PayrollHours' color='c1e3eb'> <set value='114.00'/> <set value='149.75'/> <set value='232.50'/> <set value='145.00'/> <set value='134.75'/> <set value='137.00'/> <set value='152.75'/> </dataset> <dataset seriesName='ProcessHours' color='db8bd5'> <set value='92.8'/> <set value='131.4'/> <set value='217.2'/> <set value='131.6'/> <set value='127.5'/> <set value='114.6'/> <set value='133.5'/> </dataset> <trendLines> <line startValue='94' endValue='85' isTrendZone='1' alpha='50' thickness='6' parentYAxis='S' showOnTop='0' valueOnRight='0' color='#006666' displayvalue='Goal 85% to 94%'/> </trendLines> <academicyear></academicyear> </chart> Share this post Link to post Share on other sites
Gondrong Report post Posted March 4, 2009 I see. Will it work if I add my tags outside the chart tag? Share this post Link to post Share on other sites
Gondrong Report post Posted March 4, 2009 (edited) How about if I have this case: Previously I use database to connect data to another chart lib the data is shown like this: cd [PK] | subject_name | lecture_score | subject_score | academicyear | term ----------------------------------------------------------------------------------------- 1 | Management | 80 | 70 | 2007/2008 | 1 2 | Business | 60 | 60 | 2007/2008 | 1 3 | Algorithm | 70 | 70 | 2007/2008 | 2 4 | CRM | 85 | 70 | 2007/2008 | 2 5 | ERP | 90 | 80 | 2008/2009 | 1 6 | English | 100 | 90 | 2008/2009 | 1 7 | Religion | 90 | 75 | 2008/2009 | 1 How should the xml for fusion looks like? if I want to make graphic that is based on academic year + term parameter. Subject score and lecture score is the chart and legend. Subject name is the xAxis. Hope that is enough explanation, sorry for bad english. Thanks. Edited March 4, 2009 by Guest Share this post Link to post Share on other sites
Rahul Kumar Report post Posted March 4, 2009 (edited) Hi, Please see the XML: <chart> <categories> <category label='Management'/> <category label='Business' /> <category label='Algorithm' /> <category label='CRM' /> <category label='ERP' /> <category label='English' /> <category label='Religion' /> </categories> <dataset seriesname='Lecture Score' > <set value='80' /> <set value='60' /> <set value='70' /> <set value='85' /> <set value='90' /> <set value='100' /> <set value='90' /> </dataset> <dataset seriesname='Subject Score'> <set value='70' /> <set value='60' /> <set value='70' /> <set value='70' /> <set value='80' /> <set value='90' /> <set value='75' /> </dataset> </chart> You can use this XML with any of our Multi-Series chart. Here is the chart generated by the above XML (created using MSColumn2d.swf chart): Edited March 4, 2009 by Guest Share this post Link to post Share on other sites
Gondrong Report post Posted March 4, 2009 (edited) Thanks for the reply. I already try that code and it works fantasticly. Anyway in the case that I give each category ther have different academic year. Will this work: < academicyear value='2007/2008 Term 1' > < chart > < categories > < category label='Management'/> < category label='Business' /> < category label='Algorithm' /> < category label='CRM' /> < category label='ERP' /> < category label='English' /> < category label='Religion' /> < /categories> < dataset seriesname='Lecture Score' > < set value='80' /> < set value='60' /> < set value='70' /> < set value='85' /> < set value='90' /> < set value='100' /> < set value='90' /> < /dataset> < dataset seriesname='Subject Score'> < set value='70' /> < set value='60' /> < set value='70' /> < set value='70' /> < set value='80' /> < set value='90' /> < set value='75' /> < /dataset> < /chart> < /academicyear > If it will work, how can I access it in JS? Thanks again. Edited March 4, 2009 by Guest Share this post Link to post Share on other sites
Gondrong Report post Posted March 4, 2009 (edited) edit:nevermind, wrong post Edited March 4, 2009 by Guest Share this post Link to post Share on other sites