Hi Megha,
There is a realtime chart sample code in ChartDirector that demonstrates how to
automatically refresh the graph every few seconds without refreshing the page. May be you
can use this as a reference.
In brief, the realtime chart sample code uses the ChartDirector Javascript method
JsChartViewer.streamUpdate can be used to update the graph without refreshing the page.
See:
http://www.advsofteng.com/doc/cdjava.htm#JsChartViewer.streamUpdate.htm
For the "every 5 seconds" part, you can use standard Javascript functions like
window.setInterval to configure code to run every 5 seconds. Please refer to Javascript
documentation on how to use this method. In the realtime chart sample code, this method
is used to run a subroutine periodically, and the subroutine calls
JsChartViewer.streamUpdate to update the chart.
Hope this can help.
Regards
Peter Kwan |