Skip to content

Instantly share code, notes, and snippets.

@rhyolight
Created January 30, 2009 04:30
Show Gist options
  • Save rhyolight/54943 to your computer and use it in GitHub Desktop.
Save rhyolight/54943 to your computer and use it in GitHub Desktop.
Grails-UI Pie Chart Example
<div id='pieChart' style="width:600px; height: 400px"></div>
<gui:pieChart
renderTo="pieChart"
data="[
[ response: 'Summer', count: 564815 ],
[ response: 'Fall', count: 664182 ],
[ response: 'Spring', count: 248124 ],
[ response: 'Winter', count: 271214 ],
[ response: 'Undecided', count: 81845 ]
]"
dataField="count"
categoryField="response"
style="[
legend: [display: 'right'],
background: [
color: 0xFF0FF0,
alpha: 0.1
],
padding: 20,
border: [
color: 0x995566,
size: 2
],
font: [
name: 'Verdana',
color: 0x995566,
size: 12
]
]"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment