Created
January 11, 2011 16:22
-
-
Save bryanjswift/774654 to your computer and use it in GitHub Desktop.
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
/* Graph */ | |
#graph { padding: 5px; width: 477px; height: 299px; } |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Raphael Test</title> | |
<link rel="stylesheet" type="text/css" href="raphaelTest.css"> | |
</head> | |
<body> | |
<div id="graph"></div> | |
<script src="raphael-min.js" type="text/javascript"> </script> | |
<script src="raphaelTest.js" type="text/javascript"> </script> | |
</body> | |
</html> |
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
var holder = document.getElementById('graph') | |
, width = holder.scrollWidth - 10 | |
, height = Math.round(width * 0.5625) + 25 | |
, p = Raphael(holder, width, height) | |
, c = p.circle(p.width - 50, p.height - 50, 50); | |
alert(p.width + ' & ' + p.height); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment