FusionCharts Forum: Drag Node chart - Connector properties - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Drag Node chart - Connector properties XML returned by chart.getXMLData is not returning arrowAtStart and arrowAtEnd values

#1 User is offline   ssanand 

  • Forum Newbie
  • Group: Members
  • Posts: 6
  • Joined: 14-February 08

Posted 24 October 2008 - 05:09 AM

Hi,

I'm using drag node chart and i'm creating nodes and connectors dynamically (by click on "Add Node" and "Add connectors" popup menu options).

I'm providing functionality to save the save, for that i'm getting the chart data using chart.getXMLData method.

While creating the chart again using this returned XML (using chat.setDataXML method), arrows are displayed at the both the ends (while creating i'm selected arrowAtEnd). It seems the returned XML, for connectors element, arrowAtStart and arrowAtEnd attributes are not included and hence it is displaying chart's default connector values for these two.

See below images, before and after

 

and here is my javascript used to redraw the chart

function test()

{

var chart = getChartFromId('seqChart');

if (chart != null)

{

var xml = chart.getXMLData();

chart.setDataXML(xml);

//chart.render("chartDiv");

}

}


0

Other Replies To This Topic

#2 User is offline   Pallav 

  • FusionCharts Team
  • Group: Administrators
  • Posts: 2386
  • Joined: 08-December 06

Posted 31 October 2008 - 04:49 AM

Hi,



In the getXML(), we primarily return the new data for the chart (new nodes/modified nodes). We do not add any cosmetic attributes as such.
Thanks,
Pallav Nadhani
Co-founder & CEO, FusionCharts Team
0

Other Replies To This Topic

#3 User is offline   shilpashivapuram 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 14-May 09

Posted 14 May 2009 - 08:01 AM

Hello,

I was trying to access the same method chart.getXMLData(), but was getting the error stating that the object doesnt support this method. Following is the code

<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FusionCharts v3 Documentation</title>
<link rel="stylesheet" href="../Contents/Style.css" type="text/css" />
<script language="JavaScript" src="../JSClass/FusionCharts.js"></script>

</head>

<body>
<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">
  <tr>
  <td valign="top" class="text" align="center"> <div id="chartdiv" align="center">
  FusionCharts. </div>
  <script type="text/javascript">
var chart = new FusionCharts("../Charts/DragNode.swf", "ChartId", "600", "550", "0", "0");
chart.setDataURL("Data/DragNode3.xml");
chart.render("chartdiv");
</script> </td>
  </tr>
  <tr>
  <td valign="top" class="text" align="center">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" class="text" align="center"><a href="Data/DragNode3.xml" target="_blank"><img src="../Contents/Images/BtnViewXML.gif" alt="View XML for the above chart" width="75" height="25" border="0" /></a></td>
  <td valign="top" class="text" align="center"><input type="button" value="click here" onclick="getXML()"/></td>
  </tr>
</table>
</body>

<script type="text/javascript">

function getXML(){
 //Get a reference to our chart
 var ourChart = getChartFromId("ChartId");
 //Get the data from chart
 var xmlRtn = ourChart.getSWFHTML();
 //Show it to user in alert box.
 alert(xmlRtn);
}

</script>

</html>

Please let me know incase I am missing out on something

0

Other Replies To This Topic

#4 User is offline   Rahul Kumar 

  • Supreme Being
  • Group: Moderators
  • Posts: 1034
  • Joined: 18-March 08

Posted 15 May 2009 - 02:56 AM

Hi,
 
Could you please just change the following line of your code and try again?
 
var chart = new FusionCharts("../Charts/DragNode.swf", "ChartId", "600", "550", "0", "1");

Regards,
Rahul Kumar
Software Engineer

A byte of magic.

 
0

Other Replies To This Topic

#5 User is offline   shilpashivapuram 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 14-May 09

Posted 15 May 2009 - 04:41 AM

I tried with even 1 option but it isnt working. I even put on the debug mode, where i can view the XML data and have even the set the settings as mentioned in the earlier link, but still says that the object doesnt support this method.

var chart = new FusionCharts("../Charts/DragNode.swf", "ChartId", "600", "550", "1", "1");

0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic