<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- Ignite UI for jQuery Required Combined CSS Files -->
<link href="http://cdn-na.infragistics.com/igniteui/2024.1/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
<link href="http://cdn-na.infragistics.com/igniteui/2024.1/latest/css/structure/infragistics.css" rel="stylesheet" />
<script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script>
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>
<!-- Ignite UI for jQuery Required Combined JavaScript Files -->
<script src="http://cdn-na.infragistics.com/igniteui/2024.1/latest/js/infragistics.core.js"></script>
<script src="http://cdn-na.infragistics.com/igniteui/2024.1/latest/js/infragistics.dv.js"></script>
</head>
<body>
<div style="width:100%; height:300px" >
<div id="bulletgraph" />
</div>
<script type="text/javascript">
$(function () {
var $bulletGraph = $("#bulletgraph");
$bulletGraph.igBulletGraph({
height: "300px",
width: "60px",
orientation: "vertical",
value: 85,
targetValue: 77,
ranges: [
{
name: 'bad',
startValue: 0,
endValue: 33
},
{
name: 'acceptable',
startValue: 33,
endValue: 70
},
{
name: 'good',
startValue: 70,
endValue: 100
}],
transitionDuration: 200,
});
// Orientation
$("#orientationButton").click(function () {
var orientation = $bulletGraph.igBulletGraph("option", "orientation") == "vertical" ? "horizontal" : "vertical";
$bulletGraph.igBulletGraph("option", "orientation", orientation);
if (orientation == "horizontal") {
$bulletGraph.igBulletGraph("option", "width", "100%");
$bulletGraph.igBulletGraph("option", "height", 60);
}
else {
$bulletGraph.igBulletGraph("option", "width", 60);
$bulletGraph.igBulletGraph("option", "height", 300);
}
$("#orientationButton").text(orientation == "horizontal" ? "Vertical" : "Horizontal");
});
// Scale Inversion
$("#isScaleInvertedCheckBox").click(function () {
$bulletGraph.igBulletGraph("option", "isScaleInverted", $(this).is(":checked"));
});
});
</script>
<fieldset id="graphOptions" style="margin-top: 30px">
<legend>Options</legend>
<table>
<tr>
<td>Orientation</td>
<td>
<button id="orientationButton" style="width: 100px; margin: 12px 40px 12px 12px">Horizontal</button>
</td>
<td>
Is Scale Inverted
</td>
<td>
<input type="checkbox" id="isScaleInvertedCheckBox" style="width: 100px; margin: 12px" />
</td>
</tr>
</table>
</fieldset>
</body>
</html>