diff options
| author | Tim Redfern <tim@eclectronics.org> | 2012-01-23 22:22:02 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2012-01-23 22:22:02 +0000 |
| commit | 7523fb951aabc24bf290028c348cbe46bd846f86 (patch) | |
| tree | fc28172683d16b59ecfa1070fa7a8188952803a7 /test/g.raphael/examples/barchart/barchart_text_axis.html | |
| parent | 9af0f832607e626d22c4205a3ed21ad105fdc042 (diff) | |
graphing with raphael
Diffstat (limited to 'test/g.raphael/examples/barchart/barchart_text_axis.html')
| -rw-r--r-- | test/g.raphael/examples/barchart/barchart_text_axis.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/g.raphael/examples/barchart/barchart_text_axis.html b/test/g.raphael/examples/barchart/barchart_text_axis.html new file mode 100644 index 0000000..e3036f7 --- /dev/null +++ b/test/g.raphael/examples/barchart/barchart_text_axis.html @@ -0,0 +1,25 @@ +<html> + <head> + <title>gRaphaël Bar Chart - a barchart with text x-axis</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 barchart at 10, 10 + // width 300, height 220, data: [10,20,30,40] + var max_val = 50 + r.g.barchart(40, 10, 320, 220, [[10,20,30,40]]); + axis = r.g.axis(85,230,310,null,null,4,2,["Today", "Yesterday", "Tomorrow", "Future"], "|", 0); + axis.text.attr({font:"12px Arial", "font-weight": "regular", "fill": "#333333"}); + // show y-axis by setting orientation to 1 + axis2 = r.g.axis(40,230,300,0,400,10,1); + } + </script> + </head> + <body> + </body> +</html>
\ No newline at end of file |
