Skip to content

Instantly share code, notes, and snippets.

@jaydonnell
Created January 27, 2012 18:18
Show Gist options
  • Save jaydonnell/1690128 to your computer and use it in GitHub Desktop.
Save jaydonnell/1690128 to your computer and use it in GitHub Desktop.
namespacing in coffeescript
root = exports ? this
root.PerformanceStats = {}
root.PerformanceStats.piePlot = (el, data) ->
tmp_data = [
{ label: "Series1", data: 10},
{ label: "Series2", data: 30},
{ label: "Series3", data: 90},
{ label: "Series4", data: 70},
{ label: "Series5", data: 80},
{ label: "Series6", data: 110}
]
$.plot($(el), tmp_data, { series: { pie: { show: true }}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment