The example programmes presented here came about as the result of a thread on the GAWDS mailing list.
Example PHP Programme and Code Listing
The programme tagcloud.php demonstrates how (X)HTML ordered lists may be produced and styled visually as ‘Tag Clouds’ – where terms are presented in an arbitrary order and weight is given purely visually – and ‘Tag Wedges’ – where a logical sequence is used and weight is given by position in sequence. Tag Wedges may also be styled visually to provide further emphasis. To see how I made this work, have a look at the PHP code listing.
In addition to the dummy data example described above, I have also created another example which is the same in all details other than the data being produced by an SQL query of the Smiffy’s Place database. Have a look at the categories
tag wedges and cloud to see this real-world example.
To complement the real-world example and based on the same code, here it is again, in SVG. The reason that I have done this SVG rendering is that I feel that if we are ever going to produce an accessible, semantic, graph to do the job of a tag wedge/cloud, this will probably be the means to do it. (Please note – this is my first ever brush with SVG, so it is not pretty.)
UPDATE: I have now fiddled some more with the SVG so that it
looks a little better. Between Firefox and Opera, Opera
gives a much better rendering.
Please leave any comments on this topic against this post.