JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://igniteui.com/js/modernizr.min.js"></script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.core.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.dv.js"></script>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet"></link>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/structure/infragistics.css" rel="stylesheet"></link>
<div>
<h3>Team Events’ Budget Utilization</h3>
</div>
<div id="bulletgraph" style="width:70%"></div>
<br />
The target value shows the allocated budget, the progress bar shows the amount spent until now and the exploded range emphasizes on the progress that has been made.
JavaScript
$(function () {
/*----------------- Instantiation -------------------------*/
var $bulletGraph = $("#bulletgraph");
$bulletGraph.igBulletGraph({
width: '100%',
height: '80px',
ranges: [
{
name: 'low',
startValue: 0,
endValue: 1000,
outerStartExtent: .85,
outerEndExtent: .85
},
{
name: 'medium',
startValue: 1000,
endValue: 2000,
outerStartExtent: .85,
outerEndExtent: .85
} ,
{
name: 'high',
startValue: 2000,
endValue: 3000,
outline: '#F79646',
strokeThickness: 2
}
],
showToolTip: true,
maximumValue: 3000,
targetValue: 2700,
value: 2100,
valueInnerExtent: 0.45,
valueOuterExtent: 0.6,
interval:500,
formatLabel: function (evt, ui)
{
ui.label = "$" + ui.value;
}
});
});