Trac integration with Google Visualization API
Table of Contents
- Trac data sources for Google Visualizations
- Embedding Visualization Gadgets in wiki pages
- Using aliases as a shortcut to identify gadgets
- Embed iGoogle gadgets in your wiki pages
- Query language compatibility
- Rendering external data
- Preparing your data to be compatible with GViz wire protocol (deprecated)
- RPC Handlers Reference
- Using TracLinks to embed iGoogle gadgets
This plugin has been developped in order to expose the data managed by Trac to widgets powered by
Google Visualization API Google Charts API. See the list of GViz providers if you want to know more details about the data that is possible to export in the form of data tables.
- iGoogle gadgets: The different Visualization Gadgets can be helpful to customize the way data managed by Trac itself gets rendered in wiki pages as well as third-party sites. Furthermore some other gadgets containing multiple informations and/or mini-applications may be pasted in wiki pages. This results in ease of use, code reuse to build attractive and useful Trac sites. Since iGoogle gadgets are displayed inside <iframe /> elements, security risks should be minimal ... however, consult the gadgets specification for more details.
This plugin depends on the following components to be installed:
- The Data Source Python Library must be installed so that output data will be compliant with Google Visualization API data source protocol specification, and widgets can actually render the data managed by Trac environments.
- The plugin is built on top of TracXmlRpcPlugin so it must be installed in your system. Otherwise when trying to access the respective data sources the plugin will send back to the client error responses containing informative messages. This has been done in order to reuse it as a data access layer, and speed-up the development process. Therefore maintenance is shared among both these projects ... there is no need to reinvent the wheel
- Since version 1.4.1
it is compulsory to install dutest module.
- This dependency is scheduled to be removed in version 1.4.2
- Since version 1.4.1 you need to install Pygments in order to work with Google Visualization Query Language. Due to the fact that this is an optional feature it will be possible to retrieve the data managed by your environment even if this library is not available in your system. The only side effect in this case is that if a query (i.e. tq parameter) is included in the URL then an error message is returned back to the client.
This package is distributed under the Apache License 2.0 since it includes a verbatim copy of gviz_api module (version 1.0.0). This has been done so as to ease the installation process and provide the means to fall-back to this default implementation if recent versions of the Data Source Python Library is not installed in the target deployment environment. By downloading the plugin you also agree with the terms and statements in both the license and the additional copyright notice. You MUST read both these files before actually using the plugin.
Download the zipped source from here.
Provided that you can access the internet, you can try to install the plugin from the Python Package Index (PyPI).
$ easy_install TracGViz
Doing so the plugin will be available in all your Trac environments. In case of having internet connection and access to PyPI or a simlar repository, both these methods should automatically retrieve the external dependencies from there.
$ easy_install /path/to/unpacked/TracGViz-x.y.z.zip
where x.y.z is the version of the plugin
If you want to install the plugin for a particular environment, follow the steps provided in the plugin installation guideline.
In order to enable TracGViz plugin, the only thing to do is to add the following lines in trac.ini.
[components] tracgviz.* = enabled
If running Apache™ Bloodhound 0.6 multi-product plugin then single environment installations using /plugins folder will just work for data hosted by the global environment. Nevertheless for products it is still necessary to enable the plugin explicitly e.g. by running a command like shown below
$ trac-admin /path/to/bh/env product admin "product prefix" config set components "tracgviz.*" enabled
Use cases, reference specification and tutorials
After installing the plugin it should be very easy to use. There is a user guide with some tutorials about using the different features supported by TracGViz plugin. In a near future many screencasts will be available too.
Moreover you can browse previous support requests and, if you still cannot figure out how to do what you need you may also submit a support request.
Review the design guidelines for further details.
Bug / feature requests
Existing bugs and feature requests for TracGViz are here. If you have any issues, create a new ticket. If you have a cool and useful example that can be added to the docs or want to know how to do something specific, you may submit a support request.