Page 1 of 1

WebChart in System.Web.UI.ICallbackEventHandler enabled sit

Posted: Thu Aug 27, 2009 3:24 pm
by 13052858
I want to use the WebChart control in combination with a web page that implements the System.Web.UI.ICallbackEventHandler interface.
This to avoid page flickering when chart is refreshed (pre-load the chart before refresh the page).

Required for this is that the server callback method "public string GetCallbackResult()" returns:
- a string to the location where the image can be downloaded or
- a string from which the control can be regenerated.

I think returning a string where the chart control image can be downloaded is possible (example "SerieTypes as image"), but then I will loose my zoom functionality.
Does anyone know a solution for this case where I also can use a zoom on the chart??

Re: WebChart in System.Web.UI.ICallbackEventHandler enabled sit

Posted: Tue Sep 01, 2009 2:18 pm
by Marc
Hello,

As you suggest, you could use ICallbackEventHandler to ask the Chart to create itself and return a string by which to call the generated Chart image. The attached project shows how that might be done. Although the approach has its uses I think it wouldn't be very practical to use with zoom. Zoom send a petition to the server on completion of zoom (mouseup), via a call to the page postback method. We'll take a look to see whether any variation on this could be offered for ICallbackEventHandler in a future version. For the moment an (Ajax) UpdatePanel might be the best way to isolate the Chart refresh from the rest of the page.

Regards,
Marc Meumann