summaryrefslogtreecommitdiff
path: root/test/g.raphael/examples/dot
diff options
context:
space:
mode:
Diffstat (limited to 'test/g.raphael/examples/dot')
-rw-r--r--test/g.raphael/examples/dot/dotchart_basic.html22
-rw-r--r--test/g.raphael/examples/dot/dotchart_href.html28
-rw-r--r--test/g.raphael/examples/dot/dotchart_labels.html23
-rw-r--r--test/g.raphael/examples/dot/dotchart_symbols.html22
4 files changed, 95 insertions, 0 deletions
diff --git a/test/g.raphael/examples/dot/dotchart_basic.html b/test/g.raphael/examples/dot/dotchart_basic.html
new file mode 100644
index 0000000..3cb74ed
--- /dev/null
+++ b/test/g.raphael/examples/dot/dotchart_basic.html
@@ -0,0 +1,22 @@
+<html>
+ <head>
+ <title>gRaphaël Line Chart - a simple dot chart example</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.dot-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 simple dot chart at 10, 10
+ // width 300, height 220
+ // x-values: [5,10,15,20,25], y-values: [220,220,220,220,220]
+ // size: [1,2,3,4,5]
+ r.g.dotchart(10,10,300,220,[5,10,15,20,25],[220,220,220,220,220],[1,2,3,4,5], {max:10});
+ }
+ </script>
+ </head>
+ <body>
+ </body>
+</html> \ No newline at end of file
diff --git a/test/g.raphael/examples/dot/dotchart_href.html b/test/g.raphael/examples/dot/dotchart_href.html
new file mode 100644
index 0000000..575d8ab
--- /dev/null
+++ b/test/g.raphael/examples/dot/dotchart_href.html
@@ -0,0 +1,28 @@
+<html>
+ <head>
+ <title>gRaphaël Line Chart - a simple dot chart example with hyperlinks</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.dot-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 simple dot chart at 10, 10
+ // width 300, height 220
+ // x-values: [5,10,15,20,25], y-values: [220,220,220,220,220]
+ // size: [1,2,3,4,5]
+ // attach links to the first 2 dots, and the last dot.
+ var dots = r.g.dotchart(10,10,300,220,[5,10,15,20,25],[220,220,220,220,220],[1,2,3,4,5], {max:10, href: ["http://www.google.com","http://www.yahoo.com",,,"http://www.raphaeljs.com"]});
+ dots.each(function() {
+ this.click(function() {
+ alert(this.attrs.href);
+ });
+ });
+ }
+ </script>
+ </head>
+ <body>
+ </body>
+</html> \ No newline at end of file
diff --git a/test/g.raphael/examples/dot/dotchart_labels.html b/test/g.raphael/examples/dot/dotchart_labels.html
new file mode 100644
index 0000000..3d61097
--- /dev/null
+++ b/test/g.raphael/examples/dot/dotchart_labels.html
@@ -0,0 +1,23 @@
+<html>
+ <head>
+ <title>gRaphaël Line Chart - a labelled dot chart example</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.dot-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 simple dot chart at 10, 10
+ // width 300, height 220
+ // x-values: [5,10,15,20,25], y-values: [220,220,220,220,220]
+ // size: [1,2,3,4,5]
+ var axisx = ["dot1","dot2","dot3","dot4","dot5"]
+ r.g.dotchart(10,10,300,220,[5,10,15,20,25],[220,220,220,220,220],[1,2,3,4,5], {max:10, axis: "0 0 1 0", axisxlabels: axisx, axisxstep: 4, heat: true});
+ }
+ </script>
+ </head>
+ <body>
+ </body>
+</html> \ No newline at end of file
diff --git a/test/g.raphael/examples/dot/dotchart_symbols.html b/test/g.raphael/examples/dot/dotchart_symbols.html
new file mode 100644
index 0000000..60a6f21
--- /dev/null
+++ b/test/g.raphael/examples/dot/dotchart_symbols.html
@@ -0,0 +1,22 @@
+<html>
+ <head>
+ <title>gRaphaël Line Chart - customised symbol dot chart example</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.dot-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 simple dot chart at 10, 10
+ // width 300, height 220
+ // x-values: [5,10,15,20,25], y-values: [220,220,220,220,220]
+ // size: [1,2,3,4,5]
+ r.g.dotchart(10,10,300,220,[5,10,15,20,25],[220,220,220,220,220],[1,2,3,4,5], {max:10, symbol:'*'});
+ }
+ </script>
+ </head>
+ <body>
+ </body>
+</html> \ No newline at end of file