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!
Does anyone know how to scale the font that makes up the Values in the Fullpie chart? Adjusting the percentage in .attr('font-size', '70%') only adjusts the scale of the number value in relation to the label of the pie's slice :)
I was asked to shrink the size of the Fullpie widgets, and I have been able to adjust everything but the values inside the pie chart.
Thank you!