This page describes how to use or modify the Google Visualization Java library, and how to contribute to the open source code for the project.
You must have the following components in order to use the Google Visualization Java library:
Note: It is also possible to use the JDK
version 5.0. However, you must then remove @Override from
every method in the library that overrides an interface method. This is
due to the change in the @Override annotation behavior in
JDK version 6.0.
The data source Java library has the following dependencies. The library was tested with the versions listed; other versions might be acceptable, but have not been tested.
Included in the source or download:
Not included in the source or download:
SqlDataSourceHelper class with a mySQL database,
you also need mysql.jar in your runtime environment. See: http://www.mysql.com/products/connector/j/ for
details and downloadable versions.This section describes how to use the visualization Java library if you don't need to modify it. This process varies with your build system:
If using Maven, set up a dependency on the visualization library with the following settings:
If using any other build system:
The JAR example files are included along with the library JARs in the downloadable ZIP file. Instructions on running the examples are given on the Getting Started page.
If you want to modify the library code, you'll have to download the source from the open source hosting site and build it. Before doing this, read the licensing information linked to by the "Code license" section on the project page to see whether your use case is allowed.
Here are the steps for downloading and building the library:
1. Modify your build properties:
build-src subdirectory of your chosen installation
directory. build.properties file and make
the following changes:
servlet-api.jar property to point to your servlet-api.jar file.
For example, if you installed Tomcat to your c: drive in
the tomcat_home directory, then you would specify the servlet-api.jar property
as follows:servlet-api.jar=C:/tomcat_home/common/lib/servlet-api.jar
Note: Use forward slashes rather than backslashes in the file path, even when using Windows
2. Build the library:
Navigate the build-src subdirectory in the file and type one of the
following:
ant datasource - Builds the data source libraryant example - Builds the examplesant - Builds both data source and examplesant test - Builds and runs the data source library tests.
Very useful when you are modifying the library.If you want to contribute changes to the open source project, you'll have to get submission permissions to the project. Send an email to google-visualization-api@googlegroups.com asking for permission and instructions on how to submit changes.