Sign in to follow this  

setTreshold problem

Recommended Posts


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?


Ofer Bar

Share this post

Link to post
Share on other sites


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?


Ofer Bar

Share this post

Link to post
Share on other sites

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:


'OnSliderChange()', 1000);

And calling setTreshold() inside the event handler OnSliderChange() is now working.

I hope others will find this helpful.

Ofer Bar

Edited by Guest

Share this post

Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this