RMG_85 Report post Posted June 6, 2011 Hello, I have a chart that is being rendered with Javascript. However, when I do an AJAX postback, the chart disappears. Please can you point me to an example of using a javascript chart in C# .Net and performing an AJAX update of the chart data? Many thanks. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted June 7, 2011 There can be two ways. 1. Use native JS API to update data from a dynamic URL http://www.fusioncharts.com/docs/?CS_DB.html#dataurl 2. Use AJAX to re-redender the chart with new data (process intensive) http://www.fusioncharts.com/docs/CS_UpdatePanel.html Share this post Link to post Share on other sites
RMG_85 Report post Posted June 7, 2011 (edited) What if I have inserted my chart into the page using JavaScript like this: <script type="text/javascript"> FusionCharts._fallbackJSChartWhenNoFlash(); var strXML = "<chart showValues='0' bgAlpha='100' bgColor='FFFFFF' showBorder='0' chartLeftMargin='10' chartRightMargin='20' chartTopMargin='10' chartBottomMargin='10' outCnvbaseFont='Trebuchet MS' outCnvBaseFontSize='12' outCnvbaseFontColor='000000' baseFontColor='000000' useRoundEdges='1' canvasbgAlpha='50' legendBgAlpha='70' showPercentageValues='0' showPercentInToolTip='0' inThousandSeparator=',' formatNumberScale='0' showLabels='1' enableSmartLabels='1' decimals='1' canvasBorderAlpha='30' xAxisName='Month' yAxisName='Number of accounts' caption='Total Accounts' imageSave='1' imageSaveURL='/Common/Handlers/FusionChartImageSave_v3.ashx'><categories><category label='Apr 2011' /><category label='May 2011' /><category label='Jun 2011' /></categories><dataset seriesName='YouTube' color='ff3333' alpha='100'><set value='640' /><set value='594' /><set value='601' /></dataset><dataset seriesName='Facebook' color='3b5998' alpha='100'><set value='68' /><set value='112' /><set value='127' /></dataset><dataset seriesName='Twitter' color='5599bb' alpha='100'><set value='875' /><set value='2538' /><set value='2832' /></dataset><styles><definition><style name='captionFont' type='font' font='Arial' size='12' color='000000' bold='1' letterSpacing='1' /></definition><application><apply toObject='Caption' styles='captionFont' /><apply toObject='subCaption' styles='captionFont' /></application></styles></chart>"; var myChart = new FusionCharts("MSLine.swf","pnlChartContainer_chart", "450", "300", "0", "0"); myChart.setXMLData(strXML); myChart.render("pnlChartContainer"); </script> And the user does not have flash installed? I have tried many things, including calling the following on postback with the updated strXML myChart.setXMLData(strXML); myChart.render("pnlChartContainer"); But of all the different ways I have tried, either no graph displays or it displays but with the old XML data, even though the XML in the page has been updated. How do I do the AJAX update when the chart has been rendered in this way? Edited June 7, 2011 by RMG_85 Share this post Link to post Share on other sites
FusionCharts Support Report post Posted June 9, 2011 Hi, Could you please share with a scaled down project which we can check and debug directly? Please also specify the .NET version you are using. Share this post Link to post Share on other sites
Subrata Report post Posted May 29, 2013 Hi, Please see http://forum.fusioncharts.com/topic/10676-lines-and-bars-not-displaying-in-html5-chart/#entry54085. I furnished all details there so I am not repeting the same once again. I also have a screencast here: http://screencast.com/t/GCpgCmg7 to explain the issue. What I am doing wrong? This is a strange problem I am having. Please help me out. Regards, Subrata Share this post Link to post Share on other sites
Swarnam Report post Posted May 30, 2013 Please refer to Forum post: http://forum.fusioncharts.com/topic/10676-lines-and-bars-not-displaying-in-html5-chart/ Share this post Link to post Share on other sites