This is a simple widget that lets you render pie charts in Dashing. Forked from stevenleeg/pie.coffee It looks a little bit like this:
dashboard.erb
:
<li data-row="2" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="bookmarks_frequency" data-view="Fullpie" data-title="Bookmark freq."></div>
</li>
my_job.rb
:
data = [
{ label: "Label1", value: 16 },
{ label: "Label2", value: 34 },
{ label: "Label3", value: 10 },
{ label: "Label4", value: 40 },
{ label: "Label5", value: 20 },
]
send_event 'bookmarks_frequency', { value: data }
I hope you like it!
I realize this widget is a bit old but I've recently tried using it under smashing. Ironically, the pie graph doesn't reliably show up on a kiosk RaspberryPi running Chromium but works perfectly on my desktop. On the OSX Chrome, no javascript errors are thrown. On the Pi, the background of the widget shows at page load and occasionally I'll see the data at some later time. I don't have a good means of seeing if it's throwing any javascript errors. This is the only widget on the dashboard and the data is only 3 values. Any thoughts?