jmuman1

Getxmldata Js Call Not Returning Changed Position Information For Dragnode

Recommended Posts

I have a DragNode chart that I am trying to periodically update the content of. Prior to refreshing the content I am calling getXMLData so that I may retain the positions of all the nodes (these node have potentially been moved by the user). The problem is that no matter what param is passed to the function (true, false, nothing) I am getting the original positions. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

Could you please send us a screenshot or any live link of your requirement?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Angshu,

Thanks for the welcome. I don't have a live example or screenshot but here is what I am doing:

1. Calling new FusionCharts with the DragNode swf, the container id, 100% width, 800px height, 0, 12. Calling setJSON with data that looks like the following:

{chart: { palette: "2", xaxisminvalue: "0", xaxismaxvalue: "800", yaxisminvalue: "0", yaxismaxvalue: "600", viewmode: "0", is3D: "1", showFormBtn: "1", enableLinks: "1", animation: "1", dataset: [{ allowDrag: "1", data: [ { width: 50, height: 50, radius: 25, x: 10, y: 10, id: "node1", name: "First Node", link: "JavaScript: alert('clicked');" }, { width: 50, height: 50, radius: 25, x: 20, y: 20, id: "node2", name: "Second Node", link: "JavaScript: alert('clicked');" }, . . . ] }], connectors: [{ connector: [ { from: "node1", to: "node2" } ] }]}}

3. The chart renders correctly.4. I then right click on the graph, and enable drag.5. I move the nodes around.6. After I moved the nodes, I called getXMLData on the JavaScript chart object.

The XML that is returned has the original x and y for each node.

The thing that is confusing me is that I have seen the call work in the demos examples. I am running version 3.2.1 and see that 3.2.2 is out. Is this something that was fixed or am I doing something wrong?

Thanks again.

1319694868[/url]' post='41407']

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

Could you please send us a screenshot or any live link of your requirement?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Yes. Use the JavaScript file from the demos not the distribution. Something in there is different (file size is different too). The one in the demo directory works.

Share this post


Link to post
Share on other sites

Thnks for the answer :D

 

Unfortunetly didn't work for me,

¿ you refer to the javascript FusionCharts.js ? Mine is 68ks and its the same in both folders sad.gif

Edited by Marlon

Share this post


Link to post
Share on other sites

Yes, I am referring to the FusionCharts.js, the one that I found in the distribution that works is 104K. It was somewhere within the documentation or demos directories.

 

Hope that helps.

 

Thnks for the answer :D

 

Unfortunetly didn't work for me,

¿ you refer to the javascript FusionCharts.js ? Mine is 68ks and its the same in both folders sad.gif

Share this post


Link to post
Share on other sites

Lots of thanks for your quick reply jmuman

 

I found one fusioncharts.js of 103k in \Tools\FCDataConverter\js and I replaced for mi 68ks file, but unfurtunedly didn0t solve the issue. Now i've got a sample with the same includes that in my app and in one is working ( sample ) and in the other one it isn't im becoming crazy !

 

Thanks anyway for your interest !

 

Best regards

Yes, I am referring to the FusionCharts.js, the one that I found in the distribution that works is 104K. It was somewhere within the documentation or demos directories.

 

Hope that helps.

 

 

Share this post


Link to post
Share on other sites

I was experiencing the same issues. I was using the most current FusionCharts.js from a freshly downloaded powercharts zip file. It would save the updated x,y coordinates when I saved using the chart's submit button, but when I would use the getXMLData call with no parameters via js, I would get the original downloaded xml (non-updated) returned. I used the fusioncharts.js from the samples zip used on the fusioncharts site to explain the getxmldata call and everything started working correctly. I did not change my code, only the include. I am thinking there is more than one version of the fusioncharts.js out there and having the latest download may not reflect the best code for the particular call.

 

BTW, I read "Not Just another pie in the sky" and have been an admirer since the early days. Keep up the stellar work. There is no better bang for the buck out there.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now