1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<html>
<head>
<title>gRaphaël Bar Chart - a horizontal barchart with gutters</title>
<script type="text/javascript" src="../raphael-min.js"></script>
<script type="text/javascript" src="../../g.raphael-min.js"></script>
<script type="text/javascript" src="../../g.bar-min.js"></script>
<script type="text/javascript">
window.onload = function() {
// Creates canvas 640 × 480 at 10, 50
var r = Raphael(10, 50, 640, 480);
// Creates a single series horizontal barchart at 10, 10
// width 300, height 220, data: [10,20,30,40]
r.g.hbarchart(10, 10, 300, 220, [[10,20,30,40]], {"gutter":"40%"});
// My bar sizes will be 36px high and gutter(space between) 14px. (for more on how this is calculated, refer to bar.markdown)
}
</script>
</head>
<body>
</body>
</html>
|