ChartDirector Ver 4.1 (PHP Edition Edition)

Realtime Charts in ChartDirector


For web applications, a realtime chart may be achieved by using browser side Javascript to periodic refreshes the <IMG> tag that displays the chart.

Typically, an HTML web page is created with an <IMG> tag for displaying the chart. The URL of the <IMG> tag points to a charting page that generates the most updated chart as an image. A browser side Javascript in the HTML web page periodically refreshes the <IMG> tag. This causes the chart to update periodically without refreshing the entire web page.

The code for refreshing the <IMG> tag can easily be implemented using standard browser side Javascript without any third party library at all. The ChartDirector Javascript ChartViewer also has a special method JsChartViewer.streamUpdate to support realtime charts, providing enhanced features such as double buffering, handling of overlapping updates, error handling and cache avoidance.