• Content count

  • Joined

  • Last visited

About bradley

  • Rank
    Forum Newbie
  1. Hey just out of interest sake, can you tell me what was modified? I don't actually see anything different in the setDataXML method, setDataURL however is completely different. I haven't actually played around with this yet to test it, just thought I'd ask. I don't really understand the two methods of adjusting the data, one using addVariable and the other with the "external" interface. What's the point?
  2. cool thanks, I'll take a look. Sorry for that previous post, i was at the end of a very frustrating day
  3. seriously, the only way to do this is to instantiate a new FusionCharts object each time? That's pretty shoddy. I feel like I'm being led on a wild goose chase here. This seems like a pretty obvious feature. Adjust the size and data of a current chart and reload. Do you guys really know what's going on over there? Why for instance, if I'm forced to instantiate a new object, would I bother with the innerHTML when I can just call render on that object, since it obviously hasn't been rendered yet if I'm creating a new one each time. Is there anyone there that can actually program?? I'm sorry this is pretty harsh but every solution I've been given thus far has been incorrect or sub-par.
  4. Ok this doesn't work. WHen I make my ajax request and call currentChart.setDataXML(newXML) then call currentChart.getSWFHTML() it contains the old XML, so it never updates. What do I need to do to get that method to return with the new data?
  5. hey sorry one more question. Why am I setting the innerHTML on the flash object? That "chart_flash_id" is the ID i used when instantiating the JS chart object, which is what is applied to the embed tag. When I call getSWFHTML() I get that embed tag back, so that would be setting the innerHTML of the embed to itself. Don't you really mean I want to set the innerHTML to the surrounding div, ie. the one that I rendered the flash in in the first place? Here's an example: <div id="chart_wrapper"></div> currentChart = new FusionCharts("/FusionCharts/MSColumn2D.swf", "chart_flash_id", chartWidth, chartHeight, "0", "1"); now after setting the currentChart div and rendering it to "chart_wrapper", if I call currentChart.getSWFHTML() I get the embed object back, (which i can't seem to display here as the forum views it as an actual html tag) Anyway, I'm pretty sure i want to do document.getElementById("chart_wrapper").innerHTML( currentChart.getSWFHTML() ) No?
  6. So if I can just summarize the steps I should take to have my charts working with ajax and different widths: First request: - Initialize my chart currentChart = new FusionCharts("/FusionCharts/MSColumn2D.swf", "chart_flash_id", chartWidth, chartHeight, "0", "1"); - set chart data from request currentChart.setDataXML(someXMLstring); - set chart width from request data currentChart.setAttribute("width",someWidth); - render chart currentChart.render("someDivId"); subsequent requests - set chart data from request currentChart.setDataXML(someXMLstring); - set chart width from request data currentChart.setAttribute("width",someWidth); - set the inner html of flash DOM element to the Swf html document.getElementById("chart_flash_id").innerHTML( currentChart.getSWFHTML() ); And this should refresh my chart automatically with a new width and data ??? Just to confirm I'm only using render once...
  7. I'm trying to set the width of a chart dynamically based on an ajax request (that also contains the new data to be loaded) I run: currentChart.setDataXML(data.chart); currentChart.setAttribute("width",data.width); currentChart.render("some_div"); Where: data.chart is the chart XML data.with is some pixel width as a string And it works the first time. However the second time (ie. another ajax request) when I say currentChart.render("some_div"); it resets the data to the data of the first request. Why is this so? Is there a way to change the chart width without re-rendering. What is the method that a person would change the data and width and regenerate the chart.
  8. This FC blog article says that the new FC swf's will give me a bunch of javascript methods but I can't seem to get it to work. I've got the whole FusionCharts package downloaded, Version.txt says 3.1. when I use b = new FusionCharts("/FusionCharts/MSColumn2D.swf", "blah", 500, 500, "0", "1") If I try to, for instance say: b.hasRendered() I get I don't seem to have any of the API methods, but setDataXML and setDataURL. What's going on? For now i've included my own hasRendered boolean var to the FC object but this isn't ideal. I mainly need the hasRendered() function. I'm updating multiple charts constantly through ajax and I need to know if they've rendered so I don't call render every time the data uploads. I can't remember but calling render every time seems to mess up a chart? Is that right? What does render really do?
  9. JSON format

    Can someone give me some feedback and opinions on the json parsing? It doesn't seem to have worked its way into the FC core and I'm interested to know why. (unless it has in fact and I missed that) I haven't looked at the source but I'm very interested to know if it's fast and more importantly stable.