Skip to content

Instantly share code, notes, and snippets.

View infracritical's full-sized avatar

infracritical infracritical

View GitHub Profile
@infracritical
infracritical / index.pug
Created October 17, 2019 02:38
jQuery Donut Chart Widget
// Specification
//
// id: each chart requires its own unique ID
// chart-type: Just set to 'donut'
// data-chart-max: The number of items in the set being charted
// data-chart-segments: { index : [starting point of segment, # of units in segment, color]}
// data-chart-text: The text to appear within the donut hole
// data-chart-caption: the text to appear beneath the chart
// data-chart-initial-rotate: The initial angle from which the donut populates the chart