• Content count

  • Joined

  • Last visited

  • Days Won


Posts posted by srividya_sharma

  1. Hi,

    I'm using Powerchart ,and I want to get the data after I draw it . However I use the Struts2 and Java as my sever language , they need the name of data of PowerCharts delivered from the client side to match the name of the attribute of the object that is defined in the Java file ,then the sever side can handle the data . So I must define the name of data of PowerCharts that I draw ,but I don't know how to define it .Please help me as soon as possible . Thanks a lot !






    To get the chart data as xml in javascript, yo uwould use the following code:

    var chartReference = FusionCharts("myChartId"); 
    var chartXML = chartReference.getXMLData();


    After getting this data, you can set it in some hidden field in the page. You can use the same field name on the server, to retrieve its value.


    Hope this is what you were looking for.


    Hope this helps.


    Srividya Sharma

  2. Hi Neeraja,


    Thank you for posting the xml and html.


    I took a look at the version of the swf and it seems to be latest. Also, I am getting a capturing window when I initiate export.


    Can you please try the Export example present in Download Package > Code > J2EE > ExportExample once?


    See if that works.


    Most likely, it is an issue with either


    1. the path to the export handler (exportHandler attribute)


    2. version of flash player - please check this


    Hope this helps :)

    Srividya Sharma

  3. Hi


    Please ensure that the chart container has a width and height specified.


    Fr example, in your code, you would have the div defined as follows:


    <div id="superTestChart" style="height:400px;width:400px;">FusionCharts will load here</div>


    If the chart itself is not loading, then it must have something to do with the data. Please post the screen-shot of the error and debug window.


    Hope this helps. :)

    Srividya Sharma

  4. Hi


    I took a look at the code in the bean again.


    I think I figured it out.


    There were a few duplicate statements in the MSFactoriesData bean. Hence, the connection might have been busy and the xml was not generated correctly.


    Please replace the attached fcsampleshelper.jar in your application and try it out. ( remove cache from tomcat if needed )


    rename .zip to .jar.


    Hope this helps!


    Srividya Sharma

  5. Hi


    The zip file you attached works like a charm here! :)


    ok, here is another idea.


    Please modify the MSDBExample.jsp present within JSP/DBExample folder as follows:


    1. remove the existing fc:render tag and put the following in its place:


    <fc:render chartId="${factoriesBean.chartId}" swfFilename="${folderPath}${factoriesBean.filename}" width="${factoriesBean.width}" height="${factoriesBean.height}" debugMode="true" registerWithJS="false" dataFormat="xml">
    <?xml version="1.0" encoding="UTF-8" standalone="no"?><chart animation="1" caption="Factory Output report" formatNumberScale="0" rotateValues="1" showValues="0" subCaption="By Quantity" xAxisName="Factory" yAxisName="Units"><categories><category label="1-02-2003" /><category label="1-03-2003" /><category label="1-04-2003" /><category label="1-05-2003" /><category label="1-06-2003" /><category label="1-07-2003" /><category label="1-08-2003" /><category label="1-09-2003" /><category label="1-10-2003" /><category label="1-11-2003" /><category label="1-12-2003" /><category label="1-13-2003" /><category label="1-14-2003" /><category label="1-15-2003" /><category label="1-16-2003" /><category label="1-17-2003" /><category label="1-18-2003" /><category label="1-19-2003" /><category label="1-20-2003" /></categories><dataset seriesName="Factory 1"><set value="23" /><set value="22" /><set value="24" /><set value="32" /><set value="21" /><set value="34" /><set value="32" /><set value="32" /><set value="23" /><set value="23" /><set value="32" /><set value="53" /><set value="23" /><set value="26" /><set value="43" /><set value="16" /><set value="45" /><set value="65" /><set value="54" /></dataset><dataset seriesName="Factory 2"><set value="121" /><set value="123" /><set value="122" /><set value="124" /><set value="132" /><set value="121" /><set value="134" /><set value="132" /><set value="132" /><set value="123" /><set value="123" /><set value="132" /><set value="153" /><set value="123" /><set value="126" /><set value="143" /><set value="116" /><set value="145" /><set value="165" /><set value="154" /></dataset><dataset seriesName="Factory 3"><set value="54" /><set value="56" /><set value="89" /><set value="56" /><set value="98" /><set value="76" /><set value="65" /><set value="45" /><set value="75" /><set value="54" /><set value="75" /><set value="76" /><set value="34" /><set value="97" /><set value="55" /><set value="43" /><set value="16" /><set value="35" /><set value="78" /><set value="75" /></dataset></chart>


    What this does is, it puts the xml generated from my database as hardcoded xml for the chart.


    If this works on your end, then the problem is either with the retrieval of data and/or generation of xml.


    Lets take it from there.


    Srividya Sharma

  6. Hi Neeraja,


    I took a look at your web.xml.


    As you had mentioned earlier, the problem seems to be here:







    Please note that the value that you provide to exportHandler attribute in the xml should be same as the value provided in the url-pattern.


    Only then, the chart will direct to the correct url for handling export.


    Please try to invoke the FCExporter servlet directly from the browser and the path that you use there will be the url-pattern or the exportHandler value.


    Hope this helps.



    Srividya Sharma