duderonomy Report post Posted June 25, 2013 Hello, In the documentation, I see this style of sending options to the FusionChart API via the setXMLUrl() method, which sends data like the following: <chart caption='Chart Caption' palette="3" animation="1" xAxisName='June 2013' yAxisName='Homes Sold' > I believe i read somewhere in the docs that I could send all these options via Javascript, say, in the new FusionChart(arg, arg, arg...) method. Can someone please point me to the documentation that describes this API. To be clear, our app does not write chart options into our XML chart data files. We need to set those options within Javascript. Thank you! Share this post Link to post Share on other sites
Guest Sumedh Report post Posted June 26, 2013 Hi Duderonomy, FusionCharts XT is a JavaScript charting library and accepts data in JSON/XML formats. setXMLUrl() sets or changes the XML data of the chart to a specified URL. If you don't want to set the XML data with specified URL, then you can make use of setXMLData(). setXMLData() changes the data of the chart to the specified XML string. For more information, please refer the following link: http://docs.fusioncharts.com/charts/contents/?FirstChart/DataXML.html http://docs.fusioncharts.com/charts/contents/?FirstChart/FirstChart.html Also, if you want to update the chart with new chart attributes, then you can make use of setChartAttribute function. All you need to do is pass the name of the attribute and its new value to this function. Ref. Code: var chartReference = FusionCharts("myChartId"); chartReference.setChartAttribute({"subCaption" : "new sub-title"}); For more information, please refer the following link: http://docs.fusioncharts.com/charts/contents/?JavaScript/JS_ChangeData.html Also note, you can only update chart elements through this function. For updating/changing the data of the chart (<set> and <dataset> elements), you would need to pass updated JSON/XML to the chart. If you are willing to bind chart XML using a JavaScript function, then please refer the following link: http://docs.fusioncharts.com/charts/contents/FirstChart/UsingDataForm.html For FusionCharts JavaScript API reference, refer the following links: http://docs.fusioncharts.com/charts/contents/?JavaScript/API/Overview.html http://docs.fusioncharts.com/charts/contents/?JavaScript/API/Methods.html If this doesn't suffice your requirement, then please elaborate more on your requirement. Hope this helps! Share this post Link to post Share on other sites