Skip to content

Instantly share code, notes, and snippets.

@rhyolight
Created January 30, 2009 04:22
Show Gist options
  • Save rhyolight/54939 to your computer and use it in GitHub Desktop.
Save rhyolight/54939 to your computer and use it in GitHub Desktop.
Grails-UI Line Chart Example
<div id='lineChart' style="width:600px; height: 400px"></div>
<gui:lineChart
renderTo="lineChart"
data="[
[ month: 'January', rent: 880.00, utilities: 894.68 ],
[ month: 'February', rent: 880.00, utilities: 901.35 ],
[ month: 'March', rent: 880.00, utilities: 889.32 ],
[ month: 'April', rent: 880.00, utilities: 884.71 ],
[ month: 'May', rent: 910.00, utilities: 879.811 ],
[ month: 'June', rent: 910.00, utilities: 897.95 ]
]"
seriesDefs="[
[
rent:'Rent',
style:[
color: 0xff0000,
lineSize: 5,
size: 10
]
],
[utilities:'Utilities']
]"
yAxis="[
type:'numeric',
format: [prefix:'$', thousandsSeparator: ',', decimalPlaces: 2],
config:[
minimum:800,
maximum:940
]
]"
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