SofTools.net Report post Posted July 5, 2011 When using the Gantt.swf, i have encountered the following problem (see Image1.jpg for screenshot) The bar is drawn left (off the scale) <center><div id="fcexpDiv5"></div></center> <center><div id="divFusionChartContainer5"></div></center> <script type="text/javascript" src="../FusionCharts/FusionCharts.js"></script> <script type="text/javascript" src="../FusionCharts/FusionChartsExportComponent.js"></script> <script type="text/javascript"> var objFusionChart = new FusionCharts("../FusionCharts/Gantt.swf", "FusionChartId5", "95%", "375", "0", "1"); objFusionChart.setXMLData("<chart logoURL='../images/icons/hRefresh.gif' logoAlpha='50' logoPosition='TR' logolink='' showBorder='0' bgColor='FFFFFF' showAboutMenuItem='4' aboutMenuItemLabel='about SofTools' aboutMenuItemLink='N-http://www.SofTools.net' dateFormat='dd/mm/yy' showExportDataMenuItem='1' exportDataSeparator='{tab}' exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' exportDialogMessage='Once complete click save below....' ganttWidthPercent='70' gridBorderAlpha='0' showTaskNames='1' showLabels='1' ><categories><category fontcolor='ffffff' bgcolor='404040' name='2011' start='01/01/2011' end='31/12/2011' /><category fontcolor='ffffff' bgcolor='404040' name='2012' start='01/01/2012' end='30/09/2012' /></categories><categories><category fontcolor='ffffff' bgcolor='808080' name='Q1-2011' start='1/1/2011' end='31/03/11' /><category fontcolor='ffffff' bgcolor='808080' name='Q2-2011' start='1/4/2011' end='30/06/11' /><category fontcolor='ffffff' bgcolor='808080' name='Q3-2011' start='1/7/2011' end='30/09/11' /><category fontcolor='ffffff' bgcolor='808080' name='Q4-2011' start='1/10/2011' end='31/12/11' /><category fontcolor='ffffff' bgcolor='808080' name='Q1-2012' start='1/1/2012' end='31/03/12' /><category fontcolor='ffffff' bgcolor='808080' name='Q2-2012' start='1/4/2012' end='30/06/12' /><category fontcolor='ffffff' bgcolor='808080' name='Q3-2012' start='1/7/2012' end='30/09/12' /></categories><processes headerfontcolor='ffffff' headerbgcolor='404040' fontSize='12' isBold='1' align='left' headerText='Gantt Chart' headerFontSize='18' headerVAlign='middle' headerAlign='left' ><process fontcolor='000000' label='1.step 1' id='1' bgcolor='eeeeee'/><process fontcolor='000000' label='' id='2' bgcolor='ffffff'/><process fontcolor='000000' label='' id='3' bgcolor='eeeeee'/><process fontcolor='000000' label='' id='4' bgcolor='ffffff'/><process fontcolor='000000' label='' id='5' bgcolor='eeeeee'/><process fontcolor='000000' label='' id='6' bgcolor='ffffff'/><process fontcolor='000000' label='' id='7' bgcolor='eeeeee'/><process fontcolor='000000' label='' id='8' bgcolor='ffffff'/><process fontcolor='000000' label='' id='9' bgcolor='eeeeee'/><process fontcolor='000000' label='' id='10' bgcolor='ffffff'/></processes><dataTable showProcessName='0' nameAlign='left' headerFontSize='16' headerFontIsBold='1' /><tasks showLabels='0' showStartDate='0' showEndDate='0'><task tooltext='step 1Planned Start=1 Jan 2011End=1 Sep 2012' processId='1' start='01/01/11 00:00' end='01/09/12 23:59' Id='1' color='cccccc' borderColor='aaaaaa' height='30%' topPadding='15%' /><task tooltext='step 1Actual Start=1 Jan 2011End=5 Jul 2012' processId='1' start='01/01/11 00:00' end='05/07/12 23:59' Id='2' color='444444' borderColor='333333' height='40%' topPadding='60%'/><task tooltext='Planned Start=1 Jul 2011End=5 Jul 2011' processId='2' start='01/07/11 00:00' end='05/07/11 23:59' Id='3' color='cccccc' borderColor='aaaaaa' height='30%' topPadding='15%' /><task tooltext='Actual Start=1 Jul 2011End=5 Jul 2011' processId='2' start='01/07/11 00:00' end='05/07/11 23:59' Id='4' color='444444' borderColor='333333' height='40%' topPadding='60%'/></tasks><legend><item label='Planned' color='cccccc' /><item label='Actual' color='444444' /></legend><trendlines> <line start='06/07/11' displayValue='Today' color='333333' thickness='2' dashed='1' /></trendlines><styles><definition><style name='YScaleAnim' easing='strong' type='ANIMATION' param='_yscale' start='0' duration='1' /><style name='AlphaAnim' type='ANIMATION' duration='1' start='0' param='_alpha' /><style name='MyYScaleAnim' easing='strong' type='ANIMATION' duration='0.7' start='0' param='_yscale' /><style name='MyXScaleAnim' easing='strong' type='ANIMATION' duration='0.7' start='0' param='_xscale' /></definition><application><apply toObject='Canvas' styles='YScaleAnim,AlphaAnim' /><apply toObject='DIVLINES' styles='AlphaAnim' /><apply toObject='HGRID' styles='MyYScaleAnim,MyAlphaAnim' /></application></styles></chart>"); objFusionChart.render("divFusionChartContainer5"); objFusionChart = null; </script> If I make a minor change to the code to change the end date of the task from 2012 to 2011, the gantt appears correctly (see attachment image2 and the code below) Is there a bug, or am I doing something wrong? <center><div id="fcexpDiv5"></div></center> <center><div id="divFusionChartContainer5"></div></center> <script type="text/javascript" src="../FusionCharts/FusionCharts.js"></script> <script type="text/javascript" src="../FusionCharts/FusionChartsExportComponent.js"></script> <script type="text/javascript"> var objFusionChart = new FusionCharts("../FusionCharts/Gantt.swf", "FusionChartId5", "95%", "375", "0", "1"); objFusionChart.setXMLData("<chart logoURL='../images/icons/hRefresh.gif' logoAlpha='50' logoPosition='TR' logolink='' showBorder='0' bgColor='FFFFFF' showAboutMenuItem='4' aboutMenuItemLabel='about SofTools' aboutMenuItemLink='N-http://www.SofTools.net' dateFormat='dd/mm/yy' showExportDataMenuItem='1' exportDataSeparator='{tab}' exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' exportDialogMessage='Once complete click save below....' ganttWidthPercent='70' gridBorderAlpha='0' showTaskNames='1' showLabels='1' ><categories><category fontcolor='ffffff' bgcolor='404040' name='Jan 2011' start='1/1/2011 00:00:00' end='31/01/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Feb 2011' start='1/2/2011 00:00:00' end='28/02/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Mar 2011' start='1/3/2011 00:00:00' end='31/03/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Apr 2011' start='1/4/2011 00:00:00' end='30/04/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='May 2011' start='1/5/2011 00:00:00' end='31/05/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Jun 2011' start='1/6/2011 00:00:00' end='30/06/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Jul 2011' start='1/7/2011 00:00:00' end='31/07/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Aug 2011' start='1/8/2011 00:00:00' end='31/08/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Sep 2011' start='1/9/2011 00:00:00' end='30/09/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Oct 2011' start='1/10/2011 00:00:00' end='31/10/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Nov 2011' start='1/11/2011 00:00:00' end='30/11/11 23:59:59' /><category fontcolor='ffffff' bgcolor='404040' name='Dec 2011' start='1/12/2011 00:00:00' end='31/12/11 23:59:59' /></categories><processes headerfontcolor='ffffff' headerbgcolor='404040' fontSize='12' isBold='1' align='left' headerText='Gantt Chart' headerFontSize='18' headerVAlign='middle' headerAlign='left' ><process fontcolor='000000' label='1.step 1' id='1' bgcolor='eeeeee'/><process fontcolor='000000' label='2.step 2' id='2' bgcolor='ffffff'/><process fontcolor='000000' label='' id='3' bgcolor='eeeeee'/><process fontcolor='000000' label='' id='4' bgcolor='ffffff'/><process fontcolor='000000' label='' id='5' bgcolor='eeeeee'/><process fontcolor='000000' label='' id='6' bgcolor='ffffff'/><process fontcolor='000000' label='' id='7' bgcolor='eeeeee'/><process fontcolor='000000' label='' id='8' bgcolor='ffffff'/><process fontcolor='000000' label='' id='9' bgcolor='eeeeee'/><process fontcolor='000000' label='' id='10' bgcolor='ffffff'/></processes><dataTable showProcessName='0' nameAlign='left' headerFontSize='16' headerFontIsBold='1' /><tasks showLabels='0' showStartDate='0' showEndDate='0'><task tooltext='step 1Planned Start=1 Jan 2011End=31 Dec 2011' processId='1' start='01/01/11 00:00' end='31/12/11 23:59' Id='1' color='cccccc' borderColor='aaaaaa' height='30%' topPadding='15%' /><task tooltext='step 1Actual Start=1 Jan 2011End=15 Dec 2011' processId='1' start='01/01/11 00:00' end='15/12/11 23:59' Id='2' color='444444' borderColor='333333' height='40%' topPadding='60%'/><task tooltext='step 2Planned Start=1 Jul 2011End=5 Jul 2011' processId='2' start='01/07/11 00:00' end='05/07/11 23:59' Id='3' color='cccccc' borderColor='aaaaaa' height='30%' topPadding='15%' /><task tooltext='step 2Actual Start=1 Jul 2011End=5 Jul 2011' processId='2' start='01/07/11 00:00' end='05/07/11 23:59' Id='4' color='444444' borderColor='333333' height='40%' topPadding='60%'/></tasks><legend><item label='Planned' color='cccccc' /><item label='Actual' color='444444' /></legend><trendlines> <line start='06/07/11' displayValue='Today' color='333333' thickness='2' dashed='1' /></trendlines><styles><definition><style name='YScaleAnim' easing='strong' type='ANIMATION' param='_yscale' start='0' duration='1' /><style name='AlphaAnim' type='ANIMATION' duration='1' start='0' param='_alpha' /><style name='MyYScaleAnim' easing='strong' type='ANIMATION' duration='0.7' start='0' param='_yscale' /><style name='MyXScaleAnim' easing='strong' type='ANIMATION' duration='0.7' start='0' param='_xscale' /></definition><application><apply toObject='Canvas' styles='YScaleAnim,AlphaAnim' /><apply toObject='DIVLINES' styles='AlphaAnim' /><apply toObject='HGRID' styles='MyYScaleAnim,MyAlphaAnim' /></application></styles></chart>"); objFusionChart.render("divFusionChartContainer5"); objFusionChart = null; </script> Share this post Link to post Share on other sites
Sanjukta Report post Posted July 6, 2011 Hi, Could you please try replacing all the dates mentioned as "DD/MM/11" or "DD/MM/12" in your XML (as mentioned in the FusionCharts Forum) with "DD/MM/2011" or "DD/MM/2012" and see if this helps? Hope this helps. Share this post Link to post Share on other sites
SofTools.net Report post Posted July 6, 2011 Hi, Could you please try replacing all the dates mentioned as "DD/MM/11" or "DD/MM/12" in your XML (as mentioned in the FusionCharts Forum) with "DD/MM/2011" or "DD/MM/2012" and see if this helps? Hope this helps. Share this post Link to post Share on other sites
SofTools.net Report post Posted July 6, 2011 Hi Thanks for the reply - this fixes it! Share this post Link to post Share on other sites
Sanjukta Report post Posted July 7, 2011 Hi, You are welcome. Glad that your issue is resolved. Happy FusionCharting! Share this post Link to post Share on other sites