Grails Zing Chart Plugin
JavaScript Groovy PHP
Latest commit 8248256 Feb 21, 2011 @burtbeckwith burtbeckwith bug fixes - adding missing jquery.js file and added missing plugin at…
…tribute to resource calls
Permalink
Failed to load latest commit information.
.settings added .gitignore files Feb 22, 2011
grails-app
scripts removed svn Feb 21, 2011
src/groovy/zingchart cleanup, removed redundant 'def's, changed ArrayList to List (best to… Feb 22, 2011
web-app removed svn Feb 21, 2011
.classpath
.gitignore added .gitignore files Feb 22, 2011
.project
LICENSE.txt first commit Feb 21, 2011
README.md updated docs Feb 21, 2011
ZingChartGrailsPlugin.groovy cleanup, removed redundant 'def's, changed ArrayList to List (best to… Feb 22, 2011
application.properties uninstalled hibernate and tomcat plugins Feb 22, 2011

README.md

Zing Chart Plugin

This plugin allows you to easily integrate Zing Charts (http://www.zingchart.com) into your Grails projects.

To use the plugin, you must have the javascript include in your HTML header:

...
<head>
  <zing:include />
</head>
...

In the body where you want the chart to appear, use the taglib provided:

<zing:chart type="area" width="700" height="350" container="acceptToConvertChart" data="${data}" xLabels="${labels}" effect="4" />
  • type - Type of chart. See http://www.zingchart.com/learn/docs.php for available types (ie. 'area' or 'bar3d')
  • width - Display width of the chart
  • height* - Display height of the chart
  • container - element ID of the chart container (div)
  • data - Hash Map of data. Key is the name of the data, value is an array of values. See below for examples
  • xLabels - Array of labels
  • effect - Animation effect. See http://www.zingchart.com/learn/docs.php for available effects

Example Data

def labels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
def data = [
  'Visitors': [100, 300, 200, 240, 500, 100, 80],
  'Purchases': [30, 50, 12, 20, 55, 20, 10]
]