Trend - Dojo GFX Demo

Dojo GFX is a set of API to generate cross-browser two-dimension graphics. It has been merged into Dojo TRUNK repository, you can check it out from here.
Although the API is still not in production status, I hope the following examples would demonstrate the power of Dojo GFX, and arouse your interest on it.

UPDATE: for unknown reason, MSIE does not work if the demo is integrated into the Wordpress framework. Here is the raw HTML document.

Trend

Trend shows how the observed value change in the specified time period. It can accept the static data, and present them in appropriate range. The label and legends are not available right now due to the limitation of Dojo GFX.

Dynamic Trend

Dynamic Trend demonstrates a typical AJAX application, stock watcher. This demo is inspired by the Mozilla extension howto.
Dynamic Trend will fetch the Google’s stock price from Yahoo Finance periodically, then plot the real-time trend in the chart. The main challenge of Dynamic Trend comes from how to adjust the coordination automatically to fit the new data. In this approach, the new value is compared with current [bottom, top] range:

  • if newValue is inside the range, just add it to the chart
  • if newValue is outside the range, calculate the layout, draw the gridLine, and redraw all stored data in the coordination system