coreyh

Members
  • Content count

    5
  • Joined

  • Last visited

Everything posted by coreyh

  1. ALL FIXED! 6/22/2010 It was the dang chartID, I was dynamicly creating the charts via a loop in a javascript function by appending 'chart'+divID. But other charts rendered in this same divID thus they got assigned the same chart ID and boom the unspecified error, because it could not locate the chart. My Fix, since I use Jquery was to use a new library that allowed me to create GUID (Global Unique Identifer) each time the function executed which ensured a new chart ID. The library is located here http://plugins.jquery.com/project/GUID_Helper I referenced it like so: var chartID = "chrt_" + $.Guid.New().toString().replaceAll('-', '').toString(); var chart = new FusionCharts(myURL+ "/include/FusionCharts/" + valFlash + ".swf", chartID, valWidth, valHeight, "0", "1"); Thanks for the help, and I hope this helps someone! :w00t:
  2. Could this be the problem, after I save to jpg the flash object is updated with some call back functions in the swf params but it has crlf's in the params ?? See attached image.
  3. I had this problem, I had to make a fix to the render function in the FusionCharts.js, aparently the render function was changing the document.title in the DOM. FIX: render: function(elementId, varPageTitle) { //First check for installed version of Flash Player - we need a minimum of 8 if (varPageTitle == null) varPageTitle = document.title; if ((this.detectFlashVersion == 1) && (this.installedVer.major < 8)) { if (this.autoInstallRedirect == 1) { //If we can auto redirect to install the player? var installationConfirm = window.confirm("You need Adobe Flash Player 8 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. Please click on Ok to install the same."); if (installationConfirm) { window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"; } else { return false; } } else { //Else, do not take an action. It means the developer has specified a message in the DIV (and probably a link). //So, expect the developers to provide a course of way to their end users. //window.alert("You need Adobe Flash Player 8 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. "); return false; } } else { //Render the chart var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId; // If loaded in IE and scaleMode and width/height specified in %, load the chart using onload event if (this.getVariable('scaleMode').search(/noscale/i) >= 0 && (this.getAttribute('width').search("%") > 0 || this.getAttribute('height').search("%") > 0)) { //store current object reference var obj = this; if (window.addEventListener) { //add onload event on firefox window.addEventListener("load", function() { n.innerHTML = obj.getSWFHTML(); document.title = varPageTitle; }, false); } else if (window.attachEvent) { //add onload event on IE window.attachEvent("onload", function() { n.innerHTML = obj.getSWFHTML(); document.title = varPageTitle; }); } else { // if all onload fails fails n.innerHTML = this.getSWFHTML(); document.title = varPageTitle; } } else { //Normal case. Instantly load the chart n.innerHTML = this.getSWFHTML(); document.title = varPageTitle; } //Added compatibility //Check if it's added in Mozilla embed array or if already exits if (!document.embeds[this.getAttribute('id')] && !window[this.getAttribute('id')]) window[this.getAttribute('id')] = document.getElementById(this.getAttribute('id')); //or else document.forms[formName/formIndex][chartId] return true; } }
  4. I have the charts loading in divs of course, but I have tab links at the top. So when you click tab1 to render a chart but you are currently viewing the tab2 chart, it passed the div_id to a java script function that just creates the FC xml, passes it to below. chart.setDataXML(xml); chart.render(valDiv);
  5. This is the top and bottomchart ID assignments: var chart = new FusionCharts(tvHCURL + "/include/FusionCharts/" + valFlash + ".swf", "chart" + valDiv, valWidth, valHeight, "0", "1"); chart.setTransparent(true); //this allows other divs to overlay the flash loadAjax(valDiv, valajaxpos); setTimeout(function(){ var xml = '' //excute the passed function xml = eval(valFunction); xml = xml.replace("exportHandler='[EXPORT]'", "exportHandler='" + tvHCURL + '/include/FusionCharts/FCExporter.aspx' + "'"); //alert(xml); chart.setDataXML(xml); chart.render(valDiv); //selected chartID's if (valDiv == 'roi-graph') { ChartIDtop = 'chart' + valDiv; } else { ChartIDbottom = 'chart' + valDiv; } Thanks for any help!