regnillob
Members-
Content count
4 -
Joined
-
Last visited
Everything posted by regnillob
-
I declare my chart as follows, and this line succeeds and the chart can accept data and render. var gantt = new FusionCharts("../Fusion/Gadgets/Gantt.swf", "FusionGanttID", "500", "400", "0", "1"); This is my setDataXML line of JavaScript, which does not work. This XML does work when returned from an XML file to setDataURL. See below the XML for more details. gantt.setDataXML("<chart dateFormat='yyyy/mm/dd' start='2010/01/11' end='2010/01/12' canvasBgColor='E6F2F9, CCE4F3' canvasBgAngle='90' ganttLineColor='306D90' ganttLineAlpha='33' gridBorderColor='306D90' canvasBorderColor='306D90' taskbarRoundRadius='3' showShadow='0'><categories bgAlpha='100' bgColor='DBE0E3'></categories><categories bgAlpha='100' bgColor='DBE0E3'><category name='Jan' start='2010/01/11' end='2010/01/12' /></categories><categories bgAlpha='100' bgColor='DBE0E3'><category name='11' start='2010/01/11' end='2010/01/11' /><category name='12' start='2010/01/12' end='2010/01/12' /></categories><processes isBold='1' headerbgColor='007AC1' fontColor='003D60' bgColor='E6F2F9'><process Name='PX01' id='1' /><process Name='PX02' id='2' /><process Name='PX03' id='3' /></processes><tasks><task name='86386' processId='2' start='2010/01/11' end='2010/01/11' taskId='86386' color='98B6C8' borderColor='00629A' height='100%' /></tasks></chart>"); The offending member is the height="100%" of the only <task>. I have listed the task below. <task name='86386' processId='2' start='2010/01/11' end='2010/01/11' taskId='86386' color='98B6C8' borderColor='00629A' height='100%' /> 1. With the attribute in place, the chart reports "invalid XML". 2. If I remove the height attribute, the chart renders and displays the task, but I cannot control the height, which I need at 100%. 3. If I try to encode the percent sign by changing to height="100%25" the chart does render, but the task does not show. Any suggestions? Thanks!
-
For now I have found a workaround. Passing the xml string into JavaScript instead of creating it in JavaScript works. Not sure why, but as long as it works I am in business. Thanks.
-
setDataXML for Gantt does not like double quotes for attributes
regnillob posted a topic in Using FusionWidgets XT
Referring to the XML in my prior example, I hand edited the text in JavaScript to confirm that single quoted attributes with the XML enclosed in double quotes works, but if I have my attributes double-quoted with the XML string in single quotes, the chart reports invalid XML for the same XML. Why? It is much more difficult to format my XML with single-quoted attribute values, since the conversion automatically renders them with double quotes. Is there a workaround for this problem? Thanks! -
You can click on a task now and trigger a JS function, where you can modify a given task and resubmit the XML to the chart using either setDataXML or setDataURL.