|
automaticty repaint chart |
Posted by Doron on Feb-21-2011 19:00 |
|
Hi,
I have a JSP split into 4 frames. Each frame contains a differante chart.
I would like to know which parameter/method of the chart, controls it's automatic repaint on screen.
Thanks,
Doron |
Re: automaticty repaint chart |
Posted by Peter Kwan on Feb-22-2011 01:44 |
|
Hi Doron,
I am not too sure what you mean by "automatic repaint on screen". In particular, I am not too sure what "repaint" refers to.
Anyway, as the chart is just standard HTML, it is repainted just like any other HTML contents.
Normally, in GUI systems, "repaint" means to automatically repaint the window when the window is blocked or minimized, and then reappear. For example, if you minimize the browser window (so it becomes an icon on the task bar and the screen no longer display the window contents), and then maximize it, the contents inside the browser window will be repainted to the screen. This is done automatically by the operating system and does not need to be handled by the programmer.
If the "repaint" is referring to something else, would you mind to clarify what do you mean by "repaint"?
Regards
Peter Kwan |
Re: automaticty repaint chart |
Posted by Doron on Feb-22-2011 16:58 |
|
I'll try to explain myself.
I need to Realtime Charts like the example 'Realtime Chart Demo ' (others charts like Bar Charts,pie Charts).
Thenks again
Doron |
Re: automaticty repaint chart |
Posted by Peter Kwan on Feb-23-2011 09:19 |
|
Hi Doron,
You can update a web chart using the same method as updating a web page. For example, you may reload the web page. You may refer to your HTML/Javascript documentation on how to automatically reload web page.
If you would like to use the method in the realtime charts sample code, you can freely put multiple realtime charts in multiple frames. For example:
<frame src="realtimechart1.jsp">
<frame src="realtimechart2.jsp">
<frame src="realtimechart3.jsp">
<frame src="realtimechart4.jsp">
The realtime chart can be any chart you like. It can be a pie chart or bar chart or any other kinds of chart.
The realtime chart sample code uses "streaming update" to the update the chart image. Basically, on the browser side, the code "JsChartViewer.get('ChartImage1').streamUpdate();" is used to stream update the chart. It is driven by a Javascript timer to run periodically. On the server side, the code is written to handle the stream update. You may refer to the "Realtime Chart" section of the ChartDirector documentation for details.
Hope this can help.
Regards
Peter Kwan |
|