Search Locate Previous Contents

Publishing Charts on the Internet

Saving the chart in VML
Vector Markup Language (VML) is a new facility in IE5 which allows you to include high-quality vector graphics in your web page. These are written entirely as text, are typically much smaller than the corresponding picture, and print very much better. The VML support in RainPro is quite comprehensive, but you will notice that rotated text is not rendered particularly well by the browser, and you might prefer to set ‘flat’ labels and captions for this reason. Please note that the VML support is not shipped as part of the standard RainPro product, and is licensed on a per-application basis. For existing RainPro customers, this will normally be a nominal charge only.

To convert any Rain graph to VML, use vmPS to convert the intermediate PostScript format to a text vector of VML code, then you can simply copy it to the clipboard and paste the result into your HTML file, put the required magic words into the header (see vm‘header) and view it in IE5! See VMLTest for a simple example which you can adapt. There are several examples of VML-based graphics on the Causeway website, but of course you will need IE5 to view them.

Save the chart as a Java Applet
If you want to make your chart available as a vector graphic to non-Microsoft operating systems or older browsers (such as Netscape running under Linux) you should use psMakeApplet to convert the graph to a set of applet parameters to the Rain Java viewer. You should download the required classes (see rainview.zip on the support page) from the Causeway website and include the viewer applet in the same directory as the charts you wish to view. Alternatively, change the code parameter in the applet tag to point to http://www.causeway.co.uk/demos/jview/rainview which will pick up the latest copy from our web site.

Adding hypertext jumps to charts
The object is to allow any data point to act as a hypertext jump, so that you can readily implement graphically-based ‘drill-down’ applications on your website. As a simple example, we might want to see some annotations related to the second sector of a piechart:

       chSet 'head' 'My First Chart'
       chSet 'xlabs' 'One' 'Two' 'Three' 'Four'
       chHref 2 1 'notes.htm'
       chPie 5 4 3 2
       PG„chClose
       vm„vmPS PG

The new function introduced here chHref has a simple job to do. For any data point (addressed by row,column – piecharts have all their values in column-1) you can associate an internet address.

The pie should look much the same as before in the browser, but now when you wave the mouse over the second pie sector, the mouse turns into a pointing hand, and you can click anywhere on the sector to see the detailed notes. You can easily define multiple jumps, and build the correct URL strings to call back to your APL+Win web server – see the notes on chHref for full details.



© Copyright Causeway Graphical Systems Ltd 2003