dudiq
Members-
Content count
5 -
Joined
-
Last visited
About dudiq
-
Rank
Forum Newbie
-
Flash And Javascript Renders Are Different After Setting Props
dudiq posted a topic in Javascript Problems
Hi All. Why when you change 'BorderThickness' property a chart that was drawn on a flash - everything is normal, and chart, drawn by javascript, leaves for the size of his set? is it ok? And what is solution of this problem? <html> <head> <script language="JavaScript" src="fusionCharts.js"></script> <script language="JavaScript" src="jquery-1.4.2.min.js"></script> <style> #pie1, #pie2 { width: 500px; height: 300px; border: 1px solid black; position: relative; overflow: hidden; } </style> </head> <body> <div id="pie1" align="center"></div> <div id="pie2" align="center"></div> <input type="button" value="click me"> <input type="text" id="text" value="2"> <script type="text/javascript"> $(document).ready(function(){ function getXml() { var xml = '<chart animation=\"0\" labeldisplay=\"None\"><colorrange></colorrange><set label=\"Jan\" value=\"462\"></set><set label=\"Feb\" value=\"857\"></set><set label=\"Mar\" value=\"671\"></set><set label=\"Apr\" value=\"494\"></set><set label=\"May\" value=\"761\"></set><set label=\"Jun\" value=\"960\"></set><set label=\"Jul\" value=\"629\"></set><set label=\"Aug\" value=\"622\"></set><set label=\"Sep\" value=\"376\"></set><set label=\"Oct\" value=\"494\"></set><set label=\"Nov\" value=\"761\"></set><set label=\"Dec\" value=\"960\"></set></chart>'; return xml; } function createChart(id, prop){ var chartInitProps = { swfUrl : "Pie3D.swf", id : "ch1", width: 500, height: 300, debugMode : 0, registerWithJS : 1 } if (prop != undefined){ chartInitProps = jQuery.extend(chartInitProps, prop); } var chart = new FusionCharts(chartInitProps); var xml = getXml(); chart.setDataXML(xml); chart.render(id); return chart; } var m1 = createChart("pie1", {id: "ch1"}); var m2 = createChart("pie2", {id: "ch2", renderer: 'javascript'}); $("input[type=button]").click(function(){ var value = $("#text").val(); m1.setChartAttribute("BorderThickness", value); m2.setChartAttribute("BorderThickness", value); }); }) </script> </body> </html> -
System.security.allowDomain("*"); Please add this for all swf files(charts, widgets, etc...) for cross domain support into the first frame
-
This helps, thanx
-
So, if I use ":" instead of "-". "j:function name(parameters)" not like "j-function name(parameters)" I can't use in parameters ":" character. For example "USA:CANADA", Am I right?
-
Hi, I have a problem to receive data, using javascript functions as link. fusionsCharts examples: <set label='USA' value='235' link="j-myJS('USA',235)"/> <set label='USA' value='235' link="j-myJS-USA,235"/> my examples: 1. <set label='USA' value='235' link="j-myJS('USA-Canada but space',235)"/> 2. <set label='USA' value='235' link="j-myJS-USA-Canada but space,235"/> I have xml data like of my examples, and when press by any column in chart: 1. FireFox generate exception: unterminated string literal [break on this error] try { __flash__toXML(myJS('USA...)")) ; } catch (e) { "<undefined/>"; } because "USA-Canada but space" have a "-" character 2. in this case, parameters are cut off by a space, and i have in output "USA-Canada" instead "USA-Canada but space" What is the problem? In flash or anything else?