oferbar Report post Posted December 27, 2007 Hi, I have a web page includes a PowerChart Drag-Node. When the page loads there is an ASP.NET AJAX call to the server to get the chart data. Then the chart is created. However, when I try to call setTreshold(x) on the newly created chart I get an error: "Object doesn't support this property or method Error" But when I later call this code to change the treshold as response to an event: myChart = getChartFromId('myChartId ');myChart.setThreshold(val / 100.0); It is working fine. I am really puzzled... Is there any way to set the treshhold immediatly after creating the chart? Thanks Ofer Bar Share this post Link to post Share on other sites
FusionCharts Support Report post Posted December 28, 2007 hi, You must wait tilll the chart gets loaded by trapping FC_Rendered event. When the chart gets rendered (and registerWithJS is set on ) it fires up the JavaScript function FC_Rendered(DomId). After this you can update the chart. Share this post Link to post Share on other sites
oferbar Report post Posted December 30, 2007 Hi, Thanks for the reply. Is this documented? Do you have sample code? Thx Ofer Bar Share this post Link to post Share on other sites
oferbar Report post Posted December 30, 2007 OK, I found sample code for that. Now I call this code in FC_Rendered() function: var myChart = getChartFromId(g_chartResult.ChartName);myChart.setThreshold(g_chartResult.MinimumTreshold / 100.0); And I can see it is called OK (no error). However, it still doesn't have any effect on the chart look and I can see *all* the links. But when I call it later using an AJAX SliderExtender, it works. Why is that? Thx Ofer Bar Share this post Link to post Share on other sites
oferbar Report post Posted January 7, 2008 (edited) Well, due to the overwhelming responses I had to look for a solution myself. Placing the code in the FC_Rendered() function simply doesn't work! I guess it's a bug of some sort, but anyway the solution is to delay calling setTreshold(). I replaced it with this line of code: window.setTimeout( 'OnSliderChange()', 1000);And calling setTreshold() inside the event handler OnSliderChange() is now working. I hope others will find this helpful. Ofer Bar Edited January 7, 2008 by Guest Share this post Link to post Share on other sites
gperrot Report post Posted April 21, 2010 I have the same problem when trying to set threshold at render callback time, it has no effect. When I update the XML via setXmlData, there is another useful callback: FC_DataLoaded, but I have the same problem: If I call setThreshold in this callback, it has no effect. I'll try the timeout stuff. Share this post Link to post Share on other sites