Sorin Report post Posted January 12, 2012 Hello, This implemention: <div id="chartContainer">FusionCharts will load here!</div> <script type="text/javascript"> FusionCharts.setCurrentRenderer('javascript'); var myChart = new FusionCharts("FusionCharts/MSColumn3D.swf", "myChartId1", "719", "300", "0", "1"); myChart.setXMLData("<chart caption='Contacte per oferta'placeValuesInside='1'showBorder='1'bgAlpha='0' canvasBgAlpha='0' showCanvasBg='1' showCanvasBase='0' canvasBaseDepth='1' canvasBgDepth='1'enablesmartlabels='0'manageLabelOverflow='1'inThousandSeparator='.' inDecimalSeparator=','showShadow='0'bgColor='ffffff'outCnvBaseFontColor='666666'AlternateVGridColor='ffffff'alternateHGridColor='ffffff'divLineColor='d3e7f3'vdivLineColor='d3e7f3'baseFontColor='666666'PBarBgColor='B1D1DC'areaBgColor='ffffff'areaBorderColor='7EB7C7'showAlternateVGridColor='1'alternateVGridAlpha='25'showAlternateHGridColor='1'canvasBorderThickness='2'borderAlpha='50'areaBorderThickness='2'areaAlpha='50'anchorAlpha='100'animation='1'showNames='1'showValues='1'formatNumberScale='100'decimalPrecision='2'limitsdecimalPrecision='1'divlinedecimalPrecision='2'adjustDiv='1'baseFontSize='9'chartTopMargin='10'chartRightMargin='17'chartBottomMargin='5'chartLeftMargin='5'divLineAlpha='100'howAboutMenuItem='1'PBarLoadingText='Graficul se incarca...'XMLLoadingText='Se incarca datele...'ParsingDataText='Se citesc datele'ChartNoDataText='Date inexistente'RenderingChartText='Randare grafic'LoadDataErrorText='Eroare la incarcarea datelor'InvalidXMLText='Date XML invalide'labelDisplay='WRAP'exportEnabled='1'exportAtClient='0'exportAction='download'exportHandler='FCExporter.aspx'><categories><category label='Octombrie 2011' /><category label='Noiembrie 2011' /><category label='Decembrie 2011' /></categories><dataset seriesName='X2F7'><set value='1,63' /><set value='1,25' /><set value='0,00' /></dataset><dataset seriesName='Bucuresti Ilfov'><set value='1,60' /><set value='1,52' /><set value='1,05' /></dataset><styles><definition><style type='font' name='CaptionFont' color='66A0C4' /></definition><application><apply toObject='caption' styles='CaptionFont'/></application></styles></chart>"); myChart.render("chartContainer"); </script> show only the message "Invalid data". But the following implementation, with the same xml data: <object width="719" height="300" id="MSColumn3D" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=8,0,0,0" > <param name="movie" value="./FusionCharts/MSColumn3D.swf" /> <param name="FlashVars" value="&chartWidth=719&chartHeight=300 &DOMId=MSColumn3D®isterWithJS=1&debugMode=0 &dataXML= <chart caption='Contacte per oferta'placeValuesInside='1'showBorder='1'bgAlpha='0' canvasBgAlpha='0' showCanvasBg='1' showCanvasBase='0' canvasBaseDepth='1' canvasBgDepth='1'enablesmartlabels='0'manageLabelOverflow='1'inThousandSeparator='.' inDecimalSeparator=','showShadow='0'bgColor='ffffff'outCnvBaseFontColor='666666'AlternateVGridColor='ffffff'alternateHGridColor='ffffff'divLineColor='d3e7f3'vdivLineColor='d3e7f3'baseFontColor='666666'PBarBgColor='B1D1DC'areaBgColor='ffffff'areaBorderColor='7EB7C7'showAlternateVGridColor='1'alternateVGridAlpha='25'showAlternateHGridColor='1'canvasBorderThickness='2'borderAlpha='50'areaBorderThickness='2'areaAlpha='50'anchorAlpha='100'animation='1'showNames='1'showValues='1'formatNumberScale='100'decimalPrecision='2'limitsdecimalPrecision='1'divlinedecimalPrecision='2'adjustDiv='1'baseFontSize='9'chartTopMargin='10'chartRightMargin='17'chartBottomMargin='5'chartLeftMargin='5'divLineAlpha='100'howAboutMenuItem='1'PBarLoadingText='Graficul se incarca...'XMLLoadingText='Se incarca datele...'ParsingDataText='Se citesc datele'ChartNoDataText='Date inexistente'RenderingChartText='Randare grafic'LoadDataErrorText='Eroare la incarcarea datelor'InvalidXMLText='Date XML invalide'labelDisplay='WRAP'exportEnabled='1'exportAtClient='0'exportAction='download'exportHandler='FCExporter.aspx'><categories><category label='Octombrie 2011' /><category label='Noiembrie 2011' /><category label='Decembrie 2011' /></categories><dataset seriesName='X2F7'><set value='1,63' /><set value='1,25' /><set value='0,00' /></dataset><dataset seriesName='Bucuresti Ilfov'><set value='1,60' /><set value='1,52' /><set value='1,05' /></dataset><styles><definition><style type='font' name='CaptionFont' color='66A0C4' /></definition><application><apply toObject='caption' styles='CaptionFont'/></application></styles></chart> " > <param name="quality" value="high" /> <embed src="./FusionCharts/MSColumn3D.swf" flashVars="&chartWidth=719&chartHeight=300 &DOMId=myChartId®isterWithJS=1&debugMode=0 &dataXML= <chart caption='Contacte per oferta'placeValuesInside='1'showBorder='1'bgAlpha='0' canvasBgAlpha='0' showCanvasBg='1' showCanvasBase='0' canvasBaseDepth='1' canvasBgDepth='1'enablesmartlabels='0'manageLabelOverflow='1'inThousandSeparator='.' inDecimalSeparator=','showShadow='0'bgColor='ffffff'outCnvBaseFontColor='666666'AlternateVGridColor='ffffff'alternateHGridColor='ffffff'divLineColor='d3e7f3'vdivLineColor='d3e7f3'baseFontColor='666666'PBarBgColor='B1D1DC'areaBgColor='ffffff'areaBorderColor='7EB7C7'showAlternateVGridColor='1'alternateVGridAlpha='25'showAlternateHGridColor='1'canvasBorderThickness='2'borderAlpha='50'areaBorderThickness='2'areaAlpha='50'anchorAlpha='100'animation='1'showNames='1'showValues='1'formatNumberScale='100'decimalPrecision='2'limitsdecimalPrecision='1'divlinedecimalPrecision='2'adjustDiv='1'baseFontSize='9'chartTopMargin='10'chartRightMargin='17'chartBottomMargin='5'chartLeftMargin='5'divLineAlpha='100'howAboutMenuItem='1'PBarLoadingText='Graficul se incarca...'XMLLoadingText='Se incarca datele...'ParsingDataText='Se citesc datele'ChartNoDataText='Date inexistente'RenderingChartText='Randare grafic'LoadDataErrorText='Eroare la incarcarea datelor'InvalidXMLText='Date XML invalide'labelDisplay='WRAP'exportEnabled='1'exportAtClient='0'exportAction='download'exportHandler='FCExporter.aspx'><categories><category label='Octombrie 2011' /><category label='Noiembrie 2011' /><category label='Decembrie 2011' /></categories><dataset seriesName='X2F7'><set value='1,63' /><set value='1,25' /><set value='0,00' /></dataset><dataset seriesName='Bucuresti Ilfov'><set value='1,60' /><set value='1,52' /><set value='1,05' /></dataset><styles><definition><style type='font' name='CaptionFont' color='66A0C4' /></definition><application><apply toObject='caption' styles='CaptionFont'/></application></styles></chart>" width="719" height="300" name="MSColumn3D" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> display the chart. Please help in finding some solution. Thanks. Share this post Link to post Share on other sites
Guest Angshu Report post Posted January 13, 2012 Hi, Welcome to FusionCharts Forum! It seems that no spaces has been provided after declaring an attribute in XML code. Also, please make sure that there are no duplicate attributes or extra quotes (") mentioned in the XML of the chart. Although, the Flash chart ignores duplicate attributes, the JavaScript chart does a strict XML validation. Please find the modified code below: <html> <head> <title>My First chart using FusionCharts</title> <script type="text/javascript" src="FusionCharts/FusionCharts.js"> </script> </head> <body> <div id="chartContainer">FusionCharts will load here!</div> <script type="text/javascript"> FusionCharts.setCurrentRenderer('javascript'); var myChart = new FusionCharts("FusionCharts/MSColumn3D.swf", "myChartId1", "719", "300", "0", "1"); myChart.setXMLData("<chart caption='Contacte per oferta' placeValuesInside='1' showBorder='1' bgAlpha='0' canvasBgAlpha='0' showCanvasBg='1' showCanvasBase='0' canvasBaseDepth='1' canvasBgDepth='1' enablesmartlabels='0' manageLabelOverflow='1' inThousandSeparator='.' inDecimalSeparator=',' showShadow='0' bgColor='ffffff' outCnvBaseFontColor='666666' AlternateVGridColor=' ffffff' alternateHGridColor='ffffff' divLineColor='d3e7f3' vdivLineColor='d3e7f3' baseFontColor=' 666666' PBarBgColor='B1D1DC' areaBgColor='ffffff' areaBorderColor='7EB7C7' showAlternateVGridColor=' 1' alternateVGridAlpha='25' showAlternateHGridColor='1' canvasBorderThickness='2' borderAlpha=' 50' areaBorderThickness='2' areaAlpha='50' anchorAlpha='100' animation='1' showNames='1' showValues='1' formatNumberScale='100' decimalPrecision='2' limitsdecimalPrecision='1' divlinedecimalPrecision=' 2' adjustDiv='1' baseFontSize='9' chartTopMargin='10' chartRightMargin='17' chartBottomMargin=' 5' chartLeftMargin='5' divLineAlpha='100' howAboutMenuItem='1' PBarLoadingText='Graficul se incarca... ' XMLLoadingText='Se incarca datele...' ParsingDataText='Se citesc datele' ChartNoDataText='Date inexistente' RenderingChartText='Randare grafic' LoadDataErrorText='Eroare la incarcarea datelor' InvalidXMLText='Date XML invalide' labelDisplay='WRAP' exportEnabled='1' exportAtClient='0' exportAction='download' exportHandler='FCExporter.aspx'><categories><category label='Octombrie 2011' /><category label='Noiembrie 2011' /><category label='Decembrie 2011' /></categories><dataset seriesName='X2F7'><set value='1,63' /><set value='1,25' /><set value='0,00' /></dataset><dataset seriesName='Bucuresti Ilfov'><set value='1,60' /><set value='1,52' /><set value='1,05' /></dataset><styles><definition><style type='font' name='CaptionFont' color='66A0C4' /></definition><application><apply toObject='caption' styles='CaptionFont'/></application></styles></chart>"); myChart.render("chartContainer"); </script> </body> </html> Please find the screenshot attached for your reference. Hope this helps. Share this post Link to post Share on other sites
Sorin Report post Posted January 17, 2012 Thank you very much. Share this post Link to post Share on other sites
Motogeek Report post Posted May 5, 2013 I had a duplicate tag in my xml. Thanks for the tip, this help me to know that javascript is using strict xml. I will be more careful going forward. Share this post Link to post Share on other sites