Skip to content

Instantly share code, notes, and snippets.

@rhyolight
Created January 30, 2009 04:25
Show Gist options
  • Save rhyolight/54941 to your computer and use it in GitHub Desktop.
Save rhyolight/54941 to your computer and use it in GitHub Desktop.
Grails-UI Bar Chart Example
<div id='barChart' style="width:600px; height: 400px"></div>
<gui:barChart
id='myBarChart'
renderTo="barChart"
data="[
[ year: 2003, revenue: 1246852, expense: 1123359, income: 123493 ],
[ year: 2004, revenue: 2451876, expense: 2084952, income: 366920 ],
[ year: 2005, revenue: 2917246, expense: 2587151, income: 330095 ],
[ year: 2006, revenue: 3318185, expense: 3087456, income: 230729 ]
]"
xAxis="[
type:'numeric',
format: [prefix:'$', thousandsSeparator: ',', decimalPlaces: 2],
]"
seriesDefs="[
[
revenue: 'Revenue'
],
[
expense: 'Expense'
],
[
income: 'Income',
type: 'line'
]
]"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment