ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Manually doing a full update with extra parameters
Posted by Jay Baker on Sep-21-2009 10:40
Hi
I have a chart with some overlays on it for selecting which lines to show (as well as the standard zooming/panning stuff).

When someone modifies the line selection, I want to recreate the graph, keeping the current pan/zoom etc, but with the new line selection.

I assumed I could do it by doing something along these lines -

function updateLines(line1,line2,line3){
  var viewer = JsChartViewer.get('bob');
  viewer.setCustomAttr("line1",line1);
  viewer.setCustomAttr("line2",line2);
  viewer.setCustomAttr("line3",line3);
  viewer.partialUpdate();
}

Only I am not doing a partial update, it is a full update (full HTML page is returned, plus image), so trying to use partialUpdate returns an "Error 800 - Partial update returns invalid data". But there doesn't seem to be an equivalent 'fullUpdate()' function - can you tell me what I need to be doing here instead?

Thanks very much
Jay

  Re: Manually doing a full update with extra parameters
Posted by Peter Kwan on Sep-21-2009 17:28
Hi Jay,

The ChartDirector full update is designed to work even if your browser does not support Javascript. So there is no ChartDirector Javascript method does triggers a full update.

The full update is intended to be a fall back mechanism so that a web page can continue to work even if the browser does not support Javascript, or if the browser is a very old browser that supports only a subset of modern Javascript functions. Of course, you can use full update even if the browser fully suppports modern Javascript.

To perform a full update, the user can just press the submit button to perform a normal form submit. You can also use Javascript code to emulate a form submit. For example:

//submit the first form in your web page
document.forms[0].submit();

Hope this can help.

Regards
Peter Kwan

  Re: Manually doing a full update with extra parameters
Posted by Jay Baker on Sep-23-2009 05:40
Thanks very much, that's exactly what I was after.

Cheers
Jay