-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
116 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Responsive Gauges</title> | ||
<meta name="viewport" content="width=device-width"> | ||
|
||
<script src="../lib/jquery-1.7.2.min.js"></script> | ||
<script type="text/javascript" src="../lib/raphael.2.1.0.min.js"></script> | ||
<script type="text/javascript" src="../../justgage.js"></script> | ||
|
||
<style> | ||
body { | ||
text-align: center; | ||
padding: 0px; | ||
margin: 0px; | ||
} | ||
|
||
/* clearfix */ | ||
.clear:before, | ||
.clear:after {content:""; display:table;} | ||
.clear:after {clear:both;} | ||
.clear { *zoom:1;} | ||
|
||
.wrapper { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
margin: 30px; | ||
border: 1px solid #cccccc; | ||
} | ||
|
||
.gauge { | ||
display: block; | ||
float: left; | ||
} | ||
|
||
#g1 { | ||
width: 20%; | ||
} | ||
|
||
#g2 { | ||
width: 60%; | ||
} | ||
|
||
#g3 { | ||
width: 20%; | ||
} | ||
</style> | ||
|
||
<script> | ||
var g1, g2, g3; | ||
|
||
window.onload = function(){ | ||
var g1 = new JustGage({ | ||
id: "g1", | ||
value: getRandomInt(0, 1000), | ||
min: 0, | ||
max: 1000, | ||
relativeGaugeSize: true, | ||
donut: true | ||
}); | ||
|
||
var g2 = new JustGage({ | ||
id: "g2", | ||
value: getRandomInt(0, 100), | ||
min: 0, | ||
max: 100, | ||
title: "Very long title", | ||
relativeGaugeSize: true, | ||
donut: true | ||
}); | ||
|
||
var g3 = new JustGage({ | ||
id: "g3", | ||
value: getRandomInt(0, 100), | ||
min: 0, | ||
max: 100, | ||
title: "Very long title", | ||
label: "label", | ||
relativeGaugeSize: true, | ||
donut: true | ||
}); | ||
}; | ||
</script> | ||
|
||
</head> | ||
|
||
<body> | ||
<div class="wrapper clear"> | ||
<div id="g1" class="gauge"></div> | ||
<div id="g2" class="gauge"></div> | ||
<div id="g3" class="gauge"></div> | ||
</div> | ||
</body> | ||
</html> |