This jQuery plugin makes it easy to generate a number of different types of sparklines directly in the browser, using online a line of two of HTML and Javascript.
/*
:: Vendor Path
node_modules/jquery-sparkline/
:: Installed
npm install jquery-sparkline
:: SOW Controller Init
*/ $.SOW.vendor.sparkline.init('.sparkline');
sparkType
instead of data-sparkType
.
<span class="sparkline" sparkType="bar" sparkBarColor="#fad776" sparkBarWidth="35" sparkHeight="132" values="5,6,8,9,4,6,7,5,4"></span>
<span class="sparkline" sparkType="line" sparkHeight="60" sparkLineColor="#fad776" sparkFillColor="#1dc9b7" sparkWidth="160">8,4,0,0,0,0,1,4,4,10,10,10,10,0,0,0,4,6,5,9,10</span>
<span class="sparkline" sparkType="line" sparkFillColor="false" sparkLineColor="#fad776" sparkLineWidth="2" sparkHeight="60" sparkWidth="160">8,4,0,0,0,0,1,4,4,10,10,10,10,0,0,0,4,6,5,9,10</span>
<span class="sparkline" sparkType="pie" sparkHeight="60" sparkLineColor="#fd3995" values="1,1,2"></span>
<span class="sparkline" sparkType="discrete" sparkHeight="60" sparkWidth="160" sparkLineColor="#fd3995" values="4,6,7,7,4,3,2,1,4,4"></span>