tailieunhanh - Publishing AJAX and PHP - part 20
AJAX Real-Time Charting with SVG For a primer on the world of SVG, check out these resources: • • • • • • The SVG W3C page at . An SVG introduction at . A very useful list of SVG links at . A handy SVG reference at . The SVG document structure is explained at . SVG examples at and . Implementing a Real-Time Chart with AJAX and SVG Before continuing, please make sure your web browser supports SVG. The code in this case study has been tested with Firefox , Internet Explorer with the Adobe SVG Viewer, and Apache Batik | AJAX Real-Time Charting with SVG For a primer on the world of SVG check out these resources The SVG W3C page at http Graphics SVG . An SVG introduction at http . com svg . A very useful list of SVG links at http . A handy SVG reference at http . com svg svg_reference .asp. The SVG document structure is explained at http TR SVG . SVG examples at http papers svg samples and http samples .html. Implementing a Real-Time Chart with AJAX and SVG Before continuing please make sure your web browser supports SVG. The code in this case study has been tested with Firefox Internet Explorer with the Adobe SVG Viewer and Apache Batik. You can test the online demo accessing the link you can find at http . Firefox ships with integrated SVG support. Being at its first version this SVG implementation does have some problems that you need to take into consideration when writing the code and the performance isn t excellent. To load SVG in Internet Explorer you need to install an external SVG plug-in. The SVG plug-in we used in our tests is the one from Adobe which you can download at http www . svg viewer i nstall mai . The installation process is very simple you just need to download a small file named and execute it. The first time you load an SVG page you will be asked to confirm the terms of agreement. Finally we also tested the application with Apache s Batik SVG viewer in which case you need to load the svg file directly because it doesn t support loading the HTML file that loads the SVG script. Y ou may want to check Batik for its good DOM viewer which nicely displays the SVG nodes in a hierarchical structure. In this chapter s case study we ll create a simple chart application whose input data is retrieved asynchronously from a PHP script. The generated data can be anything and in our case we ll have a simple .
đang nạp các trang xem trước