Installation
The Sparklines for WireBootstrap library is located in wire-sparklines.js
. This and other other related files can be installed from the NPM package registry at@wirebootstrap/wire-sparklines
.
npm install @wirebootstrap/wire-sparkline
Sparklines for WireBootstrap will load query.sparkline.min.js
from a CDN if it's not found on the page.
Class
Sparklines for WireBootstrap extends the wire.ui.component class. As such, it inherits all the base functionality of that class.
To create a new instance of the Sparklines for WireBootstrap component, use the wire.sparkline
class.
const myChart = new wire.sparkline();
Render
Render the component using an HTML div
element.
<div id="chart"></div>
<script>
new wire.sparkline().render("#chart", {});
</script>
Last updated
Was this helpful?