<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bar Gauge Demo</title>
<link rel="stylesheet" href="css/BarGauge/jquery.BarGauge.css" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.BarGauge.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
$('#demo1').BarGauge({
value: 51000,
goal: 100000,
decPlaces: 2,
title: "Gizmo Orders",
showTitle: true,
value_before: "$",
showValue: true,
animSpeed: 'slow',
animType: 'linear',
toolTip: 'This is how you add a tool tip'
});
$('#demo2').BarGauge({
value: 14,
goal: 100,
decPlaces: 2,
color: '#989898',
title: "Target Upload",
showTitle: false,
value_before: "Uploading Files",
showValue: true,
valueColor: '#909090',
animSpeed: 1000,
animType: 'swing',
faceplate: "url(css/BarGauge/bar_graph-colorScale.png) no-repeat",
});
$('#demo3').BarGauge({
color: 'red',
backgroundColor: 'green',
valueColor: '#000',
value: 2,
goal: 10,
decPlaces: 0,
title: "Company Growth",
showTitle: true,
value_after: "%",
showValue: true,
animSpeed: 'fast',
faceplate: "url(css/BarGauge/bar_graph-gradient.png) no-repeat"
});
});
</script>
</head>
<body>
<h2>Demo 1</h2>
<div id="demo1" class="barGauge_container"></div>
<h2>Demo 2</h2>
<div id="demo2" class="barGauge_container"></div>
<h2>Demo 3</h2>
<div id="demo3" class="barGauge_container"></div>
<h2>Usage:</h2>
<code>
<h3>Include in Head Tag</h3>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script><br />
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script><br />
<script type="text/javascript" src="js/jquery.BarGauge.js"></script><br />
<h3>JavaScript / jQuery</h3>
$('#demo1').BarGauge({<br />
color: "#00C", // Color of the Progress / Gauge Bar <br />
backgroundColor: "#FFF", // Background color of Progress / Gauge Bar<br />
width: "754px", // Default width of Bar (Original Graphic Size of faceplate)<br />
height: "72px", // Default height of Bar<br />
value: 0.01, // Value of Bar Gauge (Current Position)<br />
goal: 1.00, // Goal of Bar Gauge (Maximum Position)<br />
title: "BarGauge", // Default Title of Bar Gauge<br />
showTitle: true, // If True show title<br />
value_before: "", // Default Value before text I.E. $1,000<br />
value_after: "", // Default Value Text end text I.E 1,000 USD<br />
showValue: true, // If True Show the value field in the Gauge Bar<br />
valueColor: '#3cff00', // Default Value Color <br />
faceplate: "url(css/BarGauge/bar_graph.png) no-repeat", // Default locaiton of faceplate graphic other options (bar_graph(colorScale).png and bar_graph(gradient).png)<br />
animSpeed: 400, // Animation Speed can be string "slow","fast",etc... Or Integer<br />
animType: "swing", // Animation Type (jQuery Animation Methods)<br />
decPlaces: 2, // Default decimal places on the text field when showing value<br />
thouSeparator: ',', // Default Thousands seperator I.E. 1,000 or 1.000<br />
decSeparator: '.' // Default Decimal Separator I.E. 0.001 or 0,001<br />
});
<h3>HTML</h3>
<div id="demo1" <stong><font color="red">class="barGauge_container"</font></stong>
></div> </code>
</body>
</html>
|