Drawing API
This is the project page for the Drawing API Google Summer of Code project. Using this module you can create graphics without knowing anything about the rendering process. It makes it easy to generate different graphs, plots, charts, maps and so on. At the moment it provides only SVG output, all the remarks below are relevant to the SVG toolkit only.
The module contains
- an SVG toolkit that handles the painting,
- generic drawing.module that is responsible for understanding the syntax.
- a graphing module
- demo modules, providing examples how the module can be used
You can read more on how you can declare graphics in the handbook page.
Current stage: The SoC ended, the API is usable. I am working on a official release at the moment. In this release the demo modules will be removed, potentially the graphing module will be removed.
Important: to make this module work in the largest range of browsers possible, insert the following in the page template of your theme:
xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" into the html tag, so after rendering it looks like this: http://wiki.svg.org/Inline_SVG#The_ASV_Hack_and_Namespace_Prefixes.
Also the page has to be a valid XHTML page, otherwise the whole page can break. I experienced this with the devel module for example, having graphics displayed and query log at the bottom of the page does not work together.
I set up a temporary demo page, where you can check if your browser works with the current version. We have tested with the Adobe plugin with IE6 and 7, it seems with IE6 it works well (except for the jQuery compatibility), for IE7 it needs more testing. May not fix.
The module is usable in
- Safari 3
- Konqueror 4
- Opera 9
- Firefox 1.5/2
And is not supported in
- Konqueror 3 (though it has basic SVG support, not for inline, in-page SVG which is rendered by this module. thanks to jpetso for the report)
- Safari 2, the Adobe SVG plugin (which is not supported anymore by Adobe) works only on PPC (so PPC version of Safari on Rosetta)
- IE6/7, only with the Adobe SVG plugin (according to reports IE7 is not working even with the plugin)
Please report any issues related to browser support in the issue queue, even though I might not reply I will try to solve it.
Windows plugins
- Renesis plugin: http://www.emiasys.net/
- Adobe plugin (support to be dropped in January, 2008): http://www.adobe.com/svg/viewer/install/main.html
Development remarks: This project officially supports PHP 5 only, but so far it works with 4 too. Use the following code to check it out from CVS:
cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -d drawing -r DRUPAL-5--2 contributions/modules/drawing
Related group and development progress reports: http://groups.drupal.org/graphing-svg.
Some ideas for what it can be used
- mapping applications
- popular topics (tags) as rectangles, size reflects the popularity of tags. collective size can be used to reflect the size of the vocabulary, with zooming this can actually be useful
- statistics on page (for administrators a quick overview on current load, comment number (flame rate), query speed and so on)
- embedded graphs (sparklines)
Releases
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 5.x-2.x-dev | 2007-Dec-27 | 18.62 KB | Download · Release notes | Development snapshot | |
